| @@ -19,7 +19,7 @@ discard block | ||
| 19 | 19 | /** | 
| 20 | 20 | * @var Cloner\RelationOptions[] | 
| 21 | 21 | */ | 
| 22 | - protected $relations = []; | |
| 22 | + protected $relations = [ ]; | |
| 23 | 23 | |
| 24 | 24 | /** | 
| 25 | 25 | * @return Cloner\RelationOptions[] | 
| @@ -37,7 +37,7 @@ discard block | ||
| 37 | 37 | public function setRelations($relations) | 
| 38 | 38 |      { | 
| 39 | 39 |          foreach ($relations as $name => $options) { | 
| 40 | - $this->relations[$name] = new Cloner\RelationOptions($options); | |
| 40 | + $this->relations[ $name ] = new Cloner\RelationOptions($options); | |
| 41 | 41 | } | 
| 42 | 42 | return $this; | 
| 43 | 43 | } | 
| @@ -18,7 +18,7 @@ | ||
| 18 | 18 | /** | 
| 19 | 19 | * @var array | 
| 20 | 20 | */ | 
| 21 | - private $cloners = []; | |
| 21 | + private $cloners = [ ]; | |
| 22 | 22 | |
| 23 | 23 | /** | 
| 24 | 24 | * @return array | 
| @@ -47,9 +47,9 @@ discard block | ||
| 47 | 47 | $this->clonersConfig = $this->getClonersConfig($serviceManager); | 
| 48 | 48 | } | 
| 49 | 49 |          if (array_key_exists($requestedName, $this->clonersConfig)) { | 
| 50 | -            if (array_key_exists('class', $this->clonersConfig[$requestedName])) { | |
| 50 | +            if (array_key_exists('class', $this->clonersConfig[ $requestedName ])) { | |
| 51 | 51 | $class = Cloner::class; | 
| 52 | - return is_a($this->clonersConfig[$requestedName]['class'], $class, true); | |
| 52 | + return is_a($this->clonersConfig[ $requestedName ][ 'class' ], $class, true); | |
| 53 | 53 |              } else { | 
| 54 | 54 | return true; | 
| 55 | 55 | } | 
| @@ -67,8 +67,8 @@ discard block | ||
| 67 | 67 | */ | 
| 68 | 68 | public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) | 
| 69 | 69 |      { | 
| 70 | - Assertion::isArray($this->clonersConfig[$requestedName]); | |
| 71 | - $options = new Options\ClonerOptions($this->clonersConfig[$requestedName]); | |
| 70 | + Assertion::isArray($this->clonersConfig[ $requestedName ]); | |
| 71 | + $options = new Options\ClonerOptions($this->clonersConfig[ $requestedName ]); | |
| 72 | 72 | |
| 73 | 73 | Assertion::isInstanceOf($serviceLocator, ClonerManagerInterface::class); | 
| 74 | 74 | Assertion::isInstanceOf($options, Options\ClonerOptions::class); | 
| @@ -26,7 +26,7 @@ discard block | ||
| 26 | 26 | */ | 
| 27 | 27 | protected function cloneToMany($array, $parentObject = null, $parentName = null) | 
| 28 | 28 |      { | 
| 29 | - $newArray = []; | |
| 29 | + $newArray = [ ]; | |
| 30 | 30 |          foreach ($array as $item) { | 
| 31 | 31 |              if (is_object($item)) { | 
| 32 | 32 | $clone = clone $item; | 
| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 | $clone->$method($parentObject); | 
| 37 | 37 | } | 
| 38 | 38 | } | 
| 39 | - $newArray[] = $clone; | |
| 39 | + $newArray[ ] = $clone; | |
| 40 | 40 | } | 
| 41 | 41 | } | 
| 42 | 42 | return $newArray; | 
| @@ -77,10 +77,10 @@ | ||
| 77 | 77 | if (is_array($relationData) | 
| 78 | 78 | || $relationData instanceof \Traversable | 
| 79 | 79 |          ) { | 
| 80 | - $cloneData = []; | |
| 80 | + $cloneData = [ ]; | |
| 81 | 81 |              foreach ($relationData as $data) { | 
| 82 | -                if ($relationResult= $this->getRelationClonerResult($options->getClonerName(), $data)) { | |
| 83 | - $cloneData[] = $relationResult; | |
| 82 | +                if ($relationResult = $this->getRelationClonerResult($options->getClonerName(), $data)) { | |
| 83 | + $cloneData[ ] = $relationResult; | |
| 84 | 84 | } | 
| 85 | 85 | } | 
| 86 | 86 |          } else { |