diff --git a/readme.md b/readme.md index aa76cfd5e..7ce5d7587 100644 --- a/readme.md +++ b/readme.md @@ -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) diff --git a/src/Application/PresenterFactory.php b/src/Application/PresenterFactory.php index 30ccf853e..d1724a1a4 100644 --- a/src/Application/PresenterFactory.php +++ b/src/Application/PresenterFactory.php @@ -33,7 +33,7 @@ class PresenterFactory implements IPresenterFactory /** - * @param callable(string): IPresenter $factory + * @param ?callable(string): IPresenter $factory */ public function __construct(?callable $factory = null) { diff --git a/src/Application/UI/Component.php b/src/Application/UI/Component.php index b8ed3259f..f15ae8c0b 100644 --- a/src/Application/UI/Component.php +++ b/src/Application/UI/Component.php @@ -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; diff --git a/src/Application/UI/Control.php b/src/Application/UI/Control.php index a2b24afeb..e8473eb83 100644 --- a/src/Application/UI/Control.php +++ b/src/Application/UI/Control.php @@ -82,7 +82,7 @@ protected function checkTemplateClass(string $class): ?string static::class, $class, Template::class - ), E_USER_NOTICE); + )); return null; } else { return $class; diff --git a/src/Bridges/ApplicationDI/LatteExtension.php b/src/Bridges/ApplicationDI/LatteExtension.php index 608e7982a..2a43a3323 100644 --- a/src/Bridges/ApplicationDI/LatteExtension.php +++ b/src/Bridges/ApplicationDI/LatteExtension.php @@ -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; } diff --git a/tests/Bridges.DI/RoutingExtension.cache.phpt b/tests/Bridges.DI/RoutingExtension.cache.phpt index 0d5209bb0..bd7423446 100644 --- a/tests/Bridges.DI/RoutingExtension.cache.phpt +++ b/tests/Bridges.DI/RoutingExtension.cache.phpt @@ -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: diff --git a/tests/UI/Presenter.getParameters.phpt b/tests/UI/Presenter.getParameters.phpt index e4e916a8c..7a600e5f5 100644 --- a/tests/UI/Presenter.getParameters.phpt +++ b/tests/UI/Presenter.getParameters.phpt @@ -24,7 +24,7 @@ class OnePresenter extends Presenter public $yes1; #[Persistent, Parameter] - public $yes2; /* Parameter is ignored */ + public $yes2; #[Parameter] public $yes3;