@@ -65,15 +65,15 @@ |
||
65 | 65 | |
66 | 66 | /** @var NodeBuilder $rootNode */ |
67 | 67 | $config->scalarNode('target') |
68 | - ->info('Target node to properly paginate. If is possible will be auto-resolved using naming conventions') |
|
69 | - ->isRequired(); |
|
68 | + ->info('Target node to properly paginate. If is possible will be auto-resolved using naming conventions') |
|
69 | + ->isRequired(); |
|
70 | 70 | $config->integerNode('limit')->info('Max number of records allowed for first & last')->defaultValue($this->limit); |
71 | 71 | $config->scalarNode('parent_field') |
72 | - ->info('When is used in sub-fields should be the field to filter by parent instance'); |
|
72 | + ->info('When is used in sub-fields should be the field to filter by parent instance'); |
|
73 | 73 | $config->enumNode('parent_relation') |
74 | - ->info('When is used in sub-fields should be the type of relation with the parent field') |
|
75 | - ->defaultValue(self::ONE_TO_MANY) |
|
76 | - ->values([self::ONE_TO_MANY, self::MANY_TO_MANY]); |
|
74 | + ->info('When is used in sub-fields should be the type of relation with the parent field') |
|
75 | + ->defaultValue(self::ONE_TO_MANY) |
|
76 | + ->values([self::ONE_TO_MANY, self::MANY_TO_MANY]); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -81,7 +81,7 @@ |
||
81 | 81 | * |
82 | 82 | * @return null|string |
83 | 83 | */ |
84 | - public function getClassForType(string $type):?string |
|
84 | + public function getClassForType(string $type): ?string |
|
85 | 85 | { |
86 | 86 | if (isset($this->typeMap[$type])) { |
87 | 87 | return $this->typeMap[$type]; |
@@ -129,10 +129,10 @@ |
||
129 | 129 | $paramName = 'root'.mt_rand(); |
130 | 130 | if ($this->queryDefinition->getMeta('pagination')['parent_relation'] === PaginationDefinitionExtension::MANY_TO_MANY) { |
131 | 131 | $qb->andWhere(sprintf(':%s MEMBER OF %s.%s', $paramName, $this->queryAlias, $parentField)) |
132 | - ->setParameter($paramName, $root); |
|
132 | + ->setParameter($paramName, $root); |
|
133 | 133 | } else { |
134 | 134 | $qb->andWhere(sprintf('%s.%s = :%s', $this->queryAlias, $parentField, $paramName)) |
135 | - ->setParameter($paramName, $root); |
|
135 | + ->setParameter($paramName, $root); |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | $cursorOffset = $offset - 1; |
46 | 46 | foreach ($results as $result) { |
47 | - $cursorOffset ++; |
|
47 | + $cursorOffset++; |
|
48 | 48 | |
49 | 49 | if (!$this->connection->getPageInfo()->getStartCursor()) { |
50 | 50 | $this->connection->getPageInfo()->setStartCursor($this->encodeCursor($offset)); |
@@ -93,7 +93,7 @@ |
||
93 | 93 | //sort by priority |
94 | 94 | usort( |
95 | 95 | $orderedSpecifications, |
96 | - function ($tagSpecification1, $tagSpecification2) { |
|
96 | + function($tagSpecification1, $tagSpecification2) { |
|
97 | 97 | list($priority1) = $tagSpecification1; |
98 | 98 | list($priority2) = $tagSpecification2; |
99 | 99 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | $executor = $this; |
64 | 64 | $this->getObjectManager()->transactional( |
65 | - function () use ($executor, $fixtures, $append) { |
|
65 | + function() use ($executor, $fixtures, $append) { |
|
66 | 66 | if ($append === false) { |
67 | 67 | $executor->purge(); |
68 | 68 | } |
@@ -45,18 +45,18 @@ |
||
45 | 45 | [ |
46 | 46 | 'name' => $definition->getName(), |
47 | 47 | 'description' => $definition->getDescription(), |
48 | - 'fields' => function () { |
|
48 | + 'fields' => function() { |
|
49 | 49 | return $this->resolveFields(); |
50 | 50 | }, |
51 | - 'interfaces' => function () { |
|
51 | + 'interfaces' => function() { |
|
52 | 52 | return $this->resolveInterfaces(); |
53 | 53 | }, |
54 | - 'resolveField' => function ($root, array $args, $context, ResolveInfo $resolveInfo) { |
|
54 | + 'resolveField' => function($root, array $args, $context, ResolveInfo $resolveInfo) { |
|
55 | 55 | $resolver = new ObjectFieldResolver($this->container, $this->endpoint, $this->definition); |
56 | 56 | |
57 | 57 | return $resolver($root, $args, $context, $resolveInfo); |
58 | 58 | }, |
59 | - 'isTypeOf' => function ($value, $context, ResolveInfo $info) { |
|
59 | + 'isTypeOf' => function($value, $context, ResolveInfo $info) { |
|
60 | 60 | //TODO: implement this |
61 | 61 | }, |
62 | 62 | ] |
@@ -24,7 +24,7 @@ |
||
24 | 24 | { |
25 | 25 | $defaults = [ |
26 | 26 | 'name' => 'Mutation', |
27 | - 'fields' => function () { |
|
27 | + 'fields' => function() { |
|
28 | 28 | $mutations = []; |
29 | 29 | foreach ($this->endpoint->allMutations() as $query) { |
30 | 30 | $mutations[$query->getName()] = $this->getQueryConfig($query); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | $defaults = [ |
39 | 39 | 'name' => 'Query', |
40 | - 'fields' => function () { |
|
40 | + 'fields' => function() { |
|
41 | 41 | $queries = []; |
42 | 42 | foreach ($this->endpoint->allQueries() as $query) { |
43 | 43 | $queries[$query->getName()] = $this->getQueryConfig($query); |