@@ -56,17 +56,17 @@ discard block |
||
| 56 | 56 | switch ($type) { |
| 57 | 57 | case 'integer': |
| 58 | 58 | case 'smallint': |
| 59 | - return (int)$value; |
|
| 59 | + return (int) $value; |
|
| 60 | 60 | case 'boolean': |
| 61 | - return (bool)$value; |
|
| 61 | + return (bool) $value; |
|
| 62 | 62 | case 'decimal': |
| 63 | 63 | case 'float': |
| 64 | - return (float)$value; |
|
| 64 | + return (float) $value; |
|
| 65 | 65 | case 'string': |
| 66 | - return (string)$value; |
|
| 66 | + return (string) $value; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - $castDates = isset($options['cast_dates']) ? (boolean)$options['cast_dates'] : true; |
|
| 69 | + $castDates = isset($options['cast_dates']) ? (boolean) $options['cast_dates'] : true; |
|
| 70 | 70 | $dateTypes = [ |
| 71 | 71 | 'date', |
| 72 | 72 | 'date_immutable', |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | ]; |
| 77 | 77 | |
| 78 | 78 | return ($castDates && in_array($type, $dateTypes)) |
| 79 | - ? $this->castDateTime($type, $value, $options['format'] ?? null) |
|
| 79 | + ? $this->castDateTime($type, $value, $options['format'] ?? null) |
|
| 80 | 80 | : $value; |
| 81 | 81 | } |
| 82 | 82 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | switch ($type) { |
| 99 | 99 | case 'date': |
| 100 | 100 | case 'date_immutable': |
| 101 | - $castDates = (isset($options['cast_dates']) ? (bool)$options['cast_dates'] : true); |
|
| 101 | + $castDates = (isset($options['cast_dates']) ? (bool) $options['cast_dates'] : true); |
|
| 102 | 102 | $value = $castDates |
| 103 | 103 | ? $this->castDateTime($value, $options['format'] ?? 'Y-m-d') |
| 104 | 104 | : $value; |
@@ -110,14 +110,14 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | case 'datetime': |
| 112 | 112 | case 'datetime_immutable': |
| 113 | - $castDates = (isset($options['cast_dates']) ? (bool)$options['cast_dates'] : true); |
|
| 113 | + $castDates = (isset($options['cast_dates']) ? (bool) $options['cast_dates'] : true); |
|
| 114 | 114 | $value = $castDates |
| 115 | 115 | ? $this->castDateTime($value, $options['format'] ?? 'Y-m-d H:i:s') |
| 116 | 116 | : $value; |
| 117 | 117 | break; |
| 118 | 118 | |
| 119 | 119 | case 'time': |
| 120 | - $castDates = (isset($options['cast_dates']) ? (bool)$options['cast_dates'] : true); |
|
| 120 | + $castDates = (isset($options['cast_dates']) ? (bool) $options['cast_dates'] : true); |
|
| 121 | 121 | $value = $castDates |
| 122 | 122 | ? $this->castDateTime($value, $options['format'] ?? 'H:i:s') |
| 123 | 123 | : $value; |