@@ -9,7 +9,7 @@ |
||
9 | 9 | /** |
10 | 10 | * Form constructor. |
11 | 11 | * |
12 | - * @param $x |
|
12 | + * @param integer $x |
|
13 | 13 | */ |
14 | 14 | public function __construct($x) |
15 | 15 | { |
@@ -19,7 +19,7 @@ |
||
19 | 19 | function getX() |
20 | 20 | { |
21 | 21 | //returns closure bound to this object and scope |
22 | - return function () |
|
22 | + return function() |
|
23 | 23 | { |
24 | 24 | return $this->x; |
25 | 25 | }; |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Kata\PHP7Kata; |
4 | 4 | |
5 | -use Behat\Testwork\Ordering\Orderer\Orderer; |
|
6 | 5 | use Kata\OtherExamples\{ |
7 | 6 | Example, Form, NotAnExample |
8 | 7 | }; |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | 'bird' |
16 | 16 | ]; |
17 | 17 | |
18 | - public function getStringOrNull(?string $param):? string |
|
18 | + public function getStringOrNull(? string $param) : ? string |
|
19 | 19 | { |
20 | 20 | return $param; |
21 | 21 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | public function arraysSum(array ...$arrays) |
29 | 29 | { |
30 | - return array_map(function (array $array) { |
|
30 | + return array_map(function(array $array) { |
|
31 | 31 | return ($array); |
32 | 32 | }, $arrays); |
33 | 33 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $example = new Example(); |
48 | 48 | $not_an_example = new NotAnExample(); |
49 | 49 | |
50 | - return $example->greetings() . ' ' . $not_an_example->greetings() . '!'; |
|
50 | + return $example->greetings().' '.$not_an_example->greetings().'!'; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | public function divideEnters(int $a, int $b) |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | $credit_card = 'daniel:madurell:visa:999888777'; |
61 | 61 | |
62 | 62 | $credit_card = preg_replace_callback_array([ |
63 | - '/([a-z]{1})/' => function ($m) { |
|
63 | + '/([a-z]{1})/' => function($m) { |
|
64 | 64 | return strtoupper($m[1]); |
65 | 65 | }, |
66 | - '/([0-9]{1})/' => function ($m) { |
|
66 | + '/([0-9]{1})/' => function($m) { |
|
67 | 67 | return 'XXX'; |
68 | 68 | } |
69 | 69 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | [$id, $name] = $data[$number_user]; |
101 | 101 | |
102 | - return $id . '_' . $name; |
|
102 | + return $id.'_'.$name; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | public function getAllComposedNames($data) |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $all_composed_names = ''; |
108 | 108 | |
109 | 109 | foreach ($data as [$id, $name]) { |
110 | - $all_composed_names .= $id . '_' . $name . '|'; |
|
110 | + $all_composed_names .= $id.'_'.$name.'|'; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | return $all_composed_names; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | public function printForEachValue() |
144 | 144 | { |
145 | - $gen = function () { return yield 1; }; |
|
145 | + $gen = function() { return yield 1; }; |
|
146 | 146 | |
147 | 147 | foreach ($gen() as $key => $value) { |
148 | 148 | $this->doSomethingTooHeavy($key, $value); |