@@ -222,7 +222,7 @@ |
||
| 222 | 222 | */ |
| 223 | 223 | public static function snake($value, $delimiter = '_') |
| 224 | 224 | { |
| 225 | - if (! ctype_lower($value)) { |
|
| 225 | + if (!ctype_lower($value)) { |
|
| 226 | 226 | $value = preg_replace('/\s+/u', '', ucwords($value)); |
| 227 | 227 | |
| 228 | 228 | $value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1' . $delimiter, $value)); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public static function shortNumber(float $number, int $precision = 1): string |
| 37 | 37 | { |
| 38 | - if (! is_numeric($number)) { |
|
| 38 | + if (!is_numeric($number)) { |
|
| 39 | 39 | throw new InvalidNumberException($number); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | public function getAttribute($key) |
| 28 | 28 | { |
| 29 | - return ! is_array($key) |
|
| 29 | + return !is_array($key) |
|
| 30 | 30 | ? parent::getAttribute($key) |
| 31 | 31 | : null; |
| 32 | 32 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | $keys = $this->primaryKey; |
| 37 | 37 | |
| 38 | - if (! is_array($keys)) { |
|
| 38 | + if (!is_array($keys)) { |
|
| 39 | 39 | return $query->where($keys, $this->getAttribute($keys)); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -23,8 +23,8 @@ |
||
| 23 | 23 | { |
| 24 | 24 | parent::boot(); |
| 25 | 25 | |
| 26 | - static::creating(function ($model) { |
|
| 27 | - if (! ($model->{$model->primaryKey} ?? false)) { |
|
| 26 | + static::creating(function($model) { |
|
| 27 | + if (!($model->{$model->primaryKey} ?? false)) { |
|
| 28 | 28 | $model->{$model->primaryKey} = (string) Uuid::generate(4); |
| 29 | 29 | } |
| 30 | 30 | }); |