Massive PHPCS linting

This commit is contained in:
Dane Everitt 2017-08-21 22:10:48 -05:00
parent 78c8b8d8ea
commit 3ee5803416
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
346 changed files with 834 additions and 1424 deletions

View file

@ -85,7 +85,8 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
public function createDatabase($database, $connection = null)
{
return $this->runStatement(
sprintf('CREATE DATABASE IF NOT EXISTS `%s`', $database), $connection
sprintf('CREATE DATABASE IF NOT EXISTS `%s`', $database),
$connection
);
}
@ -95,7 +96,8 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
public function createUser($username, $remote, $password, $connection = null)
{
return $this->runStatement(
sprintf('CREATE USER `%s`@`%s` IDENTIFIED BY \'%s\'', $username, $remote, $password), $connection
sprintf('CREATE USER `%s`@`%s` IDENTIFIED BY \'%s\'', $username, $remote, $password),
$connection
);
}
@ -107,7 +109,9 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
return $this->runStatement(
sprintf(
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON `%s`.* TO `%s`@`%s`',
$database, $username, $remote
$database,
$username,
$remote
),
$connection
);
@ -127,7 +131,8 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
public function dropDatabase($database, $connection = null)
{
return $this->runStatement(
sprintf('DROP DATABASE IF EXISTS `%s`', $database), $connection
sprintf('DROP DATABASE IF EXISTS `%s`', $database),
$connection
);
}
@ -137,15 +142,16 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
public function dropUser($username, $remote, $connection = null)
{
return $this->runStatement(
sprintf('DROP USER IF EXISTS `%s`@`%s`', $username, $remote), $connection
sprintf('DROP USER IF EXISTS `%s`@`%s`', $username, $remote),
$connection
);
}
/**
* Run the provided statement against the database on a given connection.
*
* @param string $statement
* @param null|string $connection
* @param string $statement
* @param null|string $connection
* @return bool
*/
protected function runStatement($statement, $connection = null)

View file

@ -44,7 +44,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
/**
* {@inheritdoc}
* @param bool $force
* @param bool $force
* @return \Illuminate\Database\Eloquent\Model|bool
*/
public function create(array $fields, $validate = true, $force = false)
@ -214,7 +214,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
/**
* Insert multiple records into the database and ignore duplicates.
*
* @param array $values
* @param array $values
* @return bool
*/
public function insertIgnore(array $values)

View file

@ -47,7 +47,10 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
public function getUsageStats($id)
{
$node = $this->getBuilder()->select(
'nodes.disk_overallocate', 'nodes.memory_overallocate', 'nodes.disk', 'nodes.memory',
'nodes.disk_overallocate',
'nodes.memory_overallocate',
'nodes.disk',
'nodes.memory',
$this->getBuilder()->raw('SUM(servers.memory) as sum_memory, SUM(servers.disk) as sum_disk')
)->join('servers', 'servers.node_id', '=', 'nodes.id')
->where('nodes.id', $id)

View file

@ -72,7 +72,8 @@ class UserRepository extends EloquentRepository implements UserRepositoryInterfa
}
return $users->paginate(
$this->config->get('pterodactyl.paginate.admin.users'), $this->getColumns()
$this->config->get('pterodactyl.paginate.admin.users'),
$this->getColumns()
);
}