@@ -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\Loader; |
7 | 7 | |
8 | 8 | use DOMElement; |
@@ -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\Loader; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\Exception\FactoryException; |
@@ -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\Query; |
7 | 7 | |
8 | 8 | /** |
@@ -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\Query; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\Exception\ArgumentNotNumericException; |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $this->setContext($context); |
174 | 174 | $this->setField($field); |
175 | 175 | $this->setOperator($operator); |
176 | - $this->negate = (boolean)$negate; |
|
176 | + $this->negate = (boolean) $negate; |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | throw new ArgumentNotNumericException($errMsg); |
225 | 225 | } |
226 | 226 | |
227 | - $this->context = (integer)$context; |
|
227 | + $this->context = (integer) $context; |
|
228 | 228 | |
229 | 229 | return $this; |
230 | 230 | } |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | throw new ArgumentNotNumericException($errMsg); |
254 | 254 | } |
255 | 255 | |
256 | - $this->field = (integer)$field; |
|
256 | + $this->field = (integer) $field; |
|
257 | 257 | |
258 | 258 | return $this; |
259 | 259 | } |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | throw new ArgumentNotNumericException($errMsg); |
283 | 283 | } |
284 | 284 | |
285 | - $this->operator = (integer)$operator; |
|
285 | + $this->operator = (integer) $operator; |
|
286 | 286 | |
287 | 287 | return $this; |
288 | 288 | } |
@@ -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\Query; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\Exception\ArgumentNotNumericException; |
@@ -89,7 +89,7 @@ |
||
89 | 89 | throw new ArgumentNotNumericException($errMsg); |
90 | 90 | } |
91 | 91 | |
92 | - $this->expressionOperator = (integer)$expressionOperator; |
|
92 | + $this->expressionOperator = (integer) $expressionOperator; |
|
93 | 93 | |
94 | 94 | return $this; |
95 | 95 | } |
@@ -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\Query; |
7 | 7 | |
8 | 8 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function setOrderBy($orderBy) |
90 | 90 | { |
91 | - $this->orderBy = (integer)$orderBy; |
|
91 | + $this->orderBy = (integer) $orderBy; |
|
92 | 92 | |
93 | 93 | return $this; |
94 | 94 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function setSortOrder($sortOrder) |
109 | 109 | { |
110 | - $this->sortOrder = (integer)$sortOrder; |
|
110 | + $this->sortOrder = (integer) $sortOrder; |
|
111 | 111 | |
112 | 112 | return $this; |
113 | 113 | } |
@@ -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; |
7 | 7 | |
8 | 8 | use OldTown\PropertySet\PropertySetInterface; |
@@ -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\Spi; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\Exception\ArgumentNotNumericException; |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $errMsg = sprintf('Аргумент должен быть числом. Актуальное значение %s', $actionId); |
108 | 108 | throw new ArgumentNotNumericException($errMsg); |
109 | 109 | } |
110 | - $this->actionId = (integer)$actionId; |
|
110 | + $this->actionId = (integer) $actionId; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | return $this; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function setCaller($caller = null) |
133 | 133 | { |
134 | - $this->caller = (null !== $caller) ? (string)$caller : null; |
|
134 | + $this->caller = (null !== $caller) ? (string) $caller : null; |
|
135 | 135 | |
136 | 136 | return $this; |
137 | 137 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | throw new ArgumentNotNumericException($errMsg); |
185 | 185 | } |
186 | 186 | |
187 | - $this->entryId = (integer)$entryId; |
|
187 | + $this->entryId = (integer) $entryId; |
|
188 | 188 | |
189 | 189 | return $this; |
190 | 190 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $errMsg = sprintf('Аргумент должен быть числом. Актуальное значение %s', $id); |
236 | 236 | throw new ArgumentNotNumericException($errMsg); |
237 | 237 | } |
238 | - $this->id = (integer)$id; |
|
238 | + $this->id = (integer) $id; |
|
239 | 239 | return $this; |
240 | 240 | } |
241 | 241 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | public function setOwner($owner) |
259 | 259 | { |
260 | - $this->owner = (string)$owner; |
|
260 | + $this->owner = (string) $owner; |
|
261 | 261 | return $this; |
262 | 262 | } |
263 | 263 | |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | */ |
326 | 326 | public function setStatus($status) |
327 | 327 | { |
328 | - $this->status = (string)$status; |
|
328 | + $this->status = (string) $status; |
|
329 | 329 | |
330 | 330 | return $this; |
331 | 331 | } |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $errMsg = sprintf('Аргумент должен быть числом. Актуальное значение %s', $stepId); |
355 | 355 | throw new ArgumentNotNumericException($errMsg); |
356 | 356 | } |
357 | - $this->stepId = (integer)$stepId; |
|
357 | + $this->stepId = (integer) $stepId; |
|
358 | 358 | |
359 | 359 | return $this; |
360 | 360 | } |
@@ -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\Spi; |
7 | 7 | |
8 | 8 | use OldTown\Workflow\Exception\ArgumentNotNumericException; |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function __construct($id, $workflowName, $state) |
51 | 51 | { |
52 | - $this->id = (integer)$id; |
|
53 | - $this->state = (integer)$state; |
|
54 | - $this->workflowName = (string)$workflowName; |
|
52 | + $this->id = (integer) $id; |
|
53 | + $this->state = (integer) $state; |
|
54 | + $this->workflowName = (string) $workflowName; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $errMsg = sprintf('Аргумент должен быть числом. Актуальное значение %s', $id); |
80 | 80 | throw new ArgumentNotNumericException($errMsg); |
81 | 81 | } |
82 | - $this->id = (integer)$id; |
|
82 | + $this->id = (integer) $id; |
|
83 | 83 | |
84 | 84 | return $this; |
85 | 85 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function setInitialized($initialized) |
94 | 94 | { |
95 | - $this->initialized = (boolean)$initialized; |
|
95 | + $this->initialized = (boolean) $initialized; |
|
96 | 96 | |
97 | 97 | return $this; |
98 | 98 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $errMsg = sprintf('Аргумент должен быть числом. Актуальное значение %s', $state); |
132 | 132 | throw new ArgumentNotNumericException($errMsg); |
133 | 133 | } |
134 | - $this->state = (integer)$state; |
|
134 | + $this->state = (integer) $state; |
|
135 | 135 | |
136 | 136 | return $this; |
137 | 137 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | */ |
156 | 156 | public function setWorkflowName($workflowName) |
157 | 157 | { |
158 | - $this->workflowName = (string)$workflowName; |
|
158 | + $this->workflowName = (string) $workflowName; |
|
159 | 159 | |
160 | 160 | return $this; |
161 | 161 | } |