Skip to content

Commit

Permalink
Merge pull request #47 from DirectoryTree/analysis-VrBoyP
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI

[ci skip] [skip ci]
  • Loading branch information
stevebauman committed Jan 10, 2020
2 parents f97fd94 + ffdf1fe commit 75ac0e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/Models/Concerns/HasGlobalScopes.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ trait HasGlobalScopes
/**
* Register a new global scope on the model.
*
* @param \LdapRecord\Models\ScopeInterface|\Closure|string $scope
* @param \Closure|null $implementation
*
* @return mixed
* @param \LdapRecord\Models\ScopeInterface|\Closure|string $scope
* @param \Closure|null $implementation
*
* @throws \InvalidArgumentException
*
* @return mixed
*/
public static function addGlobalScope($scope, Closure $implementation = null)
{
if (is_string($scope) && ! is_null($implementation)) {
if (is_string($scope) && !is_null($implementation)) {
return static::$globalScopes[static::class][$scope] = $implementation;
} elseif ($scope instanceof Closure) {
return static::$globalScopes[static::class][spl_object_hash($scope)] = $scope;
Expand All @@ -40,7 +40,7 @@ public static function addGlobalScope($scope, Closure $implementation = null)
*/
public static function hasGlobalScope($scope)
{
return ! is_null(static::getGlobalScope($scope));
return !is_null(static::getGlobalScope($scope));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public function registerModelScopes($builder)
*
* @return void
*/
public function registerGlobalScopes($builder, Model $model)
public function registerGlobalScopes($builder, self $model)
{
foreach ($this->getGlobalScopes() as $identifier => $scope) {
$scope instanceof ScopeInterface ?
Expand Down

0 comments on commit 75ac0e9

Please sign in to comment.