Skip to content

Commit e13e2df

Browse files
SerafimArtsStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent fa359dc commit e13e2df

File tree

21 files changed

+89
-89
lines changed

21 files changed

+89
-89
lines changed

src/SDL/Base/Definitions/BaseDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __debugInfo(): array
7171
*/
7272
public function jsonSerialize(): array
7373
{
74-
$data = $this->__sleep();
74+
$data = $this->__sleep();
7575
$result = [];
7676

7777
foreach ($data as $fieldName) {

src/SDL/Compiler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ class Compiler implements CompilerInterface, Configuration
7979
*/
8080
public function __construct(Storage $storage = null)
8181
{
82-
$this->parser = new Parser();
83-
$this->stack = new CallStack();
84-
$this->loader = new Loader($this, $this->stack);
82+
$this->parser = new Parser();
83+
$this->stack = new CallStack();
84+
$this->loader = new Loader($this, $this->stack);
8585
$this->typeValidator = new Validator($this->stack);
86-
$this->typeCoercion = new Factory();
86+
$this->typeCoercion = new Factory();
8787

8888
$this->storage = $this->bootStorage($storage);
8989

src/SDL/Contracts/Type.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,31 @@ interface Type
2525
*/
2626
public const SCHEMA = 'Schema';
2727

28-
public const OBJECT = 'Object';
29-
public const OBJECT_FIELD = 'Field'; // TODO Rename
28+
public const OBJECT = 'Object';
29+
public const OBJECT_FIELD = 'Field'; // TODO Rename
3030
public const OBJECT_ARGUMENT = 'Argument'; // TODO Rename
3131

32-
public const INTERFACE = 'Interface';
33-
public const INTERFACE_FIELD = 'Field'; // TODO Rename
32+
public const INTERFACE = 'Interface';
33+
public const INTERFACE_FIELD = 'Field'; // TODO Rename
3434
public const INTERFACE_ARGUMENT = 'Argument'; // TODO Rename
3535

36-
public const DIRECTIVE = 'Directive';
36+
public const DIRECTIVE = 'Directive';
3737
public const DIRECTIVE_ARGUMENT = 'Argument'; // TODO Rename
3838

39-
public const INPUT = 'Input';
39+
public const INPUT = 'Input';
4040
public const INPUT_FIELD = 'InputField';
4141

42-
public const ENUM = 'Enum';
42+
public const ENUM = 'Enum';
4343
public const ENUM_VALUE = 'EnumValue';
4444

45-
public const UNION = 'Union';
45+
public const UNION = 'Union';
4646
public const SCALAR = 'Scalar';
4747
/**#@-*/
4848

4949
/**#@+
5050
* Invocations
5151
*/
52-
public const INPUT_INVOCATION = self::INPUT;
52+
public const INPUT_INVOCATION = self::INPUT;
5353
public const DIRECTIVE_INVOCATION = self::DIRECTIVE;
5454
// Extensions
5555
public const EXTENSION = 'Extension';

src/SDL/Exceptions/BaseSchemaException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public function __construct(string $message, CallStackInterface $stack, \Throwab
4242

4343
$latest = $this->renderer->getLastRenderer();
4444

45-
$this->file = $latest->getFile();
46-
$this->line = $latest->getLine();
45+
$this->file = $latest->getFile();
46+
$this->line = $latest->getLine();
4747
$this->column = $latest->getColumn();
4848
}
4949

src/SDL/Parser/BaseParser.php

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -31,46 +31,46 @@
3131
*/
3232
class BaseParser extends Stateful
3333
{
34-
public const T_NON_NULL = 'T_NON_NULL';
35-
public const T_VAR = 'T_VAR';
36-
public const T_PARENTHESIS_OPEN = 'T_PARENTHESIS_OPEN';
37-
public const T_PARENTHESIS_CLOSE = 'T_PARENTHESIS_CLOSE';
38-
public const T_THREE_DOTS = 'T_THREE_DOTS';
39-
public const T_COLON = 'T_COLON';
40-
public const T_EQUAL = 'T_EQUAL';
41-
public const T_DIRECTIVE_AT = 'T_DIRECTIVE_AT';
42-
public const T_BRACKET_OPEN = 'T_BRACKET_OPEN';
43-
public const T_BRACKET_CLOSE = 'T_BRACKET_CLOSE';
44-
public const T_BRACE_OPEN = 'T_BRACE_OPEN';
45-
public const T_BRACE_CLOSE = 'T_BRACE_CLOSE';
46-
public const T_OR = 'T_OR';
47-
public const T_AND = 'T_AND';
48-
public const T_NUMBER_VALUE = 'T_NUMBER_VALUE';
49-
public const T_BOOL_TRUE = 'T_BOOL_TRUE';
50-
public const T_BOOL_FALSE = 'T_BOOL_FALSE';
51-
public const T_NULL = 'T_NULL';
52-
public const T_MULTILINE_STRING = 'T_MULTILINE_STRING';
53-
public const T_STRING = 'T_STRING';
54-
public const T_EXTENDS = 'T_EXTENDS';
55-
public const T_TYPE_IMPLEMENTS = 'T_TYPE_IMPLEMENTS';
56-
public const T_ON = 'T_ON';
57-
public const T_TYPE = 'T_TYPE';
58-
public const T_ENUM = 'T_ENUM';
59-
public const T_UNION = 'T_UNION';
60-
public const T_INTERFACE = 'T_INTERFACE';
61-
public const T_SCHEMA = 'T_SCHEMA';
62-
public const T_SCHEMA_QUERY = 'T_SCHEMA_QUERY';
63-
public const T_SCHEMA_MUTATION = 'T_SCHEMA_MUTATION';
34+
public const T_NON_NULL = 'T_NON_NULL';
35+
public const T_VAR = 'T_VAR';
36+
public const T_PARENTHESIS_OPEN = 'T_PARENTHESIS_OPEN';
37+
public const T_PARENTHESIS_CLOSE = 'T_PARENTHESIS_CLOSE';
38+
public const T_THREE_DOTS = 'T_THREE_DOTS';
39+
public const T_COLON = 'T_COLON';
40+
public const T_EQUAL = 'T_EQUAL';
41+
public const T_DIRECTIVE_AT = 'T_DIRECTIVE_AT';
42+
public const T_BRACKET_OPEN = 'T_BRACKET_OPEN';
43+
public const T_BRACKET_CLOSE = 'T_BRACKET_CLOSE';
44+
public const T_BRACE_OPEN = 'T_BRACE_OPEN';
45+
public const T_BRACE_CLOSE = 'T_BRACE_CLOSE';
46+
public const T_OR = 'T_OR';
47+
public const T_AND = 'T_AND';
48+
public const T_NUMBER_VALUE = 'T_NUMBER_VALUE';
49+
public const T_BOOL_TRUE = 'T_BOOL_TRUE';
50+
public const T_BOOL_FALSE = 'T_BOOL_FALSE';
51+
public const T_NULL = 'T_NULL';
52+
public const T_MULTILINE_STRING = 'T_MULTILINE_STRING';
53+
public const T_STRING = 'T_STRING';
54+
public const T_EXTENDS = 'T_EXTENDS';
55+
public const T_TYPE_IMPLEMENTS = 'T_TYPE_IMPLEMENTS';
56+
public const T_ON = 'T_ON';
57+
public const T_TYPE = 'T_TYPE';
58+
public const T_ENUM = 'T_ENUM';
59+
public const T_UNION = 'T_UNION';
60+
public const T_INTERFACE = 'T_INTERFACE';
61+
public const T_SCHEMA = 'T_SCHEMA';
62+
public const T_SCHEMA_QUERY = 'T_SCHEMA_QUERY';
63+
public const T_SCHEMA_MUTATION = 'T_SCHEMA_MUTATION';
6464
public const T_SCHEMA_SUBSCRIPTION = 'T_SCHEMA_SUBSCRIPTION';
65-
public const T_SCALAR = 'T_SCALAR';
66-
public const T_DIRECTIVE = 'T_DIRECTIVE';
67-
public const T_INPUT = 'T_INPUT';
68-
public const T_EXTEND = 'T_EXTEND';
69-
public const T_NAME = 'T_NAME';
70-
public const T_VARIABLE = 'T_VARIABLE';
71-
public const T_WHITESPACE = 'T_WHITESPACE';
72-
public const T_COMMENT = 'T_COMMENT';
73-
public const T_COMMA = 'T_COMMA';
65+
public const T_SCALAR = 'T_SCALAR';
66+
public const T_DIRECTIVE = 'T_DIRECTIVE';
67+
public const T_INPUT = 'T_INPUT';
68+
public const T_EXTEND = 'T_EXTEND';
69+
public const T_NAME = 'T_NAME';
70+
public const T_VARIABLE = 'T_VARIABLE';
71+
public const T_WHITESPACE = 'T_WHITESPACE';
72+
public const T_COMMENT = 'T_COMMENT';
73+
public const T_COMMA = 'T_COMMA';
7474

7575
/**
7676
* Lexical tokens list.

src/SDL/Reflection/Builder/Definitions/SchemaBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class SchemaBuilder extends BaseSchema implements Compilable
3838
public function __construct(NodeInterface $ast, DocumentBuilder $document)
3939
{
4040
$this->boot($ast, $document);
41-
$this->name = ($this->name ?? static::DEFAULT_SCHEMA_NAME);
41+
$this->name = ($this->name ?? static::DEFAULT_SCHEMA_NAME);
4242
$this->offset = $this->resolveSchemaOffset($ast);
4343
}
4444

src/SDL/Reflection/Builder/Dependent/ArgumentBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function onCompile(NodeInterface $ast): bool
5151
{
5252
if ($ast->is('Value')) {
5353
$this->hasDefaultValue = true;
54-
$this->defaultValue = $this->parseValue(
54+
$this->defaultValue = $this->parseValue(
5555
$ast->getChild(0),
5656
$this->getTypeDefinition()->getName()
5757
);

src/SDL/Reflection/Builder/DocumentBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ class DocumentBuilder extends BaseDocument implements Compilable
7777
public function __construct(NodeInterface $ast, Readable $readable, CompilerInterface $compiler)
7878
{
7979
$this->valueBuilder = new ValueBuilder($this);
80-
$this->compiler = $compiler;
81-
$this->file = $readable;
82-
$this->future = new \SplStack();
80+
$this->compiler = $compiler;
81+
$this->file = $readable;
82+
$this->future = new \SplStack();
8383

8484
try {
8585
$this->boot($ast, $this);

src/SDL/Reflection/Builder/Invocations/InputInvocationBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class InputInvocationBuilder extends BaseInputInvocation implements Compilable
4646
*/
4747
public function __construct(NodeInterface $ast, DocumentBuilder $document, string $parentType, array $path)
4848
{
49-
$this->path = $path;
49+
$this->path = $path;
5050
$this->parentType = $parentType;
5151
$this->boot($ast, $document);
5252
}
@@ -65,7 +65,7 @@ public function getName(): string
6565
*/
6666
protected function onCompile(NodeInterface $ast): bool
6767
{
68-
$key = (string)$ast->getChild(0)->getChild(0)->getValue();
68+
$key = (string)$ast->getChild(0)->getChild(0)->getValue();
6969
$value = $ast->getChild(1)->getChild(0);
7070

7171
$this->arguments[$key] = $this->parseValue($value, $this->parentType, \array_merge($this->path, [$key]));

src/SDL/Reflection/Builder/Invocations/ValueBuilder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
*/
2222
class ValueBuilder
2323
{
24-
private const AST_ID_ARRAY = 'List';
24+
private const AST_ID_ARRAY = 'List';
2525
private const AST_ID_OBJECT = 'Object';
2626

27-
private const TOKEN_NULL = 'T_NULL';
28-
private const TOKEN_NUMBER = 'T_NUMBER_VALUE';
29-
private const TOKEN_BOOL_TRUE = 'T_BOOL_TRUE';
27+
private const TOKEN_NULL = 'T_NULL';
28+
private const TOKEN_NUMBER = 'T_NUMBER_VALUE';
29+
private const TOKEN_BOOL_TRUE = 'T_BOOL_TRUE';
3030
private const TOKEN_BOOL_FALSE = 'T_BOOL_FALSE';
3131

3232
/**
@@ -183,7 +183,7 @@ private function renderSpecialCharacters(string $body): string
183183
{
184184
// TODO Probably may be escaped by backslash like "\\n".
185185
$source = ['\b', '\f', '\n', '\r', '\t'];
186-
$out = ["\u{0008}", "\u{000C}", "\u{000A}", "\u{000D}", "\u {0009}"];
186+
$out = ["\u{0008}", "\u{000C}", "\u{000A}", "\u{000D}", "\u {0009}"];
187187

188188
return \str_replace($source, $out, $body);
189189
}

0 commit comments

Comments
 (0)