php-cs-fixer
This commit is contained in:
parent
67bf3e342e
commit
363c4fd49f
7 changed files with 6 additions and 12 deletions
|
@ -233,7 +233,7 @@ final class Handler extends ExceptionHandler
|
||||||
/**
|
/**
|
||||||
* Return an array of exceptions that should not be reported.
|
* Return an array of exceptions that should not be reported.
|
||||||
*/
|
*/
|
||||||
public static function isReportable(Exception $exception): bool
|
public static function isReportable(\Exception $exception): bool
|
||||||
{
|
{
|
||||||
return (new static(Container::getInstance()))->shouldReport($exception);
|
return (new static(Container::getInstance()))->shouldReport($exception);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace Pterodactyl\Http\Controllers\Api\Client;
|
namespace Pterodactyl\Http\Controllers\Api\Client;
|
||||||
|
|
||||||
use Webmozart\Assert\Assert;
|
|
||||||
use Pterodactyl\Transformers\Api\Transformer;
|
use Pterodactyl\Transformers\Api\Transformer;
|
||||||
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
|
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ use Illuminate\Support\Collection;
|
||||||
use Pterodactyl\Models\EggVariable;
|
use Pterodactyl\Models\EggVariable;
|
||||||
use Illuminate\Database\ConnectionInterface;
|
use Illuminate\Database\ConnectionInterface;
|
||||||
use Pterodactyl\Services\Eggs\EggParserService;
|
use Pterodactyl\Services\Eggs\EggParserService;
|
||||||
use Pterodactyl\Exceptions\Service\InvalidFileUploadException;
|
|
||||||
use Pterodactyl\Exceptions\Service\Egg\BadJsonFormatException;
|
use Pterodactyl\Exceptions\Service\Egg\BadJsonFormatException;
|
||||||
|
use Pterodactyl\Exceptions\Service\InvalidFileUploadException;
|
||||||
|
|
||||||
class EggUpdateImporterService
|
class EggUpdateImporterService
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,12 +4,10 @@ namespace Pterodactyl\Transformers\Api\Client;
|
||||||
|
|
||||||
use Pterodactyl\Models\Egg;
|
use Pterodactyl\Models\Egg;
|
||||||
use Pterodactyl\Models\Server;
|
use Pterodactyl\Models\Server;
|
||||||
use Pterodactyl\Models\Subuser;
|
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
use Pterodactyl\Models\Allocation;
|
use Pterodactyl\Models\Allocation;
|
||||||
use Pterodactyl\Models\Permission;
|
use Pterodactyl\Models\Permission;
|
||||||
use Illuminate\Container\Container;
|
use Illuminate\Container\Container;
|
||||||
use Pterodactyl\Models\EggVariable;
|
|
||||||
use League\Fractal\Resource\Collection;
|
use League\Fractal\Resource\Collection;
|
||||||
use League\Fractal\Resource\NullResource;
|
use League\Fractal\Resource\NullResource;
|
||||||
use Pterodactyl\Transformers\Api\Transformer;
|
use Pterodactyl\Transformers\Api\Transformer;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace Pterodactyl\Transformers\Api\Client;
|
namespace Pterodactyl\Transformers\Api\Client;
|
||||||
|
|
||||||
use Illuminate\Support\Str;
|
|
||||||
use Pterodactyl\Models\User;
|
use Pterodactyl\Models\User;
|
||||||
use Pterodactyl\Transformers\Api\Transformer;
|
use Pterodactyl\Transformers\Api\Transformer;
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
namespace Pterodactyl\Transformers\Api;
|
namespace Pterodactyl\Transformers\Api;
|
||||||
|
|
||||||
use Closure;
|
|
||||||
use DateTimeInterface;
|
|
||||||
use Carbon\CarbonImmutable;
|
use Carbon\CarbonImmutable;
|
||||||
use Carbon\CarbonInterface;
|
use Carbon\CarbonInterface;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
@ -70,7 +68,7 @@ abstract class Transformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
protected function item($data, $transformer, ?string $resourceKey = null): Item
|
protected function item($data, $transformer, ?string $resourceKey = null): Item
|
||||||
{
|
{
|
||||||
if (!$transformer instanceof Closure) {
|
if (!$transformer instanceof \Closure) {
|
||||||
self::assertSameNamespace($transformer);
|
self::assertSameNamespace($transformer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +89,7 @@ abstract class Transformer extends TransformerAbstract
|
||||||
*/
|
*/
|
||||||
protected function collection($data, $transformer, ?string $resourceKey = null): Collection
|
protected function collection($data, $transformer, ?string $resourceKey = null): Collection
|
||||||
{
|
{
|
||||||
if (!$transformer instanceof Closure) {
|
if (!$transformer instanceof \Closure) {
|
||||||
self::assertSameNamespace($transformer);
|
self::assertSameNamespace($transformer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +143,7 @@ abstract class Transformer extends TransformerAbstract
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($timestamp instanceof DateTimeInterface) {
|
if ($timestamp instanceof \DateTimeInterface) {
|
||||||
$value = CarbonImmutable::instance($timestamp);
|
$value = CarbonImmutable::instance($timestamp);
|
||||||
} else {
|
} else {
|
||||||
$value = CarbonImmutable::createFromFormat(CarbonInterface::DEFAULT_TO_STRING_FORMAT, $timestamp);
|
$value = CarbonImmutable::createFromFormat(CarbonInterface::DEFAULT_TO_STRING_FORMAT, $timestamp);
|
||||||
|
|
|
@ -11,7 +11,7 @@ trait MocksMiddlewareClosure
|
||||||
* Provide a closure to be used when validating that the response from the middleware
|
* Provide a closure to be used when validating that the response from the middleware
|
||||||
* is the same request object we passed into it.
|
* is the same request object we passed into it.
|
||||||
*/
|
*/
|
||||||
protected function getClosureAssertions(): Closure
|
protected function getClosureAssertions(): \Closure
|
||||||
{
|
{
|
||||||
if (is_null($this->request)) {
|
if (is_null($this->request)) {
|
||||||
throw new \BadFunctionCallException('Calling getClosureAssertions without defining a request object is not supported.');
|
throw new \BadFunctionCallException('Calling getClosureAssertions without defining a request object is not supported.');
|
||||||
|
|
Loading…
Reference in a new issue