@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2-service |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2-service |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2\Service; |
7 | 7 | |
8 | 8 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2-service |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2-service |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2\Service; |
7 | 7 | |
8 | 8 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2-service |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2-service |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2\Service; |
7 | 7 | |
8 | 8 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2-service |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2-service |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2\Service; |
7 | 7 | |
8 | 8 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2-service |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2-service |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2\Service; |
7 | 7 | |
8 | 8 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2-service |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2-service |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2\Service; |
7 | 7 | |
8 | 8 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2-service |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2-service |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2\Service; |
7 | 7 | |
8 | 8 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2-service |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2-service |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2\Service; |
7 | 7 | |
8 | 8 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2-service |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2-service |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2\Service; |
7 | 7 | |
8 | 8 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | /** |
20 | 20 | * @var array |
21 | 21 | */ |
22 | - protected static $listArgumentForMethodCache = []; |
|
22 | + protected static $listArgumentForMethodCache = [ ]; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @param callable $service |
@@ -54,17 +54,17 @@ discard block |
||
54 | 54 | $key = get_class($serviceObject) . '--' . $serviceMethod; |
55 | 55 | |
56 | 56 | if (array_key_exists($key, static::$listArgumentForMethodCache)) { |
57 | - return static::$listArgumentForMethodCache[$key]; |
|
57 | + return static::$listArgumentForMethodCache[ $key ]; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $r = new ReflectionObject($serviceObject); |
61 | 61 | $rParameters = $r->getMethod($serviceMethod)->getParameters(); |
62 | 62 | |
63 | - $arguments = []; |
|
63 | + $arguments = [ ]; |
|
64 | 64 | foreach ($rParameters as $rParameter) { |
65 | 65 | $position = $rParameter->getPosition(); |
66 | 66 | |
67 | - $arguments[$position] = [ |
|
67 | + $arguments[ $position ] = [ |
|
68 | 68 | 'name' => $rParameter->getName(), |
69 | 69 | 'defaultValue' => $rParameter->isDefaultValueAvailable() ? $rParameter->getDefaultValue() : null |
70 | 70 | ]; |
@@ -72,9 +72,9 @@ discard block |
||
72 | 72 | |
73 | 73 | ksort($arguments, SORT_NUMERIC); |
74 | 74 | |
75 | - $listArgument = []; |
|
75 | + $listArgument = [ ]; |
|
76 | 76 | foreach ($arguments as $argument) { |
77 | - $listArgument[$argument['name']] = $argument['defaultValue']; |
|
77 | + $listArgument[ $argument[ 'name' ] ] = $argument[ 'defaultValue' ]; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | return $listArgument; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * @throws Exception\FunctionArgumentNotFoundException |
95 | 95 | * @throws Exception\ArgumentNotFoundInTransientVarsException |
96 | 96 | */ |
97 | - public function buildArgumentsForService(callable $service, MetadataInterface $metadata, TransientVarsInterface $transientVars, array $args = []) |
|
97 | + public function buildArgumentsForService(callable $service, MetadataInterface $metadata, TransientVarsInterface $transientVars, array $args = [ ]) |
|
98 | 98 | { |
99 | 99 | $listArgument = $this->getListArgumentForService($service); |
100 | 100 | |
@@ -110,14 +110,14 @@ discard block |
||
110 | 110 | // } |
111 | 111 | |
112 | 112 | |
113 | - $arguments = []; |
|
113 | + $arguments = [ ]; |
|
114 | 114 | foreach ($listArgument as $name => $defaultValue) { |
115 | 115 | if (array_key_exists($name, $args)) { |
116 | - $arguments[$name] = $args[$name]; |
|
116 | + $arguments[ $name ] = $args[ $name ]; |
|
117 | 117 | continue; |
118 | 118 | } |
119 | 119 | |
120 | - $arguments[$name] = $defaultValue; |
|
120 | + $arguments[ $name ] = $defaultValue; |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | return $arguments; |