@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | - * @author Malofeykin Andrey <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | + * @author Malofeykin Andrey <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace OldTown\Workflow\ZF2\Toolkit; |
| 7 | 7 | |
| 8 | 8 | use OldTown\Workflow\ZF2\Toolkit\Options\ModuleOptions; |
@@ -17,6 +17,6 @@ |
||
| 17 | 17 | { |
| 18 | 18 | public function __construct() |
| 19 | 19 | { |
| 20 | - $this->entityMap['entry'] = ExtEntry::class; |
|
| 20 | + $this->entityMap[ 'entry' ] = ExtEntry::class; |
|
| 21 | 21 | } |
| 22 | 22 | } |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | - * @author Malofeykin Andrey <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | + * @author Malofeykin Andrey <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace OldTown\Workflow\ZF2\Toolkit\Validator; |
| 7 | 7 | |
| 8 | 8 | use Zend\Validator\AbstractValidator; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | const CONFIG_KEY = 'workflow_zf2_toolkit'; |
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | - * @return array |
|
| 39 | + * @return string[] |
|
| 40 | 40 | */ |
| 41 | 41 | public function getModuleDependencies() |
| 42 | 42 | { |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * @throws \Doctrine\ORM\NonUniqueResultException |
| 26 | 26 | * @throws \Doctrine\ORM\NoResultException |
| 27 | 27 | */ |
| 28 | - public function findEntryByObjectInfo($workflowName, array $objectHash = []) |
|
| 28 | + public function findEntryByObjectInfo($workflowName, array $objectHash = [ ]) |
|
| 29 | 29 | { |
| 30 | 30 | $entryClassName = ExtEntry::class; |
| 31 | 31 | |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | - * @author Malofeykin Andrey <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | + * @author Malofeykin Andrey <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace OldTown\Workflow\ZF2\Toolkit\DoctrineWorkflowStory; |
| 7 | 7 | |
| 8 | 8 | use Zend\Serializer\AdapterPluginManager as SerializerManager; |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | - * @author Malofeykin Andrey <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | + * @author Malofeykin Andrey <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace OldTown\Workflow\ZF2\Toolkit\Validator; |
| 7 | 7 | |
| 8 | 8 | use Zend\Validator\AbstractValidator; |
@@ -214,7 +214,7 @@ |
||
| 214 | 214 | * @param string $workflowName |
| 215 | 215 | * @param array $objectsInfo |
| 216 | 216 | * |
| 217 | - * @return ExtEntry|null |
|
| 217 | + * @return ExtEntry |
|
| 218 | 218 | * |
| 219 | 219 | * @throws Exception\InvalidGetEntryByObjectsInfoException |
| 220 | 220 | * @throws \Zend\Serializer\Exception\ExceptionInterface |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | - * @author Malofeykin Andrey <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | + * @author Malofeykin Andrey <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace OldTown\Workflow\ZF2\Toolkit\DoctrineWorkflowStory; |
| 7 | 7 | |
| 8 | 8 | use Zend\Serializer\AdapterPluginManager as SerializerManager; |
@@ -70,14 +70,14 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @param array $options |
| 72 | 72 | */ |
| 73 | - public function __construct(array $options = []) |
|
| 73 | + public function __construct(array $options = [ ]) |
|
| 74 | 74 | { |
| 75 | 75 | $initOptions = [ |
| 76 | - array_key_exists('serializerManager', $options) ? $options['serializerManager'] : null, |
|
| 77 | - array_key_exists('moduleOptions', $options) ? $options['moduleOptions'] : null, |
|
| 78 | - array_key_exists('workflowService', $options) ? $options['workflowService'] : null |
|
| 76 | + array_key_exists('serializerManager', $options) ? $options[ 'serializerManager' ] : null, |
|
| 77 | + array_key_exists('moduleOptions', $options) ? $options[ 'moduleOptions' ] : null, |
|
| 78 | + array_key_exists('workflowService', $options) ? $options[ 'workflowService' ] : null |
|
| 79 | 79 | ]; |
| 80 | - call_user_func_array([$this, 'init'], $initOptions); |
|
| 80 | + call_user_func_array([ $this, 'init' ], $initOptions); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -120,9 +120,9 @@ discard block |
||
| 120 | 120 | $serializer = $this->getSerializerManager()->get($serializerName); |
| 121 | 121 | |
| 122 | 122 | $id = $metadata->getIdentifierValues($object); |
| 123 | - $prepareId = []; |
|
| 123 | + $prepareId = [ ]; |
|
| 124 | 124 | foreach ($id as $idField => $idValue) { |
| 125 | - $prepareId[$idField] = (string)$idValue; |
|
| 125 | + $prepareId[ $idField ] = (string) $idValue; |
|
| 126 | 126 | } |
| 127 | 127 | $serializedId = $serializer->serialize($prepareId); |
| 128 | 128 | |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | * @throws Exception\InvalidGetEntryByObjectsInfoException |
| 221 | 221 | * @throws \Zend\Serializer\Exception\ExceptionInterface |
| 222 | 222 | */ |
| 223 | - public function getEntryByObjectsInfo($managerName, $workflowName, array $objectsInfo = []) |
|
| 223 | + public function getEntryByObjectsInfo($managerName, $workflowName, array $objectsInfo = [ ]) |
|
| 224 | 224 | { |
| 225 | 225 | try { |
| 226 | 226 | $workflowManager = $this->getWorkflowService()->getWorkflowManager($managerName); |
@@ -235,19 +235,19 @@ discard block |
||
| 235 | 235 | $em = $store->getEntityManager(); |
| 236 | 236 | |
| 237 | 237 | $serializer = $this->getSerializer(); |
| 238 | - $objectHash = []; |
|
| 238 | + $objectHash = [ ]; |
|
| 239 | 239 | foreach ($objectsInfo as $entityClassName => $item) { |
| 240 | 240 | $classMetadata = $em->getClassMetadata($entityClassName); |
| 241 | 241 | $identifierMetadata = $classMetadata->getIdentifier(); |
| 242 | 242 | |
| 243 | - $id = []; |
|
| 243 | + $id = [ ]; |
|
| 244 | 244 | |
| 245 | 245 | foreach ($identifierMetadata as $propertyName) { |
| 246 | 246 | if (!array_key_exists($propertyName, $item)) { |
| 247 | 247 | $errMsg = sprintf('Property %s not found', $propertyName); |
| 248 | 248 | throw new Exception\InvalidGetEntryByObjectsInfoException($errMsg); |
| 249 | 249 | } |
| 250 | - $id[$propertyName] = (string)$item[$propertyName]; |
|
| 250 | + $id[ $propertyName ] = (string) $item[ $propertyName ]; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | $serializedId = $serializer->serialize($id); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | $hash = $entityClassName . '_' . $serializedId; |
| 256 | 256 | $base64Hash = base64_encode($hash); |
| 257 | 257 | |
| 258 | - $objectHash[$base64Hash] = $base64Hash; |
|
| 258 | + $objectHash[ $base64Hash ] = $base64Hash; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | $extEntryClassName = $this->getModuleOptions()->getEntityClassName('DoctrineWorkflowStory\ExtEntry'); |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | - * @author Malofeykin Andrey <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @link https://github.com/old-town/workflow-zf2-toolkit |
|
| 4 | + * @author Malofeykin Andrey <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace OldTown\Workflow\ZF2\Toolkit\Validator; |
| 7 | 7 | |
| 8 | 8 | use Zend\Validator\AbstractValidator; |