@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | */ |
220 | 220 | public function setAutoExecute($autoExecute) |
221 | 221 | { |
222 | - $this->autoExecute = (boolean)$autoExecute; |
|
222 | + $this->autoExecute = (boolean) $autoExecute; |
|
223 | 223 | |
224 | 224 | return $this; |
225 | 225 | } |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | */ |
240 | 240 | public function setCommon($common) |
241 | 241 | { |
242 | - $this->common = (boolean)$common; |
|
242 | + $this->common = (boolean) $common; |
|
243 | 243 | |
244 | 244 | return $this; |
245 | 245 | } |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | */ |
260 | 260 | public function setView($view) |
261 | 261 | { |
262 | - $this->view = (string)$view; |
|
262 | + $this->view = (string) $view; |
|
263 | 263 | |
264 | 264 | return $this; |
265 | 265 | } |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | */ |
364 | 364 | public function setFinish($finish) |
365 | 365 | { |
366 | - $this->finish = (boolean)$finish; |
|
366 | + $this->finish = (boolean) $finish; |
|
367 | 367 | |
368 | 368 | return $this; |
369 | 369 | } |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | |
398 | 398 | $unconditionalResult = $this->getUnconditionalResult(); |
399 | 399 | if (null === $unconditionalResult && $conditionalResults->count() > 0) { |
400 | - $name = (string)$this->getName(); |
|
400 | + $name = (string) $this->getName(); |
|
401 | 401 | $errMsg = sprintf('Действие %s имеет условные условия, но не имеет запасного безусловного', $name); |
402 | 402 | throw new InvalidWorkflowDescriptorException($errMsg); |
403 | 403 | } |
@@ -436,14 +436,14 @@ discard block |
||
436 | 436 | $id = $this->getId(); |
437 | 437 | $descriptor->setAttribute('id', $id); |
438 | 438 | |
439 | - $name = (string)$this->getName(); |
|
439 | + $name = (string) $this->getName(); |
|
440 | 440 | $name = trim($name); |
441 | 441 | if (strlen($name) > 0) { |
442 | 442 | $nameEncode = XmlUtil::encode($name); |
443 | 443 | $descriptor->setAttribute('name', $nameEncode); |
444 | 444 | } |
445 | 445 | |
446 | - $view = (string)$this->getView(); |
|
446 | + $view = (string) $this->getView(); |
|
447 | 447 | $view = trim($view); |
448 | 448 | if (strlen($view) > 0) { |
449 | 449 | $viewEncode = XmlUtil::encode($view); |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/old-town-workflow |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/old-town-workflow |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\PhpUnitTest\Loader; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\PhpUnit\Test\Paths; |
@@ -37,8 +37,8 @@ |
||
37 | 37 | |
38 | 38 | $basedir = null; |
39 | 39 | foreach ($workflows as $name => $workflowItem) { |
40 | - $type = array_key_exists('type', $workflowItem) ? $workflowItem['type'] : WorkflowConfig::FILE_TYPE; |
|
41 | - $location = array_key_exists('location', $workflowItem) ? $workflowItem['location'] : ''; |
|
40 | + $type = array_key_exists('type', $workflowItem) ? $workflowItem['type'] : WorkflowConfig::FILE_TYPE; |
|
41 | + $location = array_key_exists('location', $workflowItem) ? $workflowItem['location'] : ''; |
|
42 | 42 | $config = $this->buildWorkflowConfig($basedir, $type, $location); |
43 | 43 | $this->workflows[$name] = $config; |
44 | 44 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/old-town-workflow |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/old-town-workflow |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\PhpUnitTest\Loader; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\PhpUnit\Test\Paths; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function getWorkflow($name, $validate = true) |
131 | 131 | { |
132 | - $name = (string)$name; |
|
132 | + $name = (string) $name; |
|
133 | 133 | if (!array_key_exists($name, $this->workflows)) { |
134 | 134 | $errMsg = sprintf('Нет workflow с именем %s', $name); |
135 | 135 | throw new FactoryException($errMsg); |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | } |
188 | 188 | |
189 | 189 | foreach ($workflows as $name => $workflowItem) { |
190 | - $callback = array_key_exists('callback', $workflowItem) ? $workflowItem['callback'] : null; |
|
190 | + $callback = array_key_exists('callback', $workflowItem) ? $workflowItem['callback'] : null; |
|
191 | 191 | if (!is_callable($callback)) { |
192 | - $errMsg = sprintf('Некорректный форма callback\'a для создания workflow с именем %s', $name); |
|
192 | + $errMsg = sprintf('Некорректный форма callback\'a для создания workflow с именем %s', $name); |
|
193 | 193 | throw new FactoryException($errMsg); |
194 | 194 | } |
195 | 195 | $this->workflows[$name] = new WorkflowConfig($callback); |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/old-town-workflow |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/old-town-workflow |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\PhpUnitTest\Loader; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\PhpUnit\Test\Paths; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $this->parseArgs($condition); |
63 | 63 | |
64 | 64 | if ($condition->hasAttribute('negate')) { |
65 | - $n = XmlUtil::getRequiredAttributeValue($condition, 'negate'); |
|
65 | + $n = XmlUtil::getRequiredAttributeValue($condition, 'negate'); |
|
66 | 66 | $nNormalize = strtolower($n); |
67 | 67 | |
68 | 68 | $this->negate = ('true' === $nNormalize || 'yes' === $nNormalize); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function setNegate($negate) |
88 | 88 | { |
89 | - $this->negate = (boolean)$negate; |
|
89 | + $this->negate = (boolean) $negate; |
|
90 | 90 | |
91 | 91 | return $this; |
92 | 92 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/old-town-workflow |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/old-town-workflow |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\PhpUnit\Utils; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\PhpUnit\Test\Paths; |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $sName = $stepDescriptor->getName(); |
124 | 124 | } |
125 | 125 | |
126 | - $result = sprintf('step #%s [%s]', $step, $sName); |
|
126 | + $result = sprintf('step #%s [%s]', $step, $sName); |
|
127 | 127 | return $result; |
128 | 128 | } |
129 | 129 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | parent::validate(); |
142 | 142 | |
143 | - $conditions = $this->getConditions(); |
|
143 | + $conditions = $this->getConditions(); |
|
144 | 144 | if (0 === $conditions->count()) { |
145 | 145 | $actionDescriptor = $this->getParent(); |
146 | 146 | if (!$actionDescriptor instanceof ActionDescriptor) { |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/old-town-workflow |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/old-town-workflow |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\PhpUnit\Utils; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\PhpUnit\Test\Paths; |
@@ -78,7 +78,7 @@ |
||
78 | 78 | */ |
79 | 79 | public function setVariableName($variableName) |
80 | 80 | { |
81 | - $this->variableName = (string)$variableName; |
|
81 | + $this->variableName = (string) $variableName; |
|
82 | 82 | |
83 | 83 | return $this; |
84 | 84 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/old-town-workflow |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/old-town-workflow |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\PhpUnit\Utils; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\PhpUnit\Test\Paths; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function getConditionsDescriptor() |
68 | 68 | { |
69 | - if (0 === $this->conditions->count()) { |
|
69 | + if (0 === $this->conditions->count()) { |
|
70 | 70 | return null; |
71 | 71 | } |
72 | 72 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $conditions = $this->getConditions(); |
87 | 87 | $countConditions = $conditions->count(); |
88 | 88 | |
89 | - if ($countConditions >1) { |
|
89 | + if ($countConditions > 1) { |
|
90 | 90 | $errMsg = 'Restriction может иметь только один вложенный Condition'; |
91 | 91 | throw new InvalidWorkflowDescriptorException($errMsg); |
92 | 92 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | try { |
120 | 120 | $conditionsDescriptor = $conditions->writeXml($dom); |
121 | 121 | } catch (\Exception $e) { |
122 | - $errMsg = 'Ошибка сохранения workflow'; |
|
122 | + $errMsg = 'Ошибка сохранения workflow'; |
|
123 | 123 | throw new InvalidWriteWorkflowException($errMsg, $e->getCode(), $e); |
124 | 124 | } |
125 | 125 |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/old-town-workflow |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/old-town-workflow |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\PhpUnit\Utils; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\PhpUnit\Test\Paths; |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | public function setStatus($status) |
239 | 239 | { |
240 | - $this->status = (string)$status; |
|
240 | + $this->status = (string) $status; |
|
241 | 241 | |
242 | 242 | return $this; |
243 | 243 | } |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | */ |
268 | 268 | public function setJoin($join) |
269 | 269 | { |
270 | - $this->join = (integer)$join; |
|
270 | + $this->join = (integer) $join; |
|
271 | 271 | |
272 | 272 | return $this; |
273 | 273 | } |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | public function setSplit($split) |
289 | 289 | { |
290 | - $this->split = (integer)$split; |
|
290 | + $this->split = (integer) $split; |
|
291 | 291 | |
292 | 292 | return $this; |
293 | 293 | } |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | */ |
308 | 308 | public function setStep($step) |
309 | 309 | { |
310 | - $this->step = (integer)$step; |
|
310 | + $this->step = (integer) $step; |
|
311 | 311 | $this->hasStep = true; |
312 | 312 | |
313 | 313 | return $this; |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | */ |
329 | 329 | public function setOwner($owner) |
330 | 330 | { |
331 | - $this->owner = (string)$owner; |
|
331 | + $this->owner = (string) $owner; |
|
332 | 332 | |
333 | 333 | return $this; |
334 | 334 | } |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | try { |
415 | 415 | $functionElement = $function->writeXml($dom); |
416 | 416 | } catch (\Exception $e) { |
417 | - $errMsg = 'Ошибка сохранения workflow. Ошибка в post-function'; |
|
417 | + $errMsg = 'Ошибка сохранения workflow. Ошибка в post-function'; |
|
418 | 418 | throw new InvalidWriteWorkflowException($errMsg, $e->getCode(), $e); |
419 | 419 | } |
420 | 420 | |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | try { |
445 | 445 | $functionElement = $function->writeXml($dom); |
446 | 446 | } catch (\Exception $e) { |
447 | - $errMsg = 'Ошибка сохранения workflow. Ошибка в pre-function'; |
|
447 | + $errMsg = 'Ошибка сохранения workflow. Ошибка в pre-function'; |
|
448 | 448 | throw new InvalidWriteWorkflowException($errMsg, $e->getCode(), $e); |
449 | 449 | } |
450 | 450 | $preFunctionsElements->appendChild($functionElement); |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | $parent = $this->getParent(); |
573 | 573 | if ((null === $split) && (null === $join) && !($parent instanceof ActionDescriptor && ($parent->isFinish()))) { |
574 | 574 | $errMsg = ''; |
575 | - $id = (integer)$this->getId(); |
|
575 | + $id = (integer) $this->getId(); |
|
576 | 576 | if (is_numeric($id)) { |
577 | 577 | $errMsg .= sprintf('#%s:', $id); |
578 | 578 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/old-town-workflow |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/old-town-workflow |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\PhpUnit\Utils; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\PhpUnit\Test\Paths; |
@@ -101,7 +101,7 @@ |
||
101 | 101 | $errMsg = 'Отсутствует атрибут id'; |
102 | 102 | throw new InvalidDescriptorException($errMsg); |
103 | 103 | } |
104 | - $id = $this->getId(); |
|
104 | + $id = $this->getId(); |
|
105 | 105 | $descriptor->setAttribute('id', $id); |
106 | 106 | |
107 | 107 | $results = $this->getResults(); |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/old-town-workflow |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/old-town-workflow |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\PhpUnit\Utils; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\PhpUnit\Test\Paths; |