Completed
Push — master ( 468f99...0748be )
by Dan
21s queued 10s
created
src/Knp/FriendlyContexts/Guesser/BigintGuesser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Knp/FriendlyContexts/Guesser/BooleanGuesser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Knp/FriendlyContexts/Guesser/DatetimeGuesser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Knp/FriendlyContexts/Guesser/StringGuesser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Knp/FriendlyContexts/Guesser/IntGuesser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/Knp/FriendlyContexts/Doctrine/EntityResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/Knp/FriendlyContexts/Doctrine/EntityHydrator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/Knp/FriendlyContexts/Reader/SmartReader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Knp/FriendlyContexts/Context/MinkContext.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      **/
18 18
     public function clickElement($name, $element, $nbr = 1, $filterCallback = null)
19 19
     {
20
-        $this->elementAction($name, $element, $nbr, function ($e) { $e->click(); }, $filterCallback);
20
+        $this->elementAction($name, $element, $nbr, function($e) { $e->click(); }, $filterCallback);
21 21
     }
22 22
 
23 23
     /**
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
             $name,
32 32
             'field',
33 33
             $nbr,
34
-            function ($e) use ($state) { if ('check' === $state) { $e->check(); } else { $e->uncheck(); } },
35
-            function ($e) { return 'checkbox' === $e->getAttribute('type'); }
34
+            function($e) use ($state) { if ('check' === $state) { $e->check(); } else { $e->uncheck(); } },
35
+            function($e) { return 'checkbox' === $e->getAttribute('type'); }
36 36
         );
37 37
     }
38 38
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
             $name,
48 48
             'field',
49 49
             $nbr,
50
-            function ($e) { $this->getSession()->getDriver()->click($e->getXPath()); },
51
-            function ($e) { return 'radio' === $e->getAttribute('type'); }
50
+            function($e) { $this->getSession()->getDriver()->click($e->getXPath()); },
51
+            function($e) { return 'radio' === $e->getAttribute('type'); }
52 52
         );
53 53
     }
54 54
 
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
      **/
59 59
     public function nbrElement($should, $nbr, $name, $element)
60 60
     {
61
-        $type = in_array($element, [ 'checkbox', 'radio' ]) ? 'field' : $element;
61
+        $type = in_array($element, ['checkbox', 'radio']) ? 'field' : $element;
62 62
         $filterCallback = null;
63 63
 
64 64
         if ('field' === $type) {
65
-            $filterCallback = function ($e) use ($element) { return $element === $e->getAttribute('type'); };
65
+            $filterCallback = function($e) use ($element) { return $element === $e->getAttribute('type'); };
66 66
         }
67 67
 
68 68
         $elements = $this->searchElement($name, $type, $filterCallback);
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
      **/
82 82
     public function seeElement($should, $name, $element)
83 83
     {
84
-        $type = in_array($element, [ 'checkbox', 'radio' ]) ? 'field' : $element;
84
+        $type = in_array($element, ['checkbox', 'radio']) ? 'field' : $element;
85 85
         $filterCallback = null;
86 86
 
87 87
         if ('field' === $type) {
88
-            $filterCallback = function ($e) use ($element) { return $element === $e->getAttribute('type'); };
88
+            $filterCallback = function($e) use ($element) { return $element === $e->getAttribute('type'); };
89 89
         }
90 90
 
91 91
         $elements = $this->searchElement($name, $type, $filterCallback);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
     public function clickLink($link)
119 119
     {
120
-        $this->clickElement($link, 'link', 1, function ($e) use ($link) { return $link === $e->getText(); });
120
+        $this->clickElement($link, 'link', 1, function($e) use ($link) { return $link === $e->getText(); });
121 121
     }
122 122
 
123 123
     /**
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
             $field,
134 134
             'field',
135 135
             $nbr,
136
-            function ($e) use ($value) { $e->setValue($value); },
137
-            function ($e) {
136
+            function($e) use ($value) { $e->setValue($value); },
137
+            function($e) {
138 138
                 return in_array($e->getAttribute('type'), array(
139 139
                     'text', 'password', 'color', 'date', 'datetime',
140 140
                     'datetime-local', 'email', 'month', 'number', 'range',
Please login to merge, or discard this patch.