File tree Expand file tree Collapse file tree 15 files changed +33
-66
lines changed
tests/fixtures/Presenters Expand file tree Collapse file tree 15 files changed +33
-66
lines changed Original file line number Diff line number Diff line change 9
9
abstract class AbstractMenuItemsContainer implements IMenuItemsContainer
10
10
{
11
11
12
- /** @var IMenu */
13
- protected $ menu ;
12
+ protected IMenu $ menu ;
14
13
15
- /** @var ILinkGenerator */
16
- protected $ linkGenerator ;
14
+ protected ILinkGenerator $ linkGenerator ;
17
15
18
- /** @var Translator */
19
- protected $ translator ;
16
+ protected Translator $ translator ;
20
17
21
- /** @var IAuthorizator */
22
- protected $ authorizator ;
18
+ protected IAuthorizator $ authorizator ;
23
19
24
- /** @var IMenuItemFactory */
25
- protected $ menuItemFactory ;
20
+ protected IMenuItemFactory $ menuItemFactory ;
26
21
27
22
/** @var IMenuItem[] */
28
- private $ items = [];
23
+ private array $ items = [];
29
24
30
25
public function __construct (
31
26
IMenu $ menu ,
Original file line number Diff line number Diff line change 5
5
final class MenuItemAction
6
6
{
7
7
8
- /** @var string */
9
- public $ target ;
8
+ public string $ target ;
10
9
11
10
/** @var array<string, string> */
12
- public $ parameters = [];
11
+ public array $ parameters = [];
13
12
14
13
/**
15
14
* @param array<string, mixed> $array
Original file line number Diff line number Diff line change 5
5
final class MenuVisibility
6
6
{
7
7
8
- /** @var bool */
9
- public $ menu = true ;
8
+ public bool $ menu = true ;
10
9
11
- /** @var bool */
12
- public $ breadcrumbs = true ;
10
+ public bool $ breadcrumbs = true ;
13
11
14
- /** @var bool */
15
- public $ sitemap = true ;
12
+ public bool $ sitemap = true ;
16
13
17
14
}
Original file line number Diff line number Diff line change 7
7
final class TemplatePaths
8
8
{
9
9
10
- /**
11
- * @var string
12
- */
13
- public $ menu = __DIR__ . '/../UI/templates/menu.latte ' ;
10
+ public string $ menu = __DIR__ . '/../UI/templates/menu.latte ' ;
14
11
15
- /**
16
- * @var string
17
- */
18
- public $ breadcrumbs = __DIR__ . '/../UI/templates/breadcrumbs.latte ' ;
12
+ public string $ breadcrumbs = __DIR__ . '/../UI/templates/breadcrumbs.latte ' ;
19
13
20
- /**
21
- * @var string
22
- */
23
- public $ sitemap = __DIR__ . '/../UI/templates/sitemap.latte ' ;
14
+ public string $ sitemap = __DIR__ . '/../UI/templates/sitemap.latte ' ;
24
15
25
16
}
Original file line number Diff line number Diff line change 9
9
final class NetteLinkGenerator implements ILinkGenerator
10
10
{
11
11
12
- /** @var IRequest */
13
- private $ httpRequest ;
12
+ private IRequest $ httpRequest ;
14
13
15
- /** @var LinkGenerator */
16
- private $ linkGenerator ;
14
+ private LinkGenerator $ linkGenerator ;
17
15
18
16
public function __construct (IRequest $ httpRequest , LinkGenerator $ linkGenerator )
19
17
{
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ final class DefaultMenuLoader implements IMenuLoader
13
13
{
14
14
15
15
/** @var array<string, stdClass> */
16
- private $ items ;
16
+ private array $ items ;
17
17
18
18
/**
19
19
* @param array<string, stdClass> $items
Original file line number Diff line number Diff line change 12
12
final class Menu extends AbstractMenuItemsContainer implements IMenu
13
13
{
14
14
15
- /** @var IMenuLoader */
16
- private $ loader ;
15
+ private IMenuLoader $ loader ;
17
16
18
- /** @var string */
19
- private $ name ;
17
+ private string $ name ;
20
18
21
- /** @var TemplatePaths */
22
- private $ templateConfig ;
19
+ private TemplatePaths $ templateConfig ;
23
20
24
- /** @var Presenter */
25
- private $ activePresenter ;
21
+ private Presenter $ activePresenter ;
26
22
27
23
public function __construct (
28
24
ILinkGenerator $ linkGenerator ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ final class MenuContainer
6
6
{
7
7
8
8
/** @var IMenu[] */
9
- private $ menus = [];
9
+ private array $ menus = [];
10
10
11
11
public function getMenu (string $ name ): IMenu
12
12
{
Original file line number Diff line number Diff line change @@ -17,20 +17,16 @@ final class MenuItem extends AbstractMenuItemsContainer implements IMenuItem
17
17
use MenuItemData;
18
18
use MenuItemVisibility;
19
19
20
- /** @var string */
21
- private $ title ;
20
+ private string $ title ;
22
21
23
- /** @var MenuItemAction|null */
24
- private $ action ;
22
+ private ?MenuItemAction $ action = null ;
25
23
26
- /** @var string|null */
27
- private $ link ;
24
+ private ?string $ link = null ;
28
25
29
- /** @var bool */
30
- private $ active ;
26
+ private ?bool $ active = null ;
31
27
32
28
/** @var string[] */
33
- private $ include = [];
29
+ private array $ include = [];
34
30
35
31
public function __construct (
36
32
IMenu $ menu ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ trait MenuItemData
6
6
{
7
7
8
8
/** @var array<string, string> */
9
- private $ data = [];
9
+ private array $ data = [];
10
10
11
11
/**
12
12
* @return array<string, string>
You can’t perform that action at this time.
0 commit comments