@@ -28,9 +28,9 @@ |
||
28 | 28 | { |
29 | 29 | /** @var array $appConfig */ |
30 | 30 | $appConfig = $serviceLocator->get('config'); |
31 | - $config = []; |
|
31 | + $config = [ ]; |
|
32 | 32 | if (array_key_exists(Module::CONFIG_KEY, $appConfig)) { |
33 | - $config = $appConfig[Module::CONFIG_KEY]; |
|
33 | + $config = $appConfig[ Module::CONFIG_KEY ]; |
|
34 | 34 | } |
35 | 35 | $moduleOptions = new ModuleOptions($config); |
36 | 36 | return $moduleOptions; |
@@ -87,7 +87,7 @@ |
||
87 | 87 | public function init(ModuleManagerInterface $manager) |
88 | 88 | { |
89 | 89 | if (!$manager instanceof ModuleManager) { |
90 | - $errMsg =sprintf('Module manager not implement %s', ModuleManager::class); |
|
90 | + $errMsg = sprintf('Module manager not implement %s', ModuleManager::class); |
|
91 | 91 | throw new Exception\ErrorInitModuleException($errMsg); |
92 | 92 | } |
93 | 93 | /** @var ModuleManager $manager */ |
@@ -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 |
@@ -25,13 +25,13 @@ |
||
25 | 25 | * |
26 | 26 | * @throws \OldTown\Workflow\ZF2\Service\TypeResolver\ServiceTypeResolver\Exception\RuntimeException |
27 | 27 | */ |
28 | - public function passesCondition(TransientVarsInterface $transientVars, array $args = [], PropertySetInterface $ps) |
|
28 | + public function passesCondition(TransientVarsInterface $transientVars, array $args = [ ], PropertySetInterface $ps) |
|
29 | 29 | { |
30 | 30 | $serviceUtil = $this->getServiceUtil(); |
31 | 31 | $service = $this->getService(); |
32 | 32 | $metadata = $this->getMetadata(); |
33 | 33 | $listArguments = $serviceUtil->buildArgumentsForService($service, $metadata, $transientVars, $args); |
34 | 34 | |
35 | - return (boolean)call_user_func_array($service, $listArguments); |
|
35 | + return (boolean) call_user_func_array($service, $listArguments); |
|
36 | 36 | } |
37 | 37 | } |
@@ -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 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | * |
29 | 29 | * @throws \OldTown\Workflow\ZF2\Service\TypeResolver\ServiceTypeResolver\Exception\RuntimeException |
30 | 30 | */ |
31 | - public function registerVariable(WorkflowContextInterface $context, WorkflowEntryInterface $entry, array $args = [], PropertySetInterface $ps) |
|
31 | + public function registerVariable(WorkflowContextInterface $context, WorkflowEntryInterface $entry, array $args = [ ], PropertySetInterface $ps) |
|
32 | 32 | { |
33 | 33 | $serviceUtil = $this->getServiceUtil(); |
34 | 34 | $service = $this->getService(); |
@@ -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 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * |
24 | 24 | * @throws \OldTown\Workflow\ZF2\Service\TypeResolver\ServiceTypeResolver\Exception\RuntimeException |
25 | 25 | */ |
26 | - public function validate(TransientVarsInterface $transientVars, array $args = [], PropertySetInterface $ps) |
|
26 | + public function validate(TransientVarsInterface $transientVars, array $args = [ ], PropertySetInterface $ps) |
|
27 | 27 | { |
28 | 28 | $serviceUtil = $this->getServiceUtil(); |
29 | 29 | $service = $this->getService(); |
@@ -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 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @throws \OldTown\Workflow\ZF2\Service\TypeResolver\ServiceTypeResolver\Exception\InvalidFunctionResultException |
28 | 28 | * @throws \OldTown\Workflow\ZF2\Service\TypeResolver\ServiceTypeResolver\Exception\InvalidMapResultException |
29 | 29 | */ |
30 | - public function execute(TransientVarsInterface $transientVars, array $args = [], PropertySetInterface $ps) |
|
30 | + public function execute(TransientVarsInterface $transientVars, array $args = [ ], PropertySetInterface $ps) |
|
31 | 31 | { |
32 | 32 | $serviceUtil = $this->getServiceUtil(); |
33 | 33 | $service = $this->getService(); |
@@ -55,19 +55,19 @@ discard block |
||
55 | 55 | $errMsg = sprintf('Data already exist named %s', $to); |
56 | 56 | throw new Exception\InvalidMapResultException($errMsg); |
57 | 57 | } |
58 | - $transientVars[$to] = $value; |
|
58 | + $transientVars[ $to ] = $value; |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | |
62 | 62 | $resultVariableName = $metadata->getResultVariableName(); |
63 | 63 | if (null !== $resultVariableName && array_key_exists($resultVariableName, $args)) { |
64 | - $resultVariableKey = $args[$resultVariableName]; |
|
64 | + $resultVariableKey = $args[ $resultVariableName ]; |
|
65 | 65 | |
66 | 66 | if ($transientVars->offsetExists($resultVariableKey) && false === $metadata->isAllowOverrideResult()) { |
67 | 67 | $errMsg = sprintf('Data already exist named %s', $resultVariableKey); |
68 | 68 | throw new Exception\InvalidMapResultException($errMsg); |
69 | 69 | } |
70 | - $transientVars[$resultVariableKey] = $result; |
|
70 | + $transientVars[ $resultVariableKey ] = $result; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | } |
@@ -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 |
@@ -130,7 +130,7 @@ |
||
130 | 130 | */ |
131 | 131 | public function setServiceUtilClassName($serviceUtilClassName) |
132 | 132 | { |
133 | - $this->serviceUtilClassName = (string)$serviceUtilClassName; |
|
133 | + $this->serviceUtilClassName = (string) $serviceUtilClassName; |
|
134 | 134 | $this->serviceUtil = null; |
135 | 135 | |
136 | 136 | return $this; |
@@ -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 |
@@ -33,5 +33,5 @@ |
||
33 | 33 | * |
34 | 34 | * @return array |
35 | 35 | */ |
36 | - public function buildArgumentsForService(callable $service, MetadataInterface $metadata, TransientVarsInterface $transientVars, array $args = []); |
|
36 | + public function buildArgumentsForService(callable $service, MetadataInterface $metadata, TransientVarsInterface $transientVars, array $args = [ ]); |
|
37 | 37 | } |
@@ -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 | |
@@ -112,30 +112,30 @@ discard block |
||
112 | 112 | // } |
113 | 113 | |
114 | 114 | |
115 | - $arguments = []; |
|
115 | + $arguments = [ ]; |
|
116 | 116 | foreach ($listArgument as $name => $defaultValue) { |
117 | 117 | if (array_key_exists($name, $argumentsMap)) { |
118 | - $argName = $argumentsMap[$name]; |
|
118 | + $argName = $argumentsMap[ $name ]; |
|
119 | 119 | if (array_key_exists($argName, $args)) { |
120 | - $key = $args[$argName]; |
|
120 | + $key = $args[ $argName ]; |
|
121 | 121 | if ($transientVars->offsetExists($key)) { |
122 | - $arguments[$name] = $transientVars[$key]; |
|
122 | + $arguments[ $name ] = $transientVars[ $key ]; |
|
123 | 123 | continue; |
124 | 124 | } |
125 | 125 | } |
126 | 126 | } |
127 | 127 | |
128 | 128 | if ($transientVars->offsetExists($name)) { |
129 | - $arguments[$name] = $transientVars[$name]; |
|
129 | + $arguments[ $name ] = $transientVars[ $name ]; |
|
130 | 130 | continue; |
131 | 131 | } |
132 | 132 | |
133 | 133 | if (array_key_exists($name, $args)) { |
134 | - $arguments[$name] = $args[$name]; |
|
134 | + $arguments[ $name ] = $args[ $name ]; |
|
135 | 135 | continue; |
136 | 136 | } |
137 | 137 | |
138 | - $arguments[$name] = $defaultValue; |
|
138 | + $arguments[ $name ] = $defaultValue; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | return $arguments; |
@@ -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 |