@@ -14,7 +14,6 @@ |
||
| 14 | 14 | use Railt\Foundation\Events\TypeBuilding; |
| 15 | 15 | use Railt\Foundation\Extensions\BaseExtension; |
| 16 | 16 | use Railt\Io\File; |
| 17 | -use Railt\Reflection\Contracts\Definitions\InputDefinition; |
|
| 18 | 17 | use Railt\Reflection\Contracts\Definitions\TypeDefinition; |
| 19 | 18 | use Railt\Reflection\Contracts\Dependent\FieldDefinition; |
| 20 | 19 | use Railt\Routing\Contracts\RouterInterface; |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | /** |
| 31 | 31 | * @var string Path to graphql schema file |
| 32 | 32 | */ |
| 33 | - private const GRAPHQL_DATETIME = __DIR__ . '/../resources/datetime.graphqls'; |
|
| 33 | + private const GRAPHQL_DATETIME = __DIR__.'/../resources/datetime.graphqls'; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * @param Compiler $compiler |
@@ -92,6 +92,6 @@ |
||
| 92 | 92 | return static::HUMAN_READABLE; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - return \constant(Carbon::class . '::' . $value); |
|
| 95 | + return \constant(Carbon::class.'::'.$value); |
|
| 96 | 96 | } |
| 97 | 97 | } |
@@ -25,8 +25,8 @@ |
||
| 25 | 25 | public function fromString(string $value): \DateTimeInterface |
| 26 | 26 | { |
| 27 | 27 | try { |
| 28 | - if ((string)(int)$value === $value) { |
|
| 29 | - return Carbon::createFromTimestamp((int)$value); |
|
| 28 | + if ((string) (int) $value === $value) { |
|
| 29 | + return Carbon::createFromTimestamp((int) $value); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | return Carbon::parse($value); |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | case \is_string($value): |
| 40 | 40 | return Carbon::parse($value); |
| 41 | 41 | case \is_int($value) || \is_float($value): |
| 42 | - return Carbon::createFromTimestamp((int)$value); |
|
| 42 | + return Carbon::createFromTimestamp((int) $value); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | $error = 'Response type of field %f should be a DateTime, string or int, but %s given'; |