Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -7,16 +7,12 @@ use Pterodactyl\Models\EggVariable;
|
|||
|
||||
class EggVariableTransformer extends BaseClientTransformer
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getResourceName(): string
|
||||
{
|
||||
return EggVariable::RESOURCE_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Pterodactyl\Models\EggVariable $variable
|
||||
* @return array
|
||||
*/
|
||||
public function transform(EggVariable $variable)
|
||||
|
@ -24,10 +20,8 @@ class EggVariableTransformer extends BaseClientTransformer
|
|||
// This guards against someone incorrectly retrieving variables (haha, me) and then passing
|
||||
// them into the transformer and along to the user. Just throw an exception and break the entire
|
||||
// pathway since you should never be exposing these types of variables to a client.
|
||||
if (! $variable->user_viewable) {
|
||||
throw new BadMethodCallException(
|
||||
'Cannot transform a hidden egg variable in a client transformer.'
|
||||
);
|
||||
if (!$variable->user_viewable) {
|
||||
throw new BadMethodCallException('Cannot transform a hidden egg variable in a client transformer.');
|
||||
}
|
||||
|
||||
return [
|
||||
|
|
Reference in a new issue