Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -39,6 +39,7 @@ interface RepositoryInterface
|
|||
* An array of columns to filter the response by.
|
||||
*
|
||||
* @param array|string $columns
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setColumns($columns = ['*']);
|
||||
|
@ -62,7 +63,6 @@ interface RepositoryInterface
|
|||
* Set whether or not the repository should return a fresh model
|
||||
* when changes are committed.
|
||||
*
|
||||
* @param bool $fresh
|
||||
* @return $this
|
||||
*/
|
||||
public function setFreshModel(bool $fresh = true);
|
||||
|
@ -70,9 +70,6 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Create a new model instance and persist it to the database.
|
||||
*
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @param bool $force
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
|
@ -82,7 +79,6 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Find a model that has the specific ID passed.
|
||||
*
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -91,16 +87,12 @@ interface RepositoryInterface
|
|||
|
||||
/**
|
||||
* Find a model matching an array of where clauses.
|
||||
*
|
||||
* @param array $fields
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function findWhere(array $fields): Collection;
|
||||
|
||||
/**
|
||||
* Find and return the first matching instance for the given fields.
|
||||
*
|
||||
* @param array $fields
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -109,25 +101,16 @@ interface RepositoryInterface
|
|||
|
||||
/**
|
||||
* Return a count of records matching the passed arguments.
|
||||
*
|
||||
* @param array $fields
|
||||
* @return int
|
||||
*/
|
||||
public function findCountWhere(array $fields): int;
|
||||
|
||||
/**
|
||||
* Delete a given record from the database.
|
||||
*
|
||||
* @param int $id
|
||||
* @return int
|
||||
*/
|
||||
public function delete(int $id): int;
|
||||
|
||||
/**
|
||||
* Delete records matching the given attributes.
|
||||
*
|
||||
* @param array $attributes
|
||||
* @return int
|
||||
*/
|
||||
public function deleteWhere(array $attributes): int;
|
||||
|
||||
|
@ -135,9 +118,7 @@ interface RepositoryInterface
|
|||
* Update a given ID with the passed array of fields.
|
||||
*
|
||||
* @param int $id
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @param bool $force
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
|
@ -148,21 +129,12 @@ interface RepositoryInterface
|
|||
/**
|
||||
* Perform a mass update where matching records are updated using whereIn.
|
||||
* This does not perform any model data validation.
|
||||
*
|
||||
* @param string $column
|
||||
* @param array $values
|
||||
* @param array $fields
|
||||
* @return int
|
||||
*/
|
||||
public function updateWhereIn(string $column, array $values, array $fields): int;
|
||||
|
||||
/**
|
||||
* Update a record if it exists in the database, otherwise create it.
|
||||
*
|
||||
* @param array $where
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @param bool $force
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
|
@ -171,40 +143,27 @@ interface RepositoryInterface
|
|||
|
||||
/**
|
||||
* Return all records associated with the given model.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function all(): Collection;
|
||||
|
||||
/**
|
||||
* Return a paginated result set using a search term if set on the repository.
|
||||
*
|
||||
* @param int $perPage
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
*/
|
||||
public function paginated(int $perPage): LengthAwarePaginator;
|
||||
|
||||
/**
|
||||
* Insert a single or multiple records into the database at once skipping
|
||||
* validation and mass assignment checking.
|
||||
*
|
||||
* @param array $data
|
||||
* @return bool
|
||||
*/
|
||||
public function insert(array $data): bool;
|
||||
|
||||
/**
|
||||
* Insert multiple records into the database and ignore duplicates.
|
||||
*
|
||||
* @param array $values
|
||||
* @return bool
|
||||
*/
|
||||
public function insertIgnore(array $values): bool;
|
||||
|
||||
/**
|
||||
* Get the amount of entries in the database.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count(): int;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue