@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | $p = XmlUtil::getChildElement($root, 'persistence'); |
| 204 | 204 | $resolver = XmlUtil::getChildElement($root, 'resolver'); |
| 205 | - $factoryElement = XmlUtil::getChildElement($root, 'factory'); |
|
| 205 | + $factoryElement = XmlUtil::getChildElement($root, 'factory'); |
|
| 206 | 206 | |
| 207 | 207 | |
| 208 | 208 | if (null !== $resolver && $resolver->hasAttribute('class')) { |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | } catch (FactoryException $e) { |
| 265 | 265 | throw $e; |
| 266 | 266 | } catch (\Exception $e) { |
| 267 | - $class = (string)$class; |
|
| 267 | + $class = (string) $class; |
|
| 268 | 268 | $errMsg = "Ошибка создания фабрики workflow для класса {$class}"; |
| 269 | 269 | throw new FactoryException($errMsg, $e->getCode(), $e); |
| 270 | 270 | } |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | protected function getContentConfigFile(UriInterface $url = null) |
| 291 | 291 | { |
| 292 | 292 | if (null !== $url) { |
| 293 | - $urlStr = (string)$url; |
|
| 293 | + $urlStr = (string) $url; |
|
| 294 | 294 | $content = file_get_contents($urlStr); |
| 295 | 295 | |
| 296 | 296 | return $content; |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | */ |
| 340 | 340 | public static function addDefaultPathToConfig($path) |
| 341 | 341 | { |
| 342 | - $path = (string)$path; |
|
| 342 | + $path = (string) $path; |
|
| 343 | 343 | |
| 344 | 344 | array_unshift(self::$defaultPathsToConfig, $path); |
| 345 | 345 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function setRequiredAttributeName($requiredAttributeName) |
| 36 | 36 | { |
| 37 | - $this->requiredAttributeName = (string)$requiredAttributeName; |
|
| 37 | + $this->requiredAttributeName = (string) $requiredAttributeName; |
|
| 38 | 38 | |
| 39 | 39 | return $this; |
| 40 | 40 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @var bool |
| 28 | 28 | */ |
| 29 | - protected $hasId =false; |
|
| 29 | + protected $hasId = false; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * id дескриптора |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function setEntityId($entityId) |
| 64 | 64 | { |
| 65 | - $this->entityId = (integer)$entityId; |
|
| 65 | + $this->entityId = (integer) $entityId; |
|
| 66 | 66 | |
| 67 | 67 | return $this; |
| 68 | 68 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public function setId($id) |
| 116 | 116 | { |
| 117 | - $this->id = (integer)$id; |
|
| 117 | + $this->id = (integer) $id; |
|
| 118 | 118 | $this->hasId = true; |
| 119 | 119 | |
| 120 | 120 | return $this; |
@@ -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); |
@@ -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 | } |
@@ -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); |
@@ -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 | } |
@@ -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) { |
@@ -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 | } |