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

@ -15,7 +15,7 @@ use Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException;
*/
abstract class BaseTransformer extends TransformerAbstract
{
const RESPONSE_TIMEZONE = 'UTC';
public const RESPONSE_TIMEZONE = 'UTC';
/**
* @var \Pterodactyl\Models\ApiKey
@ -24,8 +24,6 @@ abstract class BaseTransformer extends TransformerAbstract
/**
* Return the resource name for the JSONAPI output.
*
* @return string
*/
abstract public function getResourceName(): string;
@ -43,7 +41,6 @@ abstract class BaseTransformer extends TransformerAbstract
/**
* Set the HTTP request class being used for this request.
*
* @param \Pterodactyl\Models\ApiKey $key
* @return $this
*/
public function setKey(ApiKey $key)
@ -55,8 +52,6 @@ abstract class BaseTransformer extends TransformerAbstract
/**
* Return the request instance being used for this transformer.
*
* @return \Pterodactyl\Models\ApiKey
*/
public function getKey(): ApiKey
{
@ -67,9 +62,6 @@ abstract class BaseTransformer extends TransformerAbstract
* Determine if the API key loaded onto the transformer has permission
* to access a different resource. This is used when including other
* models on a transformation request.
*
* @param string $resource
* @return bool
*/
protected function authorize(string $resource): bool
{
@ -80,8 +72,6 @@ abstract class BaseTransformer extends TransformerAbstract
* Create a new instance of the transformer and pass along the currently
* set API key.
*
* @param string $abstract
* @param array $parameters
* @return \Pterodactyl\Transformers\Api\Application\BaseTransformer
*
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
@ -92,7 +82,7 @@ abstract class BaseTransformer extends TransformerAbstract
$transformer = Container::getInstance()->makeWith($abstract, $parameters);
$transformer->setKey($this->getKey());
if (! $transformer instanceof self) {
if (!$transformer instanceof self) {
throw new InvalidTransformerLevelException('Calls to ' . __METHOD__ . ' must return a transformer that is an instance of ' . __CLASS__);
}
@ -101,9 +91,6 @@ abstract class BaseTransformer extends TransformerAbstract
/**
* Return an ISO-8601 formatted timestamp to use in the API response.
*
* @param string $timestamp
* @return string
*/
protected function formatTimestamp(string $timestamp): string
{