@@ -23,19 +23,19 @@ |
||
23 | 23 | * |
24 | 24 | * @var string |
25 | 25 | */ |
26 | - const EVENT_RENDER = 'render'; |
|
26 | + const EVENT_RENDER = 'render'; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Запуск нового процесса workflow |
30 | 30 | * |
31 | 31 | * @var string |
32 | 32 | */ |
33 | - const EVENT_WORKFLOW_INITIALIZE = 'initialize'; |
|
33 | + const EVENT_WORKFLOW_INITIALIZE = 'initialize'; |
|
34 | 34 | |
35 | 35 | /** |
36 | 36 | * Запуск перехода между двумя действиями workflow |
37 | 37 | * |
38 | 38 | * @var string |
39 | 39 | */ |
40 | - const EVENT_DO_ACTION = 'doAction'; |
|
40 | + const EVENT_DO_ACTION = 'doAction'; |
|
41 | 41 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * |
21 | 21 | * @var string |
22 | 22 | */ |
23 | - const EVENT_CREATE = 'workflow.manager.create'; |
|
23 | + const EVENT_CREATE = 'workflow.manager.create'; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * @var WorkflowInterface |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2 |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2 |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2; |
7 | 7 | |
8 | 8 |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | $errMsg = 'Argument serviceLocator not found'; |
76 | 76 | throw new Exception\InvalidArgumentException($errMsg); |
77 | 77 | } |
78 | - $this->setServiceLocator($options['serviceLocator']); |
|
78 | + $this->setServiceLocator($options[ 'serviceLocator' ]); |
|
79 | 79 | |
80 | 80 | if (!array_key_exists('moduleOptions', $options)) { |
81 | 81 | $errMsg = 'Argument moduleOptions not found'; |
82 | 82 | throw new Exception\InvalidArgumentException($errMsg); |
83 | 83 | } |
84 | - $this->setModuleOptions($options['moduleOptions']); |
|
84 | + $this->setModuleOptions($options[ 'moduleOptions' ]); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | } |
260 | 260 | $workflowManagerServiceName = $this->getWorkflowManagerServiceName($managerName); |
261 | 261 | |
262 | - $manager = $this->getServiceLocator()->get($workflowManagerServiceName); |
|
262 | + $manager = $this->getServiceLocator()->get($workflowManagerServiceName); |
|
263 | 263 | |
264 | 264 | if (!$manager instanceof WorkflowInterface) { |
265 | 265 | $errMsg = sprintf('Workflow manager not implement %s', WorkflowInterface::class); |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | */ |
278 | 278 | public function getActionByName(WorkflowDescriptor $wf, $actionName) |
279 | 279 | { |
280 | - $actionName = (string)$actionName; |
|
280 | + $actionName = (string) $actionName; |
|
281 | 281 | |
282 | 282 | foreach ($wf->getGlobalActions() as $actionDescriptor) { |
283 | 283 | if ($actionName === $actionDescriptor->getName()) { |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | */ |
345 | 345 | public function setWorkflowManagerServiceNamePattern($workflowManagerServiceNamePattern) |
346 | 346 | { |
347 | - $this->workflowManagerServiceNamePattern = (string)$workflowManagerServiceNamePattern; |
|
347 | + $this->workflowManagerServiceNamePattern = (string) $workflowManagerServiceNamePattern; |
|
348 | 348 | |
349 | 349 | return $this; |
350 | 350 | } |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | throw new Exception\InvalidWorkflowManagerAliasException($errMsg); |
367 | 367 | } |
368 | 368 | |
369 | - return $aliasMap[$alias]; |
|
369 | + return $aliasMap[ $alias ]; |
|
370 | 370 | } |
371 | 371 | |
372 | 372 |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function setViewName($viewName) |
102 | 102 | { |
103 | - $this->viewName = (string)$viewName; |
|
103 | + $this->viewName = (string) $viewName; |
|
104 | 104 | |
105 | 105 | return $this; |
106 | 106 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function setEntryId($entryId) |
142 | 142 | { |
143 | - $this->entryId = (integer)$entryId; |
|
143 | + $this->entryId = (integer) $entryId; |
|
144 | 144 | |
145 | 145 | return $this; |
146 | 146 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2 |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2 |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2; |
7 | 7 | |
8 | 8 |
@@ -34,7 +34,7 @@ |
||
34 | 34 | public function createService(ServiceLocatorInterface $serviceLocator) |
35 | 35 | { |
36 | 36 | $caller = false; |
37 | - $appSm = method_exists($serviceLocator, 'getServiceLocator') ? call_user_func([$serviceLocator, 'getServiceLocator']) : null; |
|
37 | + $appSm = method_exists($serviceLocator, 'getServiceLocator') ? call_user_func([ $serviceLocator, 'getServiceLocator' ]) : null; |
|
38 | 38 | if ($appSm && $appSm->has('Application')) { |
39 | 39 | /** @var Application $app */ |
40 | 40 | $app = $appSm->get('Application'); |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2 |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2 |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2\Factory; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\Util\Properties\Properties; |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | |
115 | 115 | $event = new WorkflowManagerEvent(); |
116 | 116 | $event->setWorkflowManager($workflowManager) |
117 | - ->setName(WorkflowManagerEvent::EVENT_CREATE) |
|
118 | - ->setTarget($workflowManager); |
|
117 | + ->setName(WorkflowManagerEvent::EVENT_CREATE) |
|
118 | + ->setTarget($workflowManager); |
|
119 | 119 | $workflowService->getEventManager()->trigger($event); |
120 | 120 | } catch (\Exception $e) { |
121 | 121 | throw new Exception\FactoryException($e->getMessage(), $e->getCode(), $e); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | try { |
81 | 81 | $creationOptions = $this->getCreationOptions(); |
82 | 82 | if (array_key_exists(static::WORKFLOW_CONFIGURATION_NAME, $creationOptions)) { |
83 | - $this->setWorkflowConfigurationName($creationOptions[static::WORKFLOW_CONFIGURATION_NAME]); |
|
83 | + $this->setWorkflowConfigurationName($creationOptions[ static::WORKFLOW_CONFIGURATION_NAME ]); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** @var ModuleOptions $moduleOptions */ |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | */ |
222 | 222 | public function setWorkflowConfigurationName($workflowConfigurationName) |
223 | 223 | { |
224 | - $this->workflowConfigurationName = (string)$workflowConfigurationName; |
|
224 | + $this->workflowConfigurationName = (string) $workflowConfigurationName; |
|
225 | 225 | |
226 | 226 | return $this; |
227 | 227 | } |
@@ -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; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2 |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2 |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2; |
7 | 7 | |
8 | 8 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @var array |
28 | 28 | */ |
29 | - protected $options = []; |
|
29 | + protected $options = [ ]; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Возвращает имя сервиса |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function setName($name) |
55 | 55 | { |
56 | - $this->name = (string)$name; |
|
56 | + $this->name = (string) $name; |
|
57 | 57 | |
58 | 58 | return $this; |
59 | 59 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * |
34 | 34 | * @var array |
35 | 35 | */ |
36 | - protected $managerAliases = []; |
|
36 | + protected $managerAliases = [ ]; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @return array |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * |
93 | 93 | * @return $this |
94 | 94 | */ |
95 | - public function setManagerAliases(array $managerAliases = []) |
|
95 | + public function setManagerAliases(array $managerAliases = [ ]) |
|
96 | 96 | { |
97 | 97 | $this->managerAliases = $managerAliases; |
98 | 98 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | throw new Exception\InvalidManagerNameException($errMsg); |
117 | 117 | } |
118 | 118 | |
119 | - return new ManagerOptions($this->managers[$managerName]); |
|
119 | + return new ManagerOptions($this->managers[ $managerName ]); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | |
@@ -136,6 +136,6 @@ discard block |
||
136 | 136 | throw new Exception\InvalidConfigurationNameException($errMsg); |
137 | 137 | } |
138 | 138 | |
139 | - return new ConfigurationOptions($this->configurations[$configurationName]); |
|
139 | + return new ConfigurationOptions($this->configurations[ $configurationName ]); |
|
140 | 140 | } |
141 | 141 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/workflow-zf2 |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/workflow-zf2 |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\ZF2; |
7 | 7 | |
8 | 8 |