Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -29,6 +29,7 @@ class NestRepository extends EloquentRepository implements NestRepositoryInterfa
|
|||
* Return a nest or all nests with their associated eggs and variables.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Nest
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -37,10 +38,10 @@ class NestRepository extends EloquentRepository implements NestRepositoryInterfa
|
|||
{
|
||||
$instance = $this->getBuilder()->with('eggs', 'eggs.variables');
|
||||
|
||||
if (! is_null($id)) {
|
||||
if (!is_null($id)) {
|
||||
$instance = $instance->find($id, $this->getColumns());
|
||||
if (! $instance) {
|
||||
throw new RecordNotFoundException;
|
||||
if (!$instance) {
|
||||
throw new RecordNotFoundException();
|
||||
}
|
||||
|
||||
return $instance;
|
||||
|
@ -52,7 +53,6 @@ class NestRepository extends EloquentRepository implements NestRepositoryInterfa
|
|||
/**
|
||||
* Return a nest or all nests and the count of eggs and servers for that nest.
|
||||
*
|
||||
* @param int|null $id
|
||||
* @return \Pterodactyl\Models\Nest|\Illuminate\Database\Eloquent\Collection
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -61,10 +61,10 @@ class NestRepository extends EloquentRepository implements NestRepositoryInterfa
|
|||
{
|
||||
$instance = $this->getBuilder()->withCount(['eggs', 'servers']);
|
||||
|
||||
if (! is_null($id)) {
|
||||
if (!is_null($id)) {
|
||||
$instance = $instance->find($id, $this->getColumns());
|
||||
if (! $instance) {
|
||||
throw new RecordNotFoundException;
|
||||
if (!$instance) {
|
||||
throw new RecordNotFoundException();
|
||||
}
|
||||
|
||||
return $instance;
|
||||
|
@ -76,16 +76,13 @@ class NestRepository extends EloquentRepository implements NestRepositoryInterfa
|
|||
/**
|
||||
* Return a nest along with its associated eggs and the servers relation on those eggs.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Pterodactyl\Models\Nest
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getWithEggServers(int $id): Nest
|
||||
{
|
||||
$instance = $this->getBuilder()->with('eggs.servers')->find($id, $this->getColumns());
|
||||
if (! $instance) {
|
||||
throw new RecordNotFoundException;
|
||||
if (!$instance) {
|
||||
throw new RecordNotFoundException();
|
||||
}
|
||||
|
||||
/* @var Nest $instance */
|
||||
|
|
Reference in a new issue