@@ -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); |