@@ -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(); |
@@ -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 |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * @param array $options |
53 | 53 | */ |
54 | - public function __construct(array $options = []) |
|
54 | + public function __construct(array $options = [ ]) |
|
55 | 55 | { |
56 | - call_user_func_array([$this, 'init'], $options); |
|
56 | + call_user_func_array([ $this, 'init' ], $options); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * |
75 | 75 | * @throws Exception\ErrorCreatingValidatorException |
76 | 76 | */ |
77 | - public function getValidator($type, array $args = []) |
|
77 | + public function getValidator($type, array $args = [ ]) |
|
78 | 78 | { |
79 | 79 | try { |
80 | 80 | $wrapper = $this->wrapperFactory($type, $args, ServiceTypeResolver\ValidatorWrapper::class); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * |
93 | 93 | * @throws Exception\ErrorCreatingRegisterException |
94 | 94 | */ |
95 | - public function getRegister($type, array $args = []) |
|
95 | + public function getRegister($type, array $args = [ ]) |
|
96 | 96 | { |
97 | 97 | try { |
98 | 98 | $wrapper = $this->wrapperFactory($type, $args, ServiceTypeResolver\RegisterWrapper::class); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * |
111 | 111 | * @throws Exception\ErrorCreatingFunctionException |
112 | 112 | */ |
113 | - public function getFunction($type, array $args = []) |
|
113 | + public function getFunction($type, array $args = [ ]) |
|
114 | 114 | { |
115 | 115 | try { |
116 | 116 | $wrapper = $this->wrapperFactory($type, $args, ServiceTypeResolver\FunctionWrapper::class); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * |
129 | 129 | * @throws Exception\ErrorCreatingConditionException |
130 | 130 | */ |
131 | - public function getCondition($type, array $args = []) |
|
131 | + public function getCondition($type, array $args = [ ]) |
|
132 | 132 | { |
133 | 133 | try { |
134 | 134 | $wrapper = $this->wrapperFactory($type, $args, ServiceTypeResolver\ConditionWrapper::class); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * @throws \Zend\ServiceManager\Exception\RuntimeException |
168 | 168 | * @throws Exception\InvalidServiceException |
169 | 169 | */ |
170 | - protected function wrapperFactory($type, array $args = [], $classWrapper) |
|
170 | + protected function wrapperFactory($type, array $args = [ ], $classWrapper) |
|
171 | 171 | { |
172 | 172 | if (static::SERVICE_TYPE !== $type) { |
173 | 173 | return null; |
@@ -177,16 +177,16 @@ discard block |
||
177 | 177 | $errMsg = sprintf('Argument %s not found', static::SERVICE_NAME); |
178 | 178 | throw new Exception\InvalidServiceNameException($errMsg); |
179 | 179 | } |
180 | - $serviceName = $args[static::SERVICE_NAME]; |
|
180 | + $serviceName = $args[ static::SERVICE_NAME ]; |
|
181 | 181 | |
182 | 182 | if (!array_key_exists(static::SERVICE_METHOD, $args)) { |
183 | 183 | $errMsg = sprintf('Argument %s not found', static::SERVICE_METHOD); |
184 | 184 | throw new Exception\InvalidServiceNameException($errMsg); |
185 | 185 | } |
186 | - $serviceMethod = $args[static::SERVICE_METHOD]; |
|
186 | + $serviceMethod = $args[ static::SERVICE_METHOD ]; |
|
187 | 187 | |
188 | 188 | $service = $this->getWorkflowServiceManager()->get($serviceName); |
189 | - $serviceCallback = [$service, $serviceMethod]; |
|
189 | + $serviceCallback = [ $service, $serviceMethod ]; |
|
190 | 190 | |
191 | 191 | if (!is_callable($serviceCallback)) { |
192 | 192 | $errMsg = sprintf('Service name %s and method %s', $serviceName, $serviceMethod); |