@@ -79,7 +79,7 @@ |
||
79 | 79 | /** @uses ActiveRecord::find() */ |
80 | 80 | $query = $this->getQuery()->andWhere([$this->operator, $this->targetAttribute, $value]); |
81 | 81 | |
82 | - $closure = function ($value, $attribute) { |
|
82 | + $closure = function($value, $attribute) { |
|
83 | 83 | $this->{$attribute} = $value; |
84 | 84 | return $value; |
85 | 85 | }; |
@@ -163,7 +163,7 @@ |
||
163 | 163 | return; |
164 | 164 | } |
165 | 165 | |
166 | - $closure = function (object $value, string $attribute) { |
|
166 | + $closure = function(object $value, string $attribute) { |
|
167 | 167 | $this->{$attribute} = $value; |
168 | 168 | }; |
169 | 169 | $closure->call($this->owner, $object, $this->attribute); |
@@ -17,23 +17,23 @@ |
||
17 | 17 | { |
18 | 18 | public function testPermuting() |
19 | 19 | { |
20 | - $input = ['a', 'b',]; |
|
20 | + $input = ['a', 'b', ]; |
|
21 | 21 | $output = ArrayHelper::permute($input); |
22 | 22 | $this->assertCount(2, $output); |
23 | - $this->assertEquals(['a', 'b',], $output[0]); |
|
24 | - $this->assertEquals(['b', 'a',], $output[1]); |
|
23 | + $this->assertEquals(['a', 'b', ], $output[0]); |
|
24 | + $this->assertEquals(['b', 'a', ], $output[1]); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | public function testSome() |
28 | 28 | { |
29 | 29 | $array = [1, 2, 3]; |
30 | 30 | |
31 | - $arrayHas2 = ArrayHelper::some($array, function (int $item) { |
|
31 | + $arrayHas2 = ArrayHelper::some($array, function(int $item) { |
|
32 | 32 | return $item === 2; |
33 | 33 | }); |
34 | 34 | $this->assertTrue($arrayHas2); |
35 | 35 | |
36 | - $arrayDoesNotHave4 = ArrayHelper::some($array, function (int $item) { |
|
36 | + $arrayDoesNotHave4 = ArrayHelper::some($array, function(int $item) { |
|
37 | 37 | return $item === 4; |
38 | 38 | }); |
39 | 39 | $this->assertFalse($arrayDoesNotHave4); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | public function testLoadingMultipleFiles() |
47 | 47 | { |
48 | - $model = new FileLoaderBehaviorMock(['multiple' => true,]); |
|
48 | + $model = new FileLoaderBehaviorMock(['multiple' => true, ]); |
|
49 | 49 | $model->validate(); |
50 | 50 | $this->assertNotEmpty($model->file); |
51 | 51 | $this->assertTrue(is_array($model->file)); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function rules() |
36 | 36 | { |
37 | 37 | return [ |
38 | - ['phone', 'string',], |
|
38 | + ['phone', 'string', ], |
|
39 | 39 | ]; |
40 | 40 | } |
41 | 41 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | return [ |
34 | 34 | 'flexibleTimestamp' => [ |
35 | 35 | 'class' => FlexibleTimestampBehavior::class, |
36 | - 'attributes' => ['timestamp', 'date1', 'date2',], |
|
36 | + 'attributes' => ['timestamp', 'date1', 'date2', ], |
|
37 | 37 | 'format' => $this->format, |
38 | 38 | ], |
39 | 39 | ]; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function rules() |
46 | 46 | { |
47 | 47 | return [ |
48 | - [['timestamp', 'date1', 'date2',], 'date', 'format' => 'php:Y-m-d',], |
|
48 | + [['timestamp', 'date1', 'date2', ], 'date', 'format' => 'php:Y-m-d', ], |
|
49 | 49 | ]; |
50 | 50 | } |
51 | 51 | } |
@@ -42,10 +42,10 @@ |
||
42 | 42 | * @param array ...$args |
43 | 43 | * @return array |
44 | 44 | */ |
45 | - public static function forEach(callable $closure, array $array, ...$args) |
|
45 | + public static function forEach (callable $closure, array $array, ...$args) |
|
46 | 46 | { |
47 | 47 | return \array_map( |
48 | - function ($item) use ($closure, $args) { |
|
48 | + function($item) use ($closure, $args) { |
|
49 | 49 | return static::within($closure, $item, ...$args); |
50 | 50 | }, |
51 | 51 | $array |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public static function sqlCall(string $sqlMethod, ...$params): Expression |
19 | 19 | { |
20 | - $expressions = implode(', ', \array_map(function ($expression) { |
|
20 | + $expressions = implode(', ', \array_map(function($expression) { |
|
21 | 21 | return "({$expression})"; |
22 | 22 | }, (array)$params)); |
23 | 23 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function filterFiles(Model $model, string $attribute) |
48 | 48 | { |
49 | - return $model->{$attribute} = \array_values(\array_filter((array)$model->{$attribute}, function ($file) { |
|
49 | + return $model->{$attribute} = \array_values(\array_filter((array)$model->{$attribute}, function($file) { |
|
50 | 50 | return $file instanceof UploadedFile && $file->error != UPLOAD_ERR_NO_FILE; |
51 | 51 | })); |
52 | 52 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | return \array_reduce( |
110 | 110 | $files, |
111 | - function (bool $carry, UploadedFile $file) use ($model, $attribute) { |
|
111 | + function(bool $carry, UploadedFile $file) use ($model, $attribute) { |
|
112 | 112 | if (!$carry) { |
113 | 113 | return false; |
114 | 114 | } |