File tree Expand file tree Collapse file tree 7 files changed +14
-14
lines changed
tests/functional/src/Fixtures Expand file tree Collapse file tree 7 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class NetteConnector extends Client
25
25
*/
26
26
protected $ containerAccessor ;
27
27
28
- public function setContainerAccessor (callable $ containerAccessor )
28
+ public function setContainerAccessor (callable $ containerAccessor ): void
29
29
{
30
30
$ this ->containerAccessor = $ containerAccessor ;
31
31
}
@@ -53,7 +53,7 @@ public function doRequest($request)
53
53
$ _POST = $ request ->getParameters ();
54
54
}
55
55
56
- $ container = call_user_func ($ this ->containerAccessor );
56
+ $ container = ($ this ->containerAccessor )( );
57
57
58
58
$ httpRequest = $ container ->getByType (IRequest::class);
59
59
$ httpResponse = $ container ->getByType (IResponse::class);
Original file line number Diff line number Diff line change 16
16
*/
17
17
class RunTestInput extends ArgvInput
18
18
{
19
- public function __construct (InputDefinition $ definition = null )
19
+ public function __construct (? InputDefinition $ definition = null )
20
20
{
21
21
$ parameters = [$ _SERVER ['argv ' ][0 ], 'run ' ];
22
22
@@ -42,7 +42,7 @@ public function __construct(InputDefinition $definition = null)
42
42
parent ::__construct ($ parameters , $ definition );
43
43
}
44
44
45
- private function normalizePath ($ path )
45
+ private function normalizePath (string $ path ): string
46
46
{
47
47
return str_replace ('\\' , '/ ' , $ path );
48
48
}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function __construct(RequestFactory $factory)
32
32
$ this ->reset ();
33
33
}
34
34
35
- public function reset ()
35
+ public function reset (): void
36
36
{
37
37
$ this ->request = $ this ->factory ->createHttpRequest ();
38
38
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class Response implements IResponse
25
25
*/
26
26
private $ headers = [];
27
27
28
- public function reset ()
28
+ public function reset (): void
29
29
{
30
30
$ this ->code = self ::S200_OK ;
31
31
$ this ->headers = [];
Original file line number Diff line number Diff line change @@ -67,15 +67,15 @@ public function _after(TestInterface $test)
67
67
/**
68
68
* @param bool $followRedirects
69
69
*/
70
- public function followRedirects ($ followRedirects )
70
+ public function followRedirects (bool $ followRedirects ): void
71
71
{
72
72
$ this ->client ->followRedirects ($ followRedirects );
73
73
}
74
74
75
75
/**
76
76
* @param string $url
77
77
*/
78
- public function seeRedirectTo ($ url )
78
+ public function seeRedirectTo (string $ url ): void
79
79
{
80
80
if ($ this ->client ->isFollowingRedirects ()) {
81
81
$ this ->fail ('Method seeRedirectTo only works when followRedirects option is disabled ' );
@@ -89,7 +89,7 @@ public function seeRedirectTo($url)
89
89
}
90
90
}
91
91
92
- public function debugContent ()
92
+ public function debugContent (): void
93
93
{
94
94
$ this ->debugSection ('Content ' , $ this ->client ->getInternalResponse ()->getContent ());
95
95
}
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public function _after(TestInterface $test)
78
78
}
79
79
}
80
80
81
- public function useConfigFiles (array $ configFiles )
81
+ public function useConfigFiles (array $ configFiles ): void
82
82
{
83
83
if (!$ this ->config ['newContainerForEachTest ' ]) {
84
84
$ this ->fail ('The useConfigFiles can only be used if the newContainerForEachTest option is set to true. ' );
@@ -92,7 +92,7 @@ public function useConfigFiles(array $configFiles)
92
92
/**
93
93
* @return Container
94
94
*/
95
- public function getContainer ()
95
+ public function getContainer (): Container
96
96
{
97
97
if (!$ this ->container ) {
98
98
$ this ->createContainer ();
@@ -106,7 +106,7 @@ public function getContainer()
106
106
*
107
107
* @return object
108
108
*/
109
- public function grabService ($ service )
109
+ public function grabService (string $ service )
110
110
{
111
111
try {
112
112
return $ this ->getContainer ()->getByType ($ service );
@@ -115,7 +115,7 @@ public function grabService($service)
115
115
}
116
116
}
117
117
118
- private function createContainer ()
118
+ private function createContainer (): void
119
119
{
120
120
$ configurator = new Configurator ();
121
121
if ($ this ->config ['removeDefaultExtensions ' ]) {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class RouterFactory extends Object
17
17
/**
18
18
* @return IRouter
19
19
*/
20
- public function create ()
20
+ public function create (): IRouter
21
21
{
22
22
$ router = new RouteList ();
23
23
$ router [] = new Route ('<presenter>[/<action>[/<id>]] ' , 'Homepage:default ' );
You can’t perform that action at this time.
0 commit comments