@@ -6,14 +6,14 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function supports(array $mapping) |
| 8 | 8 | { |
| 9 | - $mapping = array_merge([ 'type' => null ], $mapping); |
|
| 9 | + $mapping = array_merge(['type' => null], $mapping); |
|
| 10 | 10 | |
| 11 | - return in_array($mapping['type'], [ 'decimal', 'float' ]); |
|
| 11 | + return in_array($mapping['type'], ['decimal', 'float']); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | public function transform($str, array $mapping = null) |
| 15 | 15 | { |
| 16 | - return (float) $str; |
|
| 16 | + return (float)$str; |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | public function fake(array $mapping) |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function supports(array $mapping) |
| 8 | 8 | { |
| 9 | - $mapping = array_merge([ 'type' => null ], $mapping); |
|
| 9 | + $mapping = array_merge(['type' => null], $mapping); |
|
| 10 | 10 | |
| 11 | 11 | return $mapping['type'] === 'bigint'; |
| 12 | 12 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function supports(array $mapping) |
| 8 | 8 | { |
| 9 | - $mapping = array_merge([ 'type' => null ], $mapping); |
|
| 9 | + $mapping = array_merge(['type' => null], $mapping); |
|
| 10 | 10 | |
| 11 | 11 | return $mapping['type'] === 'boolean'; |
| 12 | 12 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function supports(array $mapping) |
| 8 | 8 | { |
| 9 | - $mapping = array_merge([ 'type' => null ], $mapping); |
|
| 9 | + $mapping = array_merge(['type' => null], $mapping); |
|
| 10 | 10 | |
| 11 | 11 | return in_array($mapping['type'], ['datetime', 'date', 'time']); |
| 12 | 12 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function supports(array $mapping) |
| 8 | 8 | { |
| 9 | - $mapping = array_merge([ 'type' => null ], $mapping); |
|
| 9 | + $mapping = array_merge(['type' => null], $mapping); |
|
| 10 | 10 | |
| 11 | 11 | return in_array($mapping['type'], ['string', 'text']); |
| 12 | 12 | } |
@@ -6,14 +6,14 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function supports(array $mapping) |
| 8 | 8 | { |
| 9 | - $mapping = array_merge([ 'type' => null ], $mapping); |
|
| 9 | + $mapping = array_merge(['type' => null], $mapping); |
|
| 10 | 10 | |
| 11 | 11 | return $mapping['type'] === 'integer'; |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | public function transform($str, array $mapping = null) |
| 15 | 15 | { |
| 16 | - return (int) round($str); |
|
| 16 | + return (int)round($str); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | public function fake(array $mapping) |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $results = []; |
| 28 | 28 | |
| 29 | - $namespaces = is_array($namespaces) ? $namespaces : [ $namespaces ]; |
|
| 29 | + $namespaces = is_array($namespaces) ? $namespaces : [$namespaces]; |
|
| 30 | 30 | |
| 31 | 31 | foreach ($namespaces as $namespace) { |
| 32 | 32 | $results = $this->getClassesFromName($entityManager, $name, $namespace, $results); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | foreach ($this->entityNameProposal($name) as $name) { |
| 53 | 53 | $class = array_filter( |
| 54 | 54 | $allClass, |
| 55 | - function ($e) use ($namespace, $name) { |
|
| 55 | + function($e) use ($namespace, $name) { |
|
| 56 | 56 | $nameValid = strtolower($e->getShortName()) === strtolower($name); |
| 57 | 57 | |
| 58 | 58 | return '' === $namespace |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | { |
| 111 | 111 | $method = sprintf('to%s', $case); |
| 112 | 112 | |
| 113 | - return property_exists($entity, $this->formater->{$method}($property)) || method_exists($entity, 'set' . $this->formater->{$method}($property)); |
|
| 113 | + return property_exists($entity, $this->formater->{$method}($property)) || method_exists($entity, 'set'.$this->formater->{$method}($property)); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | protected function getMappingFromMetadata(ClassMetadata $metadata, $property) |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | if (isset($mapping['unique']) && true === $mapping['unique']) { |
| 95 | - return $this->cache->generate($className, $mapping['fieldName'], function () use ($guesser, $mapping) { |
|
| 95 | + return $this->cache->generate($className, $mapping['fieldName'], function() use ($guesser, $mapping) { |
|
| 96 | 96 | return $guesser->fake($mapping); |
| 97 | 97 | }); |
| 98 | 98 | } |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | if ($collectionRelation || $arrayRelation) { |
| 120 | 120 | $result = array_map( |
| 121 | - function ($e) use ($mapping) { |
|
| 121 | + function($e) use ($mapping) { |
|
| 122 | 122 | return $this->format($mapping, $e); |
| 123 | 123 | }, |
| 124 | 124 | $this->formater->listToArray($value) |
@@ -32,11 +32,11 @@ |
||
| 32 | 32 | parent::instantiateFixtures($fixtures); |
| 33 | 33 | |
| 34 | 34 | foreach ($fixtures as $fixture) { |
| 35 | - $spec = array_map(function ($property) { |
|
| 35 | + $spec = array_map(function($property) { |
|
| 36 | 36 | return $property->getValue(); |
| 37 | 37 | }, $fixture->getProperties()); |
| 38 | 38 | |
| 39 | - $this->cache[] = [ $spec, $this->objects->get($fixture->getName()) ]; |
|
| 39 | + $this->cache[] = [$spec, $this->objects->get($fixture->getName())]; |
|
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | } |