@@ -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) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | foreach ($this->extractScenarios() as $data) { |
44 | 44 | list($feature, $scenarios) = $data; |
45 | 45 | foreach ($scenarios as $scenario) { |
46 | - $callable = function () use ($environment, $feature, $scenario) { |
|
46 | + $callable = function() use ($environment, $feature, $scenario) { |
|
47 | 47 | $steps = $scenario->getSteps(); |
48 | 48 | foreach ($steps as $step) { |
49 | 49 | $result = $this->testStep($environment, $feature, $step); |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | |
70 | 70 | foreach ($this->registry->getSuites() as $suite) { |
71 | 71 | foreach ($this->locator->locateSpecifications($suite, '') as $feature) { |
72 | - $collection = array_filter($feature->getScenarios(), function ($e) { return $e->hasTag($this->smartTag); }); |
|
73 | - $scenarios[] = [ $feature, $collection ]; |
|
72 | + $collection = array_filter($feature->getScenarios(), function($e) { return $e->hasTag($this->smartTag); }); |
|
73 | + $scenarios[] = [$feature, $collection]; |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 |