@@ -77,7 +77,7 @@ |
||
| 77 | 77 | if (is_array($found)) { |
| 78 | 78 | return in_array($value, $found); |
| 79 | 79 | } |
| 80 | - return (string)$value === (string)$found; |
|
| 80 | + return (string) $value === (string) $found; |
|
| 81 | 81 | } |
| 82 | 82 | return true; |
| 83 | 83 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | if ((is_array($data))) { |
| 35 | 35 | return true; |
| 36 | 36 | } |
| 37 | - if (is_object($data) && $data instanceof ArrayAccess) { |
|
| 37 | + if (is_object($data) && $data instanceof ArrayAccess) { |
|
| 38 | 38 | return true; |
| 39 | 39 | } |
| 40 | 40 | return false; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public static function getArray($data, $key, $default = null) |
| 50 | 50 | { |
| 51 | - return array_key_exists($key, $data) ? $data[$key]: $default; |
|
| 51 | + return array_key_exists($key, $data) ? $data[$key] : $default; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | */ |
| 59 | 59 | public function getEscape() |
| 60 | 60 | { |
| 61 | - return function ($value) { |
|
| 61 | + return function($value) { |
|
| 62 | 62 | return $this->escape($value); |
| 63 | 63 | }; |
| 64 | 64 | } |
@@ -72,9 +72,9 @@ |
||
| 72 | 72 | self::ALERT => 2, |
| 73 | 73 | self::MESSAGE => 1, |
| 74 | 74 | ]; |
| 75 | - $serious = array_reduce( |
|
| 75 | + $serious = array_reduce( |
|
| 76 | 76 | $this->messages, |
| 77 | - function ($carry, $msg) use ($msgScores) { |
|
| 77 | + function($carry, $msg) use ($msgScores) { |
|
| 78 | 78 | $myScore = $msgScores[$msg['type']]; |
| 79 | 79 | $msg['score'] = $myScore; |
| 80 | 80 | return $myScore > $carry['score'] ? $msg : $carry; |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | */ |
| 68 | 68 | public function __construct($options = []) |
| 69 | 69 | { |
| 70 | - foreach( ['years', 'months', 'days', 'hours', 'minutes', 'seconds'] as $field) { |
|
| 70 | + foreach (['years', 'months', 'days', 'hours', 'minutes', 'seconds'] as $field) { |
|
| 71 | 71 | if (isset($options[$field])) { |
| 72 | 72 | $this->$field = $options[$field]; |
| 73 | 73 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | protected function getList() |
| 87 | 87 | { |
| 88 | 88 | $years = []; |
| 89 | - $cmp = function ($y) { |
|
| 89 | + $cmp = function($y) { |
|
| 90 | 90 | if ($this->step > 0) { |
| 91 | 91 | return $y <= $this->end; |
| 92 | 92 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | return false; |
| 97 | 97 | }; |
| 98 | 98 | for ($y = $this->start; $cmp($y); $y += $this->step) { |
| 99 | - $years[sprintf($this->formatValue,$y)] = $this->format($y); |
|
| 99 | + $years[sprintf($this->formatValue, $y)] = $this->format($y); |
|
| 100 | 100 | } |
| 101 | 101 | return $years; |
| 102 | 102 | } |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | } |
| 88 | 88 | $format = $format ?: $info['format']; |
| 89 | 89 | $fields = []; |
| 90 | - foreach($info['fields'] as $key => $method) { |
|
| 90 | + foreach ($info['fields'] as $key => $method) { |
|
| 91 | 91 | $fields[$key] = $this->dates->$method($name); |
| 92 | 92 | } |
| 93 | 93 | return $this->dates->makeComposite($name, $fields, $format, $value); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | public static function days($start = 1, $end = 31, $step = 1) |
| 35 | 35 | { |
| 36 | 36 | return GenericList::forge($start, $end, $step)->setFormat( |
| 37 | - function ($day) { |
|
| 37 | + function($day) { |
|
| 38 | 38 | return sprintf('%02d', $day); |
| 39 | 39 | }); |
| 40 | 40 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | public static function hours($start = 0, $end = 23, $step = 1) |
| 49 | 49 | { |
| 50 | 50 | return GenericList::forge($start, $end, $step)->setFormat( |
| 51 | - function ($hour) { |
|
| 51 | + function($hour) { |
|
| 52 | 52 | return sprintf('%02d', $hour); |
| 53 | 53 | }); |
| 54 | 54 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | public static function minutes($start = 0, $end = 59, $step = 5) |
| 63 | 63 | { |
| 64 | 64 | return GenericList::forge($start, $end, $step)->setFormat( |
| 65 | - function ($min) { |
|
| 65 | + function($min) { |
|
| 66 | 66 | return sprintf('%02d', $min); |
| 67 | 67 | }); |
| 68 | 68 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | public static function seconds($start = 0, $end = 59, $step = 15) |
| 77 | 77 | { |
| 78 | 78 | return GenericList::forge($start, $end, $step)->setFormat( |
| 79 | - function ($sec) { |
|
| 79 | + function($sec) { |
|
| 80 | 80 | return sprintf('%02d', $sec); |
| 81 | 81 | }); |
| 82 | 82 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $start, |
| 18 | 18 | $end, |
| 19 | 19 | $step, |
| 20 | - function ($month) { |
|
| 20 | + function($month) { |
|
| 21 | 21 | return sprintf('%2d', $month); |
| 22 | 22 | }); |
| 23 | 23 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public static function formatFullText() |
| 39 | 39 | { |
| 40 | - return function ($m) { |
|
| 40 | + return function($m) { |
|
| 41 | 41 | $list = [ |
| 42 | 42 | 'January', |
| 43 | 43 | 'February', |