php-cs-fixer

This commit is contained in:
Matthew Penner 2022-11-29 10:53:59 -07:00
parent 16e34af773
commit 3ea6d45cda
No known key found for this signature in database
87 changed files with 151 additions and 256 deletions

View file

@ -2,8 +2,6 @@
namespace Pterodactyl\Repositories\Eloquent;
use PDO;
use RuntimeException;
use Illuminate\Http\Request;
use Webmozart\Assert\Assert;
use Illuminate\Support\Collection;
@ -276,7 +274,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
return sprintf('(%s)', $grammar->parameterize($record));
})->implode(', ');
$driver = DB::getPdo()->getAttribute(PDO::ATTR_DRIVER_NAME);
$driver = DB::getPdo()->getAttribute(\PDO::ATTR_DRIVER_NAME);
switch ($driver) {
case 'mysql':
$statement = "insert ignore into $table ($columns) values $parameters";
@ -285,7 +283,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
$statement = "insert into $table ($columns) values $parameters on conflict do nothing";
break;
default:
throw new RuntimeException("Unsupported database driver \"$driver\" for insert ignore.");
throw new \RuntimeException("Unsupported database driver \"$driver\" for insert ignore.");
}
return $this->getBuilder()->getConnection()->statement($statement, $bindings);

View file

@ -2,7 +2,6 @@
namespace Pterodactyl\Repositories\Eloquent;
use Exception;
use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
class PermissionRepository extends EloquentRepository implements PermissionRepositoryInterface
@ -14,6 +13,6 @@ class PermissionRepository extends EloquentRepository implements PermissionRepos
*/
public function model(): string
{
throw new Exception('This functionality is not implemented.');
throw new \Exception('This functionality is not implemented.');
}
}

View file

@ -2,7 +2,6 @@
namespace Pterodactyl\Repositories;
use InvalidArgumentException;
use Illuminate\Foundation\Application;
use Illuminate\Database\Eloquent\Model;
use Pterodactyl\Contracts\Repository\RepositoryInterface;
@ -97,7 +96,7 @@ abstract class Repository implements RepositoryInterface
case 2:
return $this->model = call_user_func([$this->app->make($model[0]), $model[1]]);
default:
throw new InvalidArgumentException('Model must be a FQDN or an array with a count of two.');
throw new \InvalidArgumentException('Model must be a FQDN or an array with a count of two.');
}
}
}