@@ -467,7 +467,6 @@ discard block |
||
467 | 467 | * @param mixed $value |
468 | 468 | * @param callable $callback |
469 | 469 | * @param callable|null $default |
470 | - |
|
471 | 470 | * @return $this|mixed |
472 | 471 | */ |
473 | 472 | public function when($value, $callback, $default = null) { |
@@ -487,7 +486,6 @@ discard block |
||
487 | 486 | * @param mixed $value |
488 | 487 | * @param callable $callback |
489 | 488 | * @param callable|null $default |
490 | - |
|
491 | 489 | * @return $this|mixed |
492 | 490 | */ |
493 | 491 | public function unless($value, $callback, $default = null) { |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | if (strpos(strtolower($name), "where") === false) { |
88 | - $method = 'where' . ucfirst($name); |
|
89 | - } else { |
|
88 | + $method = 'where'.ucfirst($name); |
|
89 | + }else { |
|
90 | 90 | $method = lcfirst($name); |
91 | 91 | } |
92 | 92 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | return call_user_func_array([$that, $method], $arguments); |
95 | 95 | } |
96 | 96 | |
97 | - throw new MethodNotFoundException("Method " . self::class . '::' . $method . '() is not supported'); |
|
97 | + throw new MethodNotFoundException("Method ".self::class.'::'.$method.'() is not supported'); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -131,13 +131,13 @@ discard block |
||
131 | 131 | } |
132 | 132 | return $this->where($key, $value); |
133 | 133 | } |
134 | - } else { |
|
134 | + }else { |
|
135 | 135 | $criteria = $this->validate_criteria($criteria); |
136 | 136 | $value = $this->parse_value($value); |
137 | 137 | |
138 | 138 | if ($value === null || $value === '') { |
139 | 139 | $this->query->push([$criteria]); |
140 | - } else { |
|
140 | + }else { |
|
141 | 141 | $this->query->push([$criteria, $value]); |
142 | 142 | } |
143 | 143 | } |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | * @return $this|mixed |
492 | 492 | */ |
493 | 493 | public function unless($value, $callback, $default = null) { |
494 | - if (! $value) { |
|
494 | + if (!$value) { |
|
495 | 495 | return $callback($this, $value) ?: $this; |
496 | 496 | } elseif ($default) { |
497 | 497 | return $default($this, $value) ?: $this; |