@@ -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 | }; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | // let's review that all items are integers! |
27 | 27 | $result = array_map( |
28 | - function ($value) |
|
28 | + function($value) |
|
29 | 29 | { |
30 | 30 | return (int) $value; |
31 | 31 | }, |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | public function arraysSum(...$arrays) |
39 | 39 | { |
40 | 40 | return array_map( |
41 | - function (array $array) |
|
41 | + function(array $array) |
|
42 | 42 | { |
43 | 43 | return ($array); |
44 | 44 | }, |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $example = new Example(); |
73 | 73 | $not_an_example = new NotAnExample(); |
74 | 74 | |
75 | - return $example->greetings() . ' ' . $not_an_example->greetings() . '!'; |
|
75 | + return $example->greetings().' '.$not_an_example->greetings().'!'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | public function divideEnters($a, $b) |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | $credit_card = preg_replace_callback( |
98 | 98 | '/([a-z]{1})/', |
99 | - function ($m) |
|
99 | + function($m) |
|
100 | 100 | { |
101 | 101 | return strtoupper($m[1]); |
102 | 102 | }, |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | $credit_card = preg_replace_callback( |
107 | 107 | '/([0-9]{1})/', |
108 | - function ($m) |
|
108 | + function($m) |
|
109 | 109 | { |
110 | 110 | return 'XXX'; |
111 | 111 | }, |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | { |
145 | 145 | list($id, $name) = $data[$number_user]; |
146 | 146 | |
147 | - return $id . '_' . $name; |
|
147 | + return $id.'_'.$name; |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | public function getAllComposedNames($data) |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | foreach ($data as list($id, $name)) |
155 | 155 | { |
156 | - $all_composed_names .= $id . '_' . $name . '|'; |
|
156 | + $all_composed_names .= $id.'_'.$name.'|'; |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | return $all_composed_names; |