@@ -38,7 +38,7 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public function __construct(ServiceProcessor $processor = null) |
| 40 | 40 | { |
| 41 | - $this->processor = $processor ? : new ServiceProcessor(); |
|
| 41 | + $this->processor = $processor ?: new ServiceProcessor(); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public function getConfigKey() |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | //parse |
| 64 | 64 | array_walk_recursive( |
| 65 | 65 | $parsedValue, |
| 66 | - function (&$value) use ($definitionCall, $argumentIndex) { |
|
| 66 | + function(&$value) use ($definitionCall, $argumentIndex) { |
|
| 67 | 67 | foreach ($this->transformers as $transformer) { |
| 68 | 68 | if ($transformer->supportsDefinitionAndArgument($definitionCall, $argumentIndex, $value)) { |
| 69 | 69 | $value = $transformer->transformArgument($definitionCall, $argumentIndex, $value); |
@@ -30,15 +30,15 @@ |
||
| 30 | 30 | if (preg_match('/search\(/', $expression)) { |
| 31 | 31 | $el->register( |
| 32 | 32 | 'search', |
| 33 | - function ($expression, $data) { |
|
| 33 | + function($expression, $data) { |
|
| 34 | 34 | return sprintf('$search(%s, %s)', $expression, $data); |
| 35 | 35 | }, |
| 36 | - function (array $variables, $expression, $data) { |
|
| 36 | + function(array $variables, $expression, $data) { |
|
| 37 | 37 | return $variables['search']($expression, $data); |
| 38 | 38 | } |
| 39 | 39 | ); |
| 40 | 40 | |
| 41 | - $values['search'] = function ($expression, $data) { |
|
| 41 | + $values['search'] = function($expression, $data) { |
|
| 42 | 42 | return search($expression, $data); |
| 43 | 43 | }; |
| 44 | 44 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | if (!empty($this->warnings)) { |
| 56 | 56 | uasort( |
| 57 | 57 | $this->warnings, |
| 58 | - function ($a, $b) { |
|
| 58 | + function($a, $b) { |
|
| 59 | 59 | if (count($a) === count($b)) { |
| 60 | 60 | return 0; |
| 61 | 61 | } |
@@ -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 | } |
@@ -31,8 +31,8 @@ |
||
| 31 | 31 | protected function configure() |
| 32 | 32 | { |
| 33 | 33 | $this->setName('graphql:plugins') |
| 34 | - ->setDescription('Expose all available options for one or all graphql plugins') |
|
| 35 | - ->addArgument('plugin', InputArgument::OPTIONAL, 'Show only options for given plugin'); |
|
| 34 | + ->setDescription('Expose all available options for one or all graphql plugins') |
|
| 35 | + ->addArgument('plugin', InputArgument::OPTIONAL, 'Show only options for given plugin'); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | } |
| 69 | 69 | $this->definitionVisited[$key] = true; |
| 70 | 70 | |
| 71 | - $type = $endpoint->hasType($definition->getType()) ? $endpoint->getType($definition->getType()): null; |
|
| 71 | + $type = $endpoint->hasType($definition->getType()) ? $endpoint->getType($definition->getType()) : null; |
|
| 72 | 72 | |
| 73 | 73 | if (($roles = $definition->getRoles()) && !$this->authorizationChecker->isGranted($roles)) { |
| 74 | 74 | if ($parent) { |
@@ -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 | /** |