Skip to content

Commit af4ff61

Browse files
committed
typos
1 parent 00da68b commit af4ff61

File tree

11 files changed

+18
-12
lines changed

11 files changed

+18
-12
lines changed

readme.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ Nette Application MVC
22
=====================
33

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

src/Application/Helpers.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ final class Helpers
2121

2222
/**
2323
* Splits name into [module, presenter] or [presenter, action]
24+
* @return array{string, string, string}
2425
*/
2526
public static function splitName(string $name): array
2627
{

src/Application/PresenterFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PresenterFactory implements IPresenterFactory
3333

3434

3535
/**
36-
* @param callable(string): IPresenter $factory
36+
* @param ?callable(string): IPresenter $factory
3737
*/
3838
public function __construct(?callable $factory = null)
3939
{

src/Application/UI/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected function createComponent(string $name): ?Nette\ComponentModel\ICompone
7979
$res = parent::createComponent($name);
8080
if ($res && !$res instanceof SignalReceiver && !$res instanceof StatePersistent) {
8181
$type = get_class($res);
82-
trigger_error("It seems that component '$name' of type $type is not intended to be used in the Presenter.", E_USER_NOTICE);
82+
trigger_error("It seems that component '$name' of type $type is not intended to be used in the Presenter.");
8383
}
8484

8585
return $res;

src/Application/UI/ComponentReflection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ final class ComponentReflection extends \ReflectionClass
3434

3535
/**
3636
* Returns array of class properties that are public and have attribute #[Persistent] or #[Parameter] or annotation @persistent.
37+
* @return array<string, array{def: mixed, type: string, since: ?string}>
3738
*/
3839
public function getParameters(): array
3940
{
@@ -81,6 +82,7 @@ public function getParameters(): array
8182

8283
/**
8384
* Returns array of persistent properties. They are public and have attribute #[Persistent] or annotation @persistent.
85+
* @return array<string, array{def: mixed, type: string, since: string}>
8486
*/
8587
public function getPersistentParams(): array
8688
{

src/Application/UI/Control.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function checkTemplateClass(string $class): ?string
8282
static::class,
8383
$class,
8484
Template::class
85-
), E_USER_NOTICE);
85+
));
8686
return null;
8787
} else {
8888
return $class;

src/Application/UI/Presenter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ public function findLayoutTemplateFile(): ?string
535535

536536
/**
537537
* Formats layout template file names.
538+
* @return string[]
538539
*/
539540
public function formatLayoutTemplateFiles(): array
540541
{
@@ -561,6 +562,7 @@ public function formatLayoutTemplateFiles(): array
561562

562563
/**
563564
* Formats view template file names.
565+
* @return string[]
564566
*/
565567
public function formatTemplateFiles(): array
566568
{

src/Bridges/ApplicationDI/ApplicationExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ public function beforeCompile()
151151
}
152152

153153

154+
/** @return string[] */
154155
private function findPresenters(): array
155156
{
156157
$config = $this->getConfig();

src/Bridges/ApplicationDI/LatteExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ public static function initLattePanel(
114114
Nette\Application\UI\TemplateFactory $factory,
115115
Tracy\Bar $bar,
116116
bool $all = false
117-
) {
117+
): void
118+
{
118119
if (!$factory instanceof ApplicationLatte\TemplateFactory) {
119120
return;
120121
}

tests/Bridges.DI/RoutingExtension.cache.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ test('', function () {
7676
});
7777

7878

79-
Assert::exception(function () {
80-
function myRouterFactory(): Nette\Routing\Router
81-
{
82-
return new Route('path', function () {});
83-
}
79+
function myRouterFactory(): Nette\Routing\Router
80+
{
81+
return new Route('path', function () {});
82+
}
8483

8584

85+
Assert::exception(function () {
8686
$loader = new DI\Config\Loader;
8787
$config = $loader->load(Tester\FileMock::create('
8888
routing:

0 commit comments

Comments
 (0)