Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -8,8 +8,6 @@ class GetSubuserRequest extends SubuserRequest
|
|||
{
|
||||
/**
|
||||
* Confirm that a user is able to view subusers for the specified server.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function permission(): string
|
||||
{
|
||||
|
|
|
@ -14,9 +14,6 @@ class StoreSubuserRequest extends SubuserRequest
|
|||
return Permission::ACTION_USER_CREATE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
@ -18,13 +18,11 @@ abstract class SubuserRequest extends ClientApiRequest
|
|||
/**
|
||||
* Authorize the request and ensure that a user is not trying to modify themselves.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
if (! parent::authorize()) {
|
||||
if (!parent::authorize()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -51,8 +49,6 @@ abstract class SubuserRequest extends ClientApiRequest
|
|||
* Validates that the permissions we are trying to assign can actually be assigned
|
||||
* by the user making the request.
|
||||
*
|
||||
* @param array $permissions
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
protected function validatePermissionsCanBeAssigned(array $permissions)
|
||||
|
@ -74,9 +70,7 @@ abstract class SubuserRequest extends ClientApiRequest
|
|||
$service = $this->container->make(GetUserPermissionsService::class);
|
||||
|
||||
if (count(array_diff($permissions, $service->handle($server, $user))) > 0) {
|
||||
throw new HttpForbiddenException(
|
||||
'Cannot assign permissions to a subuser that your account does not actively possess.'
|
||||
);
|
||||
throw new HttpForbiddenException('Cannot assign permissions to a subuser that your account does not actively possess.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,9 +14,6 @@ class UpdateSubuserRequest extends SubuserRequest
|
|||
return Permission::ACTION_USER_UPDATE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue