Use more standardized phpcs

This commit is contained in:
Dane Everitt 2021-01-23 12:33:34 -08:00
parent a043071e3c
commit c449ca5155
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
493 changed files with 1116 additions and 3903 deletions

View file

@ -27,8 +27,6 @@ class VariableValidatorService
/**
* VariableValidatorService constructor.
*
* @param \Illuminate\Contracts\Validation\Factory $validator
*/
public function __construct(ValidationFactory $validator)
{
@ -38,15 +36,12 @@ class VariableValidatorService
/**
* Validate all of the passed data against the given service option variables.
*
* @param int $egg
* @param array $fields
* @return \Illuminate\Support\Collection
* @throws \Illuminate\Validation\ValidationException
*/
public function handle(int $egg, array $fields = []): Collection
{
$query = EggVariable::query()->where('egg_id', $egg);
if (! $this->isUserLevel(User::USER_LEVEL_ADMIN)) {
if (!$this->isUserLevel(User::USER_LEVEL_ADMIN)) {
// Don't attempt to validate variables if they aren't user editable
// and we're not running this at an admin level.
$query = $query->where('user_editable', true)->where('user_viewable', true);