Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Jan 25, 2024
1 parent 92356fe commit 7c8bebb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Eloquent/Traits/BuildsAdjacencyListQueries.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Staudenmeir\LaravelAdjacencyList\Eloquent\Traits;

use Illuminate\Database\PostgresConnection;
use Illuminate\Support\Str;
use PDO;
use RuntimeException;
use Staudenmeir\LaravelAdjacencyList\Query\Grammars\MariaDbGrammar;
Expand Down Expand Up @@ -84,7 +83,7 @@ public function getExpressionGrammar()
case 'mysql':
$version = $this->query->getConnection()->getReadPdo()->getAttribute(PDO::ATTR_SERVER_VERSION);

$grammar = Str::contains($version, 'MariaDB')
$grammar = str_contains($version, 'MariaDB')
? new MariaDbGrammar($this->model)
: new MySqlGrammar($this->model);

Expand Down
3 changes: 1 addition & 2 deletions src/Eloquent/Traits/HasAdjacencyList.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use Staudenmeir\LaravelAdjacencyList\Eloquent\Collection;
use Staudenmeir\LaravelAdjacencyList\Eloquent\Relations\Ancestors;
use Staudenmeir\LaravelAdjacencyList\Eloquent\Relations\Bloodline;
Expand Down Expand Up @@ -368,7 +367,7 @@ public function hasNestedPath()
{
$path = $this->attributes[$this->getPathName()];

return Str::contains($path, $this->getPathSeparator());
return str_contains($path, $this->getPathSeparator());
}

/**
Expand Down

0 comments on commit 7c8bebb

Please sign in to comment.