| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -80,7 +80,7 @@ public function __construct(QueryBuilder $query) | |||
| 80 | 80 | * Register a new global scope. | |
| 81 | 81 | * | |
| 82 | 82 | * @param string $identifier | |
| 83 | - * @param \Illuminate\Database\Eloquent\ScopeInterface|\Closure $scope | ||
| 83 | + * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope | ||
| 84 | 84 | * @return $this | |
| 85 | 85 | */ | |
| 86 | 86 | public function withGlobalScope($identifier, $scope) | |
@@ -93,7 +93,7 @@ public function withGlobalScope($identifier, $scope) | |||
| 93 | 93 | /** | |
| 94 | 94 | * Remove a registered global scope. | |
| 95 | 95 | * | |
| 96 | - * @param \Illuminate\Database\Eloquent\ScopeInterface|string $scope | ||
| 96 | + * @param \Illuminate\Database\Eloquent\Scope|string $scope | ||
| 97 | 97 | * @return $this | |
| 98 | 98 | */ | |
| 99 | 99 | public function withoutGlobalScope($scope) | |
@@ -940,15 +940,15 @@ public function applyScopes() | |||
| 940 | 940 | /** | |
| 941 | 941 | * Apply a single scope on the given builder instance. | |
| 942 | 942 | * | |
| 943 | - * @param \Illuminate\Database\Eloquent\ScopeInterface|\Closure $scope | ||
| 943 | + * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope | ||
| 944 | 944 | * @param \Illuminate\Database\Eloquent\Builder $builder | |
| 945 | 945 | * @return void | |
| 946 | 946 | */ | |
| 947 | 947 | protected function applyScope($scope, $builder) | |
| 948 | 948 | { | |
| 949 | 949 | if ($scope instanceof Closure) { | |
| 950 | 950 | $scope($builder); | |
| 951 | - } elseif ($scope instanceof ScopeInterface) { | ||
| 951 | + } elseif ($scope instanceof Scope) { | ||
| 952 | 952 | $scope->apply($builder, $this->getModel()); | |
| 953 | 953 | } | |
| 954 | 954 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -338,7 +338,7 @@ public static function clearBootedModels() | |||
| 338 | 338 | /** | |
| 339 | 339 | * Register a new global scope on the model. | |
| 340 | 340 | * | |
| 341 | - * @param \Illuminate\Database\Eloquent\ScopeInterface|\Closure|string $scope | ||
| 341 | + * @param \Illuminate\Database\Eloquent\Scope|\Closure|string $scope | ||
| 342 | 342 | * @param \Closure|null $implementation | |
| 343 | 343 | * @return mixed | |
| 344 | 344 | * | |
@@ -354,17 +354,17 @@ public static function addGlobalScope($scope, Closure $implementation = null) | |||
| 354 | 354 | return static::$globalScopes[get_called_class()][uniqid('scope')] = $scope; | |
| 355 | 355 | } | |
| 356 | 356 | ||
| 357 | - if ($scope instanceof ScopeInterface) { | ||
| 357 | + if ($scope instanceof Scope) { | ||
| 358 | 358 | return static::$globalScopes[get_called_class()][get_class($scope)] = $scope; | |
| 359 | 359 | } | |
| 360 | 360 | ||
| 361 | - throw new InvalidArgumentException('Global scope must be an instance of Closure or ScopeInterface.'); | ||
| 361 | + throw new InvalidArgumentException('Global scope must be an instance of Closure or Scope.'); | ||
| 362 | 362 | } | |
| 363 | 363 | ||
| 364 | 364 | /** | |
| 365 | 365 | * Determine if a model has a global scope. | |
| 366 | 366 | * | |
| 367 | - * @param \Illuminate\Database\Eloquent\ScopeInterface|string $scope | ||
| 367 | + * @param \Illuminate\Database\Eloquent\Scope|string $scope | ||
| 368 | 368 | * @return bool | |
| 369 | 369 | */ | |
| 370 | 370 | public static function hasGlobalScope($scope) | |
@@ -375,8 +375,8 @@ public static function hasGlobalScope($scope) | |||
| 375 | 375 | /** | |
| 376 | 376 | * Get a global scope registered with the model. | |
| 377 | 377 | * | |
| 378 | - * @param \Illuminate\Database\Eloquent\ScopeInterface|string $scope | ||
| 379 | - * @return \Illuminate\Database\Eloquent\ScopeInterface|\Closure|null | ||
| 378 | + * @param \Illuminate\Database\Eloquent\Scope|string $scope | ||
| 379 | + * @return \Illuminate\Database\Eloquent\Scope|\Closure|null | ||
| 380 | 380 | */ | |
| 381 | 381 | public static function getGlobalScope($scope) | |
| 382 | 382 | { | |
@@ -1882,7 +1882,7 @@ public function newQuery() | |||
| 1882 | 1882 | /** | |
| 1883 | 1883 | * Get a new query instance without a given scope. | |
| 1884 | 1884 | * | |
| 1885 | - * @param \Illuminate\Database\Eloquent\ScopeInterface|string $scope | ||
| 1885 | + * @param \Illuminate\Database\Eloquent\Scope|string $scope | ||
| 1886 | 1886 | * @return \Illuminate\Database\Eloquent\Builder | |
| 1887 | 1887 | */ | |
| 1888 | 1888 | public function newQueryWithoutScope($scope) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | 3 | namespace Illuminate\Database\Eloquent; | |
| 4 | 4 | ||
| 5 | - class SoftDeletingScope implements ScopeInterface | ||
| 5 | + class SoftDeletingScope implements Scope | ||
| 6 | 6 | { | |
| 7 | 7 | /** | |
| 8 | 8 | * All of the extensions to be added to the builder. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -134,7 +134,7 @@ public static function boot() | |||
| 134 | 134 | } | |
| 135 | 135 | } | |
| 136 | 136 | ||
| 137 | - class ActiveScope implements \Illuminate\Database\Eloquent\ScopeInterface | ||
| 137 | + class ActiveScope implements \Illuminate\Database\Eloquent\Scope | ||
| 138 | 138 | { | |
| 139 | 139 | public function apply(\Illuminate\Database\Eloquent\Builder $builder, \Illuminate\Database\Eloquent\Model $model) | |
| 140 | 140 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments