@@ -84,8 +84,8 @@ |
||
| 84 | 84 | |
| 85 | 85 | $qb = $repo->createQueryBuilder('o', $findBy); |
| 86 | 86 | $entities = $qb->where($qb->expr()->in($findBy, $searchValues)) |
| 87 | - ->getQuery() |
|
| 88 | - ->getResult(); |
|
| 87 | + ->getQuery() |
|
| 88 | + ->getResult(); |
|
| 89 | 89 | |
| 90 | 90 | foreach ($entities as $searchValue => $entity) { |
| 91 | 91 | $expectedResultsOrder[md5($type.$searchValue)] = $entity; |
@@ -92,8 +92,8 @@ |
||
| 92 | 92 | $repo = $this->registry->getRepository($class); |
| 93 | 93 | $qb = $repo->createQueryBuilder('o', 'o.id'); |
| 94 | 94 | $entities = $qb->where($qb->expr()->in('o.id', $ids)) |
| 95 | - ->getQuery() |
|
| 96 | - ->getResult(); |
|
| 95 | + ->getQuery() |
|
| 96 | + ->getResult(); |
|
| 97 | 97 | self::$deferred[$class] = $entities; |
| 98 | 98 | } |
| 99 | 99 | } |
@@ -207,10 +207,10 @@ |
||
| 207 | 207 | $paramName = 'root'.mt_rand(); |
| 208 | 208 | if ($this->queryDefinition->getMeta('pagination')['parent_relation'] === PaginationDefinitionPlugin::MANY_TO_MANY) { |
| 209 | 209 | $qb->andWhere(sprintf(':%s MEMBER OF %s.%s', $paramName, $this->queryAlias, $parentField)) |
| 210 | - ->setParameter($paramName, $root); |
|
| 210 | + ->setParameter($paramName, $root); |
|
| 211 | 211 | } else { |
| 212 | 212 | $qb->andWhere(sprintf('%s.%s = :%s', $this->queryAlias, $parentField, $paramName)) |
| 213 | - ->setParameter($paramName, $root); |
|
| 213 | + ->setParameter($paramName, $root); |
|
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | } |
@@ -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 | /** |
@@ -67,22 +67,22 @@ |
||
| 67 | 67 | ->children(); |
| 68 | 68 | |
| 69 | 69 | $config->variableNode('type') |
| 70 | - ->defaultNull() |
|
| 71 | - ->info( |
|
| 72 | - 'Specify the form type to use, |
|
| 70 | + ->defaultNull() |
|
| 71 | + ->info( |
|
| 72 | + 'Specify the form type to use, |
|
| 73 | 73 | [string] Name of the form type to use |
| 74 | 74 | [true|null] The form will be automatically resolved to ...Bundle\Form\Input\{Node}\{MutationName}Input. |
| 75 | 75 | [true] Throw a exception if the form can`t be located |
| 76 | 76 | [false] The form is not required and should not be resolved' |
| 77 | - ); |
|
| 77 | + ); |
|
| 78 | 78 | $config->variableNode('options')->defaultValue([])->info('Form options'); |
| 79 | 79 | $config->variableNode('argument') |
| 80 | - ->defaultValue('input') |
|
| 81 | - ->info('Name of the argument to use as input'); |
|
| 80 | + ->defaultValue('input') |
|
| 81 | + ->info('Name of the argument to use as input'); |
|
| 82 | 82 | |
| 83 | 83 | $config->booleanNode('client_mutation_id') |
| 84 | - ->defaultTrue() |
|
| 85 | - ->info('Automatically add a field called clientMutationId'); |
|
| 84 | + ->defaultTrue() |
|
| 85 | + ->info('Automatically add a field called clientMutationId'); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
@@ -216,10 +216,10 @@ |
||
| 216 | 216 | |
| 217 | 217 | if (!$node instanceof NodeInterface) { |
| 218 | 218 | $nodeClass = static::getClient() |
| 219 | - ->getContainer() |
|
| 220 | - ->get(DefinitionRegistry::class) |
|
| 221 | - ->getEndpoint() |
|
| 222 | - ->getClassForType($nodeType); |
|
| 219 | + ->getContainer() |
|
| 220 | + ->get(DefinitionRegistry::class) |
|
| 221 | + ->getEndpoint() |
|
| 222 | + ->getClassForType($nodeType); |
|
| 223 | 223 | |
| 224 | 224 | $node = self::getDoctrine()->getEntityManager()->getReference($nodeClass, $node); |
| 225 | 225 | } |
@@ -103,9 +103,9 @@ |
||
| 103 | 103 | |
| 104 | 104 | /** @var iterable $files */ |
| 105 | 105 | $files = Finder::create() |
| 106 | - ->in($dirs) |
|
| 107 | - ->date(sprintf('>= %s', date('Y-m-d H:i:s', $controlTime))) |
|
| 108 | - ->files(); |
|
| 106 | + ->in($dirs) |
|
| 107 | + ->date(sprintf('>= %s', date('Y-m-d H:i:s', $controlTime))) |
|
| 108 | + ->files(); |
|
| 109 | 109 | |
| 110 | 110 | //exist at least one modified file |
| 111 | 111 | foreach ($files as $file) { |
@@ -42,10 +42,10 @@ |
||
| 42 | 42 | protected function configure() |
| 43 | 43 | { |
| 44 | 44 | $this->setName('graphql:schema:export') |
| 45 | - ->setDescription('Export your schema.') |
|
| 46 | - ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
| 47 | - ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'Name of the file to save the schema, e.i. schema.graphql or schema.json') |
|
| 48 | - ->addOption('json', null, InputOption::VALUE_NONE, 'Create json output, automatically used if the output contains json extension'); |
|
| 45 | + ->setDescription('Export your schema.') |
|
| 46 | + ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
| 47 | + ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'Name of the file to save the schema, e.i. schema.graphql or schema.json') |
|
| 48 | + ->addOption('json', null, InputOption::VALUE_NONE, 'Create json output, automatically used if the output contains json extension'); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -57,11 +57,11 @@ |
||
| 57 | 57 | protected function configure() |
| 58 | 58 | { |
| 59 | 59 | $this->setName('graphql:schema:snapshot') |
| 60 | - ->setDescription('Create a snapshot of your schema to compare using behat tests.') |
|
| 61 | - ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
| 62 | - ->addOption('all', 'a', InputOption::VALUE_NONE, 'Create snapshot for all registered endpoints') |
|
| 63 | - ->addOption('strict', null, InputOption::VALUE_NONE, 'When use strict mode the snapshot must be updated every time your schema change') |
|
| 64 | - ->addOption('features', null, InputOption::VALUE_REQUIRED, 'Path where should be located the generated features and fixtures'); |
|
| 60 | + ->setDescription('Create a snapshot of your schema to compare using behat tests.') |
|
| 61 | + ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
| 62 | + ->addOption('all', 'a', InputOption::VALUE_NONE, 'Create snapshot for all registered endpoints') |
|
| 63 | + ->addOption('strict', null, InputOption::VALUE_NONE, 'When use strict mode the snapshot must be updated every time your schema change') |
|
| 64 | + ->addOption('features', null, InputOption::VALUE_REQUIRED, 'Path where should be located the generated features and fixtures'); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |