@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | 'verifier' => $verifier = base64_encode(Str::random($length)), |
| 49 | 49 | // Convert "+" to "-" & "/" to "_" & remove trailing "=" |
| 50 | 50 | 'challenge' => rtrim( |
| 51 | - characters: '=', |
|
| 52 | - string: strtr( |
|
| 53 | - from: '+/', |
|
| 54 | - string: base64_encode(hash(algo: 'sha256', data: $verifier, binary: true)), |
|
| 55 | - to: '-_', |
|
| 51 | + characters : '=', |
|
| 52 | + string : strtr( |
|
| 53 | + from : '+/', |
|
| 54 | + string : base64_encode(hash(algo : 'sha256', data : $verifier, binary : true)), |
|
| 55 | + to : '-_', |
|
| 56 | 56 | ), |
| 57 | 57 | ), |
| 58 | 58 | ] |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $grant_type = $this->token->grant_type ?? $params['grant_type']; |
| 102 | 102 | |
| 103 | 103 | if (is_null($this->configs['oauth'][$grant_type]['id'] ?? null)) { |
| 104 | - throw new ClientConfigurationException('The "client_id" for "'.$grant_type.'" cannot be null'); |
|
| 104 | + throw new ClientConfigurationException('The "client_id" for "' . $grant_type . '" cannot be null'); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | try { |
@@ -120,10 +120,10 @@ discard block |
||
| 120 | 120 | ], |
| 121 | 121 | ], |
| 122 | 122 | uri: $this->uri( |
| 123 | - path: 'token?'.http_build_query( |
|
| 123 | + path: 'token?' . http_build_query( |
|
| 124 | 124 | $this->configs['tenant'] ? ['tenant' => $this->configs['tenant']] : [], |
| 125 | 125 | ), |
| 126 | - url: $this->configs['oauth']['authorization_server'] |
|
| 126 | + url : $this->configs['oauth']['authorization_server'] |
|
| 127 | 127 | ), |
| 128 | 128 | ) |
| 129 | 129 | ->getBody() |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | return $this->uri( |
| 201 | - path: 'authorize?'.http_build_query( |
|
| 201 | + path: 'authorize?' . http_build_query( |
|
| 202 | 202 | [ |
| 203 | 203 | 'client_id' => $this->configs['oauth']['authorization_code']['id'], |
| 204 | 204 | ...$challenge |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | 'scope' => $scope ?? $this->token->scope, |
| 213 | 213 | ...$this->configs['tenant'] ? ['tenant' => $this->configs['tenant']] : [], |
| 214 | 214 | ]), |
| 215 | - url: $this->configs['oauth']['authorization_server'] |
|
| 215 | + url : $this->configs['oauth']['authorization_server'] |
|
| 216 | 216 | ); |
| 217 | 217 | } |
| 218 | 218 | |
@@ -248,10 +248,10 @@ discard block |
||
| 248 | 248 | { |
| 249 | 249 | try { |
| 250 | 250 | return json_decode( |
| 251 | - associative: true, |
|
| 252 | - json: $this->guzzle->request( |
|
| 253 | - method: $method, |
|
| 254 | - options: [ |
|
| 251 | + associative : true, |
|
| 252 | + json : $this->guzzle->request( |
|
| 253 | + method : $method, |
|
| 254 | + options : [ |
|
| 255 | 255 | 'debug' => $this->debug, |
| 256 | 256 | 'headers' => [ |
| 257 | 257 | 'Authorization' => (string) $this->getToken(), |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | ], |
| 260 | 260 | 'body' => empty($data) ? null : json_encode($data), |
| 261 | 261 | ], |
| 262 | - uri: $this->uri($path), |
|
| 262 | + uri : $this->uri($path), |
|
| 263 | 263 | ) |
| 264 | 264 | ->getBody() |
| 265 | 265 | ->getContents(), |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | throw new ClientConfigurationException('The "authorization_server" cannot be null'); |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | - if (! filter_var($this->configs['oauth']['authorization_server'], FILTER_VALIDATE_URL)) { |
|
| 292 | + if (!filter_var($this->configs['oauth']['authorization_server'], FILTER_VALIDATE_URL)) { |
|
| 293 | 293 | throw new ClientConfigurationException( |
| 294 | 294 | sprintf('A valid url must be provided for "authorization_server" [%s]', $this->configs['oauth']['authorization_server']) |
| 295 | 295 | ); |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | throw new ClientConfigurationException('The "resource_server" cannot be null'); |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | - if (! filter_var($this->configs['resource_server'], FILTER_VALIDATE_URL)) { |
|
| 302 | + if (!filter_var($this->configs['resource_server'], FILTER_VALIDATE_URL)) { |
|
| 303 | 303 | throw new ClientConfigurationException( |
| 304 | 304 | sprintf('A valid url must be provided for "resource_server" [%s]', $this->configs['resource_server']) |
| 305 | 305 | ); |
@@ -321,10 +321,10 @@ discard block |
||
| 321 | 321 | /** |
| 322 | 322 | * Set the token & refresh if needed |
| 323 | 323 | */ |
| 324 | - public function setToken(Token|string $token): self |
|
| 324 | + public function setToken(Token | string $token): self |
|
| 325 | 325 | { |
| 326 | 326 | $this->token = is_string($token) |
| 327 | - ? new Token(access_token: $token) |
|
| 327 | + ? new Token(access_token : $token) |
|
| 328 | 328 | : $token; |
| 329 | 329 | |
| 330 | 330 | return $this; |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | $path = ltrim($path ?? '/', '/'); |
| 347 | 347 | |
| 348 | 348 | return rtrim($url ?? $this->configs['resource_server'], '/') |
| 349 | - .($path ? (Str::startsWith($path, '?') ? null : '/').$path : '/'); |
|
| 349 | + .($path ? (Str::startsWith($path, '?') ? null : '/') . $path : '/'); |
|
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | /** |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | public function __toString(): string |
| 35 | 35 | { |
| 36 | - return $this->token_type.' '.$this->access_token; |
|
| 36 | + return $this->token_type . ' ' . $this->access_token; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function isValid(?string $scope = null): bool |
| 65 | 65 | { |
| 66 | - return ! is_null($this->access_token) && |
|
| 67 | - ! $this->isExpired() && |
|
| 66 | + return !is_null($this->access_token) && |
|
| 67 | + !$this->isExpired() && |
|
| 68 | 68 | ($scope ? $this->allowedScope($scope) : true); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public function handle(Request $request, Closure $next) |
| 30 | 30 | { |
| 31 | - if (! $request->user()->halo_token) { |
|
| 31 | + if (!$request->user()->halo_token) { |
|
| 32 | 32 | // Set intended route, so that after linking account, user is put where they were going |
| 33 | 33 | $this->redirector->setIntendedUrl($request->path()); |
| 34 | 34 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function register() |
| 35 | 35 | { |
| 36 | - $this->mergeConfigFrom(__DIR__.'/../../config/halo.php', 'halo'); |
|
| 36 | + $this->mergeConfigFrom(__DIR__ . '/../../config/halo.php', 'halo'); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -54,19 +54,19 @@ discard block |
||
| 54 | 54 | protected function registerPublishes() |
| 55 | 55 | { |
| 56 | 56 | if ($this->app->runningInConsole()) { |
| 57 | - $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); |
|
| 57 | + $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); |
|
| 58 | 58 | |
| 59 | 59 | $this->publishes( |
| 60 | 60 | groups: 'halo-config', |
| 61 | 61 | paths: [ |
| 62 | - __DIR__.'/../../config/halo.php' => config_path('halo.php'), |
|
| 62 | + __DIR__ . '/../../config/halo.php' => config_path('halo.php'), |
|
| 63 | 63 | ], |
| 64 | 64 | ); |
| 65 | 65 | |
| 66 | 66 | $this->publishes( |
| 67 | 67 | groups: 'halo-migrations', |
| 68 | 68 | paths: [ |
| 69 | - __DIR__.'/../../database/migrations' => database_path('migrations'), |
|
| 69 | + __DIR__ . '/../../database/migrations' => database_path('migrations'), |
|
| 70 | 70 | ], |
| 71 | 71 | ); |
| 72 | 72 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | 'namespace' => 'Spinen\Halo\Http\Controllers', |
| 84 | 84 | 'middleware' => Config::get('halo.oauth.authorization_code.route.middleware', ['web']), |
| 85 | 85 | ], |
| 86 | - routes: fn () => $this->loadRoutesFrom(realpath(__DIR__.'/../../routes/web.php')) |
|
| 86 | + routes: fn () => $this->loadRoutesFrom(realpath(__DIR__ . '/../../routes/web.php')) |
|
| 87 | 87 | ); |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | /** |
| 43 | 43 | * Get the foreign key's name |
| 44 | 44 | */ |
| 45 | - public function getForeignKey(): int|string|null |
|
| 45 | + public function getForeignKey(): int | string | null |
|
| 46 | 46 | { |
| 47 | 47 | return $this->getChild()->{$this->getForeignKeyName()}; |
| 48 | 48 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function getResults(): ?Model |
| 67 | 67 | { |
| 68 | - if (! $this->getForeignKey()) { |
|
| 68 | + if (!$this->getForeignKey()) { |
|
| 69 | 69 | return null; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function getClient(): Client |
| 23 | 23 | { |
| 24 | - if (! isset($this->client) && $this->parentModel) { |
|
| 24 | + if (!isset($this->client) && $this->parentModel) { |
|
| 25 | 25 | $this->client = $this->parentModel->getClient(); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -63,13 +63,13 @@ |
||
| 63 | 63 | public function haloToken(): Attribute |
| 64 | 64 | { |
| 65 | 65 | return Attribute::make( |
| 66 | - get: fn ($value, array $attributes): ?Token => ! is_null($attributes['halo_token']) |
|
| 66 | + get: fn ($value, array $attributes): ?Token => !is_null($attributes['halo_token']) |
|
| 67 | 67 | ? unserialize(Crypt::decryptString($attributes['halo_token'])) |
| 68 | 68 | : null, |
| 69 | - set: function ($value): ?string { |
|
| 69 | + set : function($value): ?string { |
|
| 70 | 70 | // If setting the password & already have a client, then |
| 71 | 71 | // empty the client to use new password in client |
| 72 | - if (! is_null($this->builder)) { |
|
| 72 | + if (!is_null($this->builder)) { |
|
| 73 | 73 | $this->builder = null; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | */ |
| 239 | 239 | protected function assumeForeignKey($related): string |
| 240 | 240 | { |
| 241 | - return Str::snake((new $related())->getResponseKey()).'_id'; |
|
| 241 | + return Str::snake((new $related())->getResponseKey()) . '_id'; |
|
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | /** |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | */ |
| 380 | 380 | public function getOrderByDirectionParameter(): string |
| 381 | 381 | { |
| 382 | - return $this->orderByDirectionParameter ?? $this->getOrderByParameter().'desc'; |
|
| 382 | + return $this->orderByDirectionParameter ?? $this->getOrderByParameter() . 'desc'; |
|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | /** |
@@ -407,20 +407,20 @@ discard block |
||
| 407 | 407 | // If have an id, then put it on the end |
| 408 | 408 | // NOTE: Halo treats creates & updates the same, so only on existing |
| 409 | 409 | if ($this->exist && $this->getKey()) { |
| 410 | - $path .= '/'.$this->getKey(); |
|
| 410 | + $path .= '/' . $this->getKey(); |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | // Stick any extra things on the end |
| 414 | - if (! is_null($extra)) { |
|
| 415 | - $path .= '/'.ltrim($extra, '/'); |
|
| 414 | + if (!is_null($extra)) { |
|
| 415 | + $path .= '/' . ltrim($extra, '/'); |
|
| 416 | 416 | } |
| 417 | 417 | |
| 418 | - if (! empty($query = $this->getDefaultWheres($query))) { |
|
| 419 | - $path .= '?'.http_build_query($this->convertBoolToString($query)); |
|
| 418 | + if (!empty($query = $this->getDefaultWheres($query))) { |
|
| 419 | + $path .= '?' . http_build_query($this->convertBoolToString($query)); |
|
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | // If there is a parentModel & not have an id (unless for nested), then prepend parentModel |
| 423 | - if (! is_null($this->parentModel) && (! $this->getKey() || $this->isNested())) { |
|
| 423 | + if (!is_null($this->parentModel) && (!$this->getKey() || $this->isNested())) { |
|
| 424 | 424 | return $this->parentModel->getPath($path); |
| 425 | 425 | } |
| 426 | 426 | |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | { |
| 439 | 439 | $relation = $this->{$method}(); |
| 440 | 440 | |
| 441 | - if (! $relation instanceof Relation) { |
|
| 441 | + if (!$relation instanceof Relation) { |
|
| 442 | 442 | $exception_message = is_null($relation) |
| 443 | 443 | ? '%s::%s must return a relationship instance, but "null" was returned. Was the "return" keyword used?' |
| 444 | 444 | : '%s::%s must return a relationship instance.'; |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | |
| 451 | 451 | return tap( |
| 452 | 452 | $relation->getResults(), |
| 453 | - function ($results) use ($method) { |
|
| 453 | + function($results) use ($method) { |
|
| 454 | 454 | $this->setRelation($method, $results); |
| 455 | 455 | } |
| 456 | 456 | ); |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | $model = (new $related([], $this->parentModel))->setClient($this->getClient()); |
| 492 | 492 | |
| 493 | 493 | return (new Collection($given))->map( |
| 494 | - function ($attributes) use ($model, $reset) { |
|
| 494 | + function($attributes) use ($model, $reset) { |
|
| 495 | 495 | return $model->newFromBuilder($reset ? reset($attributes) : $attributes); |
| 496 | 496 | } |
| 497 | 497 | ); |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | */ |
| 597 | 597 | public function offsetExists($offset): bool |
| 598 | 598 | { |
| 599 | - return ! is_null($this->getAttribute($offset)); |
|
| 599 | + return !is_null($this->getAttribute($offset)); |
|
| 600 | 600 | } |
| 601 | 601 | |
| 602 | 602 | /** |
@@ -676,7 +676,7 @@ discard block |
||
| 676 | 676 | } |
| 677 | 677 | |
| 678 | 678 | try { |
| 679 | - if (! $this->isDirty()) { |
|
| 679 | + if (!$this->isDirty()) { |
|
| 680 | 680 | return true; |
| 681 | 681 | } |
| 682 | 682 | |
@@ -707,7 +707,7 @@ discard block |
||
| 707 | 707 | */ |
| 708 | 708 | public function saveOrFail(): bool |
| 709 | 709 | { |
| 710 | - if (! $this->save()) { |
|
| 710 | + if (!$this->save()) { |
|
| 711 | 711 | throw new UnableToSaveException(); |
| 712 | 712 | } |
| 713 | 713 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | public function __call(string $name, array $arguments) |
| 163 | 163 | { |
| 164 | - if (! isset($this->parentModel) && array_key_exists($name, $this->rootModels)) { |
|
| 164 | + if (!isset($this->parentModel) && array_key_exists($name, $this->rootModels)) { |
|
| 165 | 165 | return $this->newInstanceForModel($this->rootModels[$name]); |
| 166 | 166 | } |
| 167 | 167 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | * @throws NoClientException |
| 183 | 183 | * @throws TokenException |
| 184 | 184 | */ |
| 185 | - public function __get(string $name): Collection|Model|null |
|
| 185 | + public function __get(string $name): Collection | Model | null |
|
| 186 | 186 | { |
| 187 | 187 | return match (true) { |
| 188 | 188 | $name === 'agent' => $this->newInstanceForModel(Agent::class) |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | $name === 'user' => $this->newInstanceForModel(User::class) |
| 192 | 192 | ->get(extra: 'me') |
| 193 | 193 | ->first(), |
| 194 | - ! $this->parentModel && array_key_exists($name, $this->rootModels) => $this->{$name}() |
|
| 194 | + !$this->parentModel && array_key_exists($name, $this->rootModels) => $this->{$name}() |
|
| 195 | 195 | ->get(), |
| 196 | 196 | default => null, |
| 197 | 197 | }; |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | * @throws NoClientException |
| 231 | 231 | * @throws TokenException |
| 232 | 232 | */ |
| 233 | - public function get(array|string $properties = ['*'], ?string $extra = null): Collection|Model |
|
| 233 | + public function get(array | string $properties = ['*'], ?string $extra = null): Collection | Model |
|
| 234 | 234 | { |
| 235 | 235 | $properties = Arr::wrap($properties); |
| 236 | 236 | $count = null; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | ->toArray() |
| 268 | 268 | ) |
| 269 | 269 | ->setClient($this->getClient()->setDebug(false))) |
| 270 | - ->setPagination(count: $count, page: $page, pageSize: $pageSize); |
|
| 270 | + ->setPagination(count : $count, page : $page, pageSize : $pageSize); |
|
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | /** |
@@ -277,11 +277,11 @@ discard block |
||
| 277 | 277 | */ |
| 278 | 278 | public function getModel(): Model |
| 279 | 279 | { |
| 280 | - if (! isset($this->class)) { |
|
| 280 | + if (!isset($this->class)) { |
|
| 281 | 281 | throw new InvalidRelationshipException(); |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | - if (! isset($this->model)) { |
|
| 284 | + if (!isset($this->model)) { |
|
| 285 | 285 | $this->model = (new $this->class([], $this->parentModel))->setClient($this->client); |
| 286 | 286 | } |
| 287 | 287 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | */ |
| 296 | 296 | public function getPath(?string $extra = null): ?string |
| 297 | 297 | { |
| 298 | - $w = (array)$this->wheres; |
|
| 298 | + $w = (array) $this->wheres; |
|
| 299 | 299 | $id = Arr::pull($w, $this->getModel()->getKeyName()); |
| 300 | 300 | |
| 301 | 301 | return $this->getModel() |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | * @throws NoClientException |
| 311 | 311 | * @throws TokenException |
| 312 | 312 | */ |
| 313 | - public function find(int|string $id, array|string $properties = ['*']): Model |
|
| 313 | + public function find(int | string $id, array | string $properties = ['*']): Model |
|
| 314 | 314 | { |
| 315 | 315 | return $this->whereId($id) |
| 316 | 316 | ->get($properties) |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | * |
| 333 | 333 | * @throws InvalidRelationshipException |
| 334 | 334 | */ |
| 335 | - public function limit(int|string $count): self |
|
| 335 | + public function limit(int | string $count): self |
|
| 336 | 336 | { |
| 337 | 337 | return $this->where('count', (int) $count); |
| 338 | 338 | } |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | * |
| 418 | 418 | * @throws InvalidRelationshipException |
| 419 | 419 | */ |
| 420 | - public function page(int|string $number, int|string|null $size = null): self |
|
| 420 | + public function page(int | string $number, int | string | null $size = null): self |
|
| 421 | 421 | { |
| 422 | 422 | return $this->where('page_no', (int) $number) |
| 423 | 423 | ->when($size, fn (self $b): self => $b->paginate($size)); |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | * |
| 429 | 429 | * @throws InvalidRelationshipException |
| 430 | 430 | */ |
| 431 | - public function pageinate(int|string|null $size = null): self |
|
| 431 | + public function pageinate(int | string | null $size = null): self |
|
| 432 | 432 | { |
| 433 | 433 | return $this->paginate($size); |
| 434 | 434 | } |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | * |
| 439 | 439 | * @throws InvalidRelationshipException |
| 440 | 440 | */ |
| 441 | - public function paginate(int|string|null $size = null): self |
|
| 441 | + public function paginate(int | string | null $size = null): self |
|
| 442 | 442 | { |
| 443 | 443 | return $this->unless($size, fn (self $b): self => $b->where('pageinate', false)) |
| 444 | 444 | ->when($size, fn (self $b): self => $b->where('pageinate', true)->where('page_size', (int) $size)); |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | */ |
| 482 | 482 | public function setClass(string $class): self |
| 483 | 483 | { |
| 484 | - if (! class_exists($class)) { |
|
| 484 | + if (!class_exists($class)) { |
|
| 485 | 485 | throw new ModelNotFoundException(sprintf('The model [%s] not found.', $class)); |
| 486 | 486 | } |
| 487 | 487 | |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | * |
| 506 | 506 | * @throws InvalidRelationshipException |
| 507 | 507 | */ |
| 508 | - public function take(int|string $count): self |
|
| 508 | + public function take(int | string $count): self |
|
| 509 | 509 | { |
| 510 | 510 | return $this->limit($count); |
| 511 | 511 | } |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | * |
| 530 | 530 | * @throws InvalidRelationshipException |
| 531 | 531 | */ |
| 532 | - public function whereId(int|string|null $id): self |
|
| 532 | + public function whereId(int | string | null $id): self |
|
| 533 | 533 | { |
| 534 | 534 | return $this->where($this->getModel()->getKeyName(), $id); |
| 535 | 535 | } |