@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | */ |
249 | 249 | public function getAction($id) |
250 | 250 | { |
251 | - $id = (integer)$id; |
|
251 | + $id = (integer) $id; |
|
252 | 252 | foreach ($this->actions as $action) { |
253 | 253 | if ($id === $action->getId()) { |
254 | 254 | return $action; |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | throw new ArgumentNotNumericException($errMsg); |
284 | 284 | } |
285 | 285 | |
286 | - $join = (integer)$join; |
|
286 | + $join = (integer) $join; |
|
287 | 287 | |
288 | 288 | $actions = $this->getActions(); |
289 | 289 | |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | $hasActions = $this->hasActions; |
328 | 328 | |
329 | 329 | if ($hasActions && 0 === count($commonActions) && 0 === $actions->count()) { |
330 | - $stepName = (string)$this->getName(); |
|
330 | + $stepName = (string) $this->getName(); |
|
331 | 331 | $errMsg = sprintf('Шаг %s должен содержать одни действие или одно общее действие', $stepName); |
332 | 332 | throw new InvalidWorkflowDescriptorException($errMsg); |
333 | 333 | } |
@@ -357,12 +357,12 @@ discard block |
||
357 | 357 | $commonActionReference = $workflowDescriptor->getCommonAction($actionId); |
358 | 358 | |
359 | 359 | if (null === $commonActionReference) { |
360 | - $stepName = (string)$this->getName(); |
|
360 | + $stepName = (string) $this->getName(); |
|
361 | 361 | $errMsg = sprintf('Common-action %s указанное для шага %s не существует', $actionId, $stepName); |
362 | 362 | throw new InvalidWorkflowDescriptorException($errMsg); |
363 | 363 | } |
364 | 364 | } catch (\Exception $e) { |
365 | - $actionIdStr = (string)$actionId; |
|
365 | + $actionIdStr = (string) $actionId; |
|
366 | 366 | $errMsg = sprintf('Некорректный id для common-action: id %s', $actionIdStr); |
367 | 367 | throw new InvalidWorkflowDescriptorException($errMsg, $e->getCode(), $e); |
368 | 368 | } |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | $id = $this->getId(); |
395 | 395 | $descriptor->setAttribute('id', $id); |
396 | 396 | |
397 | - $name = (string)$this->getName(); |
|
397 | + $name = (string) $this->getName(); |
|
398 | 398 | $name = trim($name); |
399 | 399 | if (strlen($name) > 0) { |
400 | 400 | $nameEncode = XmlUtil::encode($name); |
@@ -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; |
@@ -1,8 +1,8 @@ discard block |
||
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\Loader\Traits; |
7 | 7 | |
8 | 8 | use DOMElement; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * @var array |
20 | 20 | */ |
21 | - protected $args = []; |
|
21 | + protected $args = []; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Возвращает аргументы |
@@ -1,8 +1,8 @@ discard block |
||
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\Loader\Traits; |
7 | 7 | |
8 | 8 | use DOMElement; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * @var string |
20 | 20 | */ |
21 | - protected $name; |
|
21 | + protected $name; |
|
22 | 22 | |
23 | 23 | |
24 | 24 | /** |
@@ -1,8 +1,8 @@ discard block |
||
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\Loader\Traits; |
7 | 7 | |
8 | 8 | use DOMElement; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * @var string |
20 | 20 | */ |
21 | - protected $type; |
|
21 | + protected $type; |
|
22 | 22 | |
23 | 23 | |
24 | 24 | /** |
@@ -1,8 +1,8 @@ discard block |
||
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\Loader; |
7 | 7 | |
8 | 8 | use DOMElement; |
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | */ |
18 | 18 | class ValidatorDescriptor extends AbstractDescriptor |
19 | 19 | implements Traits\ArgsInterface, |
20 | - Traits\TypeInterface, |
|
21 | - Traits\NameInterface, |
|
22 | - Traits\CustomArgInterface, |
|
23 | - WriteXmlInterface |
|
20 | + Traits\TypeInterface, |
|
21 | + Traits\NameInterface, |
|
22 | + Traits\CustomArgInterface, |
|
23 | + WriteXmlInterface |
|
24 | 24 | { |
25 | 25 | use Traits\ArgsTrait, Traits\TypeTrait, Traits\IdTrait, Traits\NameTrait; |
26 | 26 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | { |
27 | 27 | $content = null; |
28 | 28 | if ($resource instanceof UriInterface) { |
29 | - $uri = (string)$resource; |
|
29 | + $uri = (string) $resource; |
|
30 | 30 | $content = file_get_contents($uri); |
31 | 31 | } elseif (is_string($resource)) { |
32 | 32 | if (!file_exists($resource)) { |
@@ -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; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | $uri = $this->uriFactory($location); |
86 | 86 | $this->url = $uri; |
87 | 87 | |
88 | - $uriString = (string)$uri; |
|
88 | + $uriString = (string) $uri; |
|
89 | 89 | $meta = get_headers($uriString, 1); |
90 | 90 | |
91 | 91 | $lastModified = time(); |
@@ -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; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | if (!$element instanceof DOMElement) { |
56 | 56 | $errMsg = sprintf('Отсутствует элемен %s', $childName); |
57 | - $exception = new NotExistsRequiredElementException($errMsg); |
|
57 | + $exception = new NotExistsRequiredElementException($errMsg); |
|
58 | 58 | |
59 | 59 | throw $exception; |
60 | 60 | } |
@@ -144,12 +144,12 @@ discard block |
||
144 | 144 | */ |
145 | 145 | public static function getRequiredAttributeValue(DOMElement $node, $attributeName) |
146 | 146 | { |
147 | - $attributeName = (string)$attributeName; |
|
147 | + $attributeName = (string) $attributeName; |
|
148 | 148 | |
149 | 149 | $attribute = $node->attributes->getNamedItem($attributeName); |
150 | 150 | if (!$attribute) { |
151 | 151 | $errMsg = "Отсутствует атрибут {$attributeName} у тега {$node->nodeName}"; |
152 | - $exception = new NotExistsRequiredAttributeException($errMsg); |
|
152 | + $exception = new NotExistsRequiredAttributeException($errMsg); |
|
153 | 153 | $exception->setRequiredAttributeName($attributeName); |
154 | 154 | |
155 | 155 | throw $exception; |
@@ -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; |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | */ |
268 | 268 | public function getWorkflow($name, $validate = true) |
269 | 269 | { |
270 | - $name = (string)$name; |
|
270 | + $name = (string) $name; |
|
271 | 271 | if (!array_key_exists($name, $this->workflows)) { |
272 | 272 | $errMsg = sprintf('Нет workflow с именем %s', $name); |
273 | 273 | throw new FactoryException($errMsg); |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | */ |
298 | 298 | protected function loadWorkflow(WorkflowConfig $c, $validate = true) |
299 | 299 | { |
300 | - $validate = (boolean)$validate; |
|
300 | + $validate = (boolean) $validate; |
|
301 | 301 | try { |
302 | 302 | $c->descriptor = WorkflowLoader::load($c->url, $validate); |
303 | 303 | } catch (\Exception $e) { |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | |
327 | 327 | $basedir = $basedirAtr; |
328 | 328 | if (0 === strpos($basedir, '.')) { |
329 | - $basedir = dirname($pathWorkflowFile) . substr($basedir, 1); |
|
329 | + $basedir = dirname($pathWorkflowFile) . substr($basedir, 1); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | if (file_exists($basedir)) { |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | */ |
395 | 395 | public static function addDefaultPathToWorkflows($path) |
396 | 396 | { |
397 | - $path = (string)$path; |
|
397 | + $path = (string) $path; |
|
398 | 398 | |
399 | 399 | array_unshift(static::$defaultPathsToWorkflows, $path); |
400 | 400 | } |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | */ |
415 | 415 | public function saveWorkflow($name, WorkflowDescriptor $descriptor, $replace = false) |
416 | 416 | { |
417 | - $name = (string)$name; |
|
417 | + $name = (string) $name; |
|
418 | 418 | $c = array_key_exists($name, $this->workflows) ? $this->workflows[$name] : null; |
419 | 419 | |
420 | 420 | if (null !== $c && !$replace) { |
@@ -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; |