@@ -21,17 +21,17 @@ |
||
21 | 21 | public function extractType(array $input): array |
22 | 22 | { |
23 | 23 | $result = [ |
24 | - 'single' => (function () use ($input) { |
|
24 | + 'single' => (function() use ($input) { |
|
25 | 25 | $result['rule'] = json_encode(['date' => $input['date']]); |
26 | 26 | $result['period'] = $input['period']; |
27 | 27 | return $result; |
28 | 28 | }), |
29 | - 'period' => (function () use ($input) { |
|
29 | + 'period' => (function() use ($input) { |
|
30 | 30 | $result['rule'] = json_encode(['from' => $input['disableFrom'], 'to' => $input['disableTo']]); |
31 | 31 | $result['period'] = $input['period']; |
32 | 32 | return $result; |
33 | 33 | }), |
34 | - 'recurrent_day' => (function () use ($input) { |
|
34 | + 'recurrent_day' => (function() use ($input) { |
|
35 | 35 | $result['rule'] = json_encode(['dayOfWeek' => $input['dayOfWeek']]); |
36 | 36 | $result['period'] = $input['period']; |
37 | 37 | return $result; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | { |
42 | 42 | $decoded = $this->decode($rule); |
43 | 43 | $result = [ |
44 | - 'single' => (function () use ($decoded) { |
|
44 | + 'single' => (function() use ($decoded) { |
|
45 | 45 | $period = $this->periodAggregate->extract([ |
46 | 46 | 'from' => $decoded['date'], |
47 | 47 | 'to' => $decoded['date'], |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | |
50 | 50 | return $this->extract($period); |
51 | 51 | }), |
52 | - 'period' => (function () use ($decoded) { |
|
52 | + 'period' => (function() use ($decoded) { |
|
53 | 53 | $period = $this->periodAggregate->extract($decoded); |
54 | 54 | |
55 | 55 | return $this->extract($period); |
56 | 56 | }), |
57 | - 'recurrent_day' => (function () use ($decoded) { |
|
57 | + 'recurrent_day' => (function() use ($decoded) { |
|
58 | 58 | $dayOfWeek = jddayofweek($decoded['dayOfWeek'] - 1, 1); |
59 | 59 | $period = $this->weekDaysAggregate->extract([ |
60 | 60 | 'weekDay' => $dayOfWeek, |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function fetchList(): array |
77 | 77 | { |
78 | - usort($this->list, function ($previous, $next) { |
|
78 | + usort($this->list, function($previous, $next) { |
|
79 | 79 | $previousDate = strtotime($previous); |
80 | 80 | $nextDate = strtotime($next); |
81 | 81 |
@@ -59,7 +59,7 @@ |
||
59 | 59 | { |
60 | 60 | $result = unserialize($this->circuit->getDepartureDays()); |
61 | 61 | |
62 | - return array_map(function ($value) { |
|
62 | + return array_map(function($value) { |
|
63 | 63 | return $value - 1; |
64 | 64 | }, $result); |
65 | 65 | } |