Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 15, 2023
1 parent 08ccbdd commit 3e12237
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
3 changes: 1 addition & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ Nette Application MVC
=====================

[![Downloads this Month](https://img.shields.io/packagist/dm/nette/application.svg)](https://packagist.org/packages/nette/application)
[![Tests](https://github.com/nette/application/workflows/Tests/badge.svg?branch=master)](https://github.com/nette/application/actions)
[![Coverage Status](https://coveralls.io/repos/github/nette/application/badge.svg?branch=master)](https://coveralls.io/github/nette/application?branch=master)
[![Tests](https://github.com/nette/application/actions/workflows/tests.yml/badge.svg?branch=v3.1)](https://github.com/nette/application/actions)
[![Latest Stable Version](https://poser.pugx.org/nette/application/v/stable)](https://github.com/nette/application/releases)
[![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/nette/application/blob/master/license.md)

Expand Down
2 changes: 1 addition & 1 deletion src/Application/PresenterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PresenterFactory implements IPresenterFactory


/**
* @param callable(string): IPresenter $factory
* @param ?callable(string): IPresenter $factory
*/
public function __construct(?callable $factory = null)

Check failure on line 38 in src/Application/PresenterFactory.php

View workflow job for this annotation

GitHub Actions / PHPStan

PHPDoc tag @param has invalid value (?callable(string): IPresenter $factory): Unexpected token "(", expected variable at offset 25
{
Expand Down
2 changes: 1 addition & 1 deletion src/Application/UI/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected function createComponent(string $name): ?Nette\ComponentModel\ICompone
$res = parent::createComponent($name);
if ($res && !$res instanceof SignalReceiver && !$res instanceof StatePersistent) {
$type = get_class($res);
trigger_error("It seems that component '$name' of type $type is not intended to be used in the Presenter.", E_USER_NOTICE);
trigger_error("It seems that component '$name' of type $type is not intended to be used in the Presenter.");
}

return $res;
Expand Down
2 changes: 1 addition & 1 deletion src/Application/UI/Control.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function checkTemplateClass(string $class): ?string
static::class,
$class,
Template::class
), E_USER_NOTICE);
));
return null;
} else {
return $class;
Expand Down
3 changes: 2 additions & 1 deletion src/Bridges/ApplicationDI/LatteExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ public static function initLattePanel(
Nette\Application\UI\TemplateFactory $factory,
Tracy\Bar $bar,
bool $all = false
) {
): void
{
if (!$factory instanceof ApplicationLatte\TemplateFactory) {
return;
}
Expand Down
10 changes: 5 additions & 5 deletions tests/Bridges.DI/RoutingExtension.cache.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ test('', function () {
});


Assert::exception(function () {
function myRouterFactory(): Nette\Routing\Router
{
return new Route('path', function () {});
}
function myRouterFactory(): Nette\Routing\Router
{
return new Route('path', function () {});
}


Assert::exception(function () {
$loader = new DI\Config\Loader;
$config = $loader->load(Tester\FileMock::create('
routing:
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/Presenter.getParameters.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class OnePresenter extends Presenter
public $yes1;

#[Persistent, Parameter]
public $yes2; /* Parameter is ignored */
public $yes2;

#[Parameter]
public $yes3;
Expand Down

0 comments on commit 3e12237

Please sign in to comment.