Skip to content

Commit

Permalink
Fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
mcg-web committed Dec 22, 2021
1 parent ee7a7f7 commit a2aa631
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private function resolveServiceIdAndMethod(ContainerBuilder $container, ?array &
$alias = $container->getAlias($id);
$id = (string) $alias;
$definition = $container->getDefinition($id);
} catch (ServiceNotFoundException | InvalidArgumentException $e) {
} catch (ServiceNotFoundException|InvalidArgumentException $e) {
if ($throw) {
throw $e;
}
Expand Down
9 changes: 5 additions & 4 deletions src/Generator/TypeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionLanguage as EL;
use Overblog\GraphQLBundle\Generator\Config\Arg;
use Overblog\GraphQLBundle\Generator\Config\Callback;
use Overblog\GraphQLBundle\Generator\Config\Config as GeneratorConfig;
use Overblog\GraphQLBundle\Generator\Config\Field;
use Overblog\GraphQLBundle\Generator\Config\Validation;
use Overblog\GraphQLBundle\Generator\Converter\ExpressionConverter;
Expand Down Expand Up @@ -79,7 +80,7 @@ final class TypeBuilder
private ExpressionConverter $expressionConverter;
private PhpFile $file;
private string $namespace;
private Config\Config $config;
private GeneratorConfig $config;
private string $type;
private string $currentField;
private string $gqlServices = '$'.TypeGenerator::GRAPHQL_SERVICES;
Expand Down Expand Up @@ -114,7 +115,7 @@ public function __construct(ExpressionConverter $expressionConverter, string $na
public function build(array $config, string $type): PhpFile
{
// This values should be accessible from every method
$this->config = new Config\Config($config);
$this->config = new GeneratorConfig($config);
$this->type = $type;

$this->file = PhpFile::new()->setNamespace($this->namespace);
Expand Down Expand Up @@ -439,7 +440,7 @@ private function buildScalarCallback($callback, string $fieldName)
*
* @throws GeneratorException
*/
private function buildResolver(Callback $resolver, ?array $groups = null): ?GeneratorInterface
private function buildResolver(Callback $resolver, ?array $groups = null): GeneratorInterface
{
// TODO: before creating an input validator, check if any validation rules are defined
return $this->buildCallback(
Expand Down Expand Up @@ -874,7 +875,7 @@ private function buildTypeResolver(Callback $typeResolver): GeneratorInterface
return $this->buildCallback($typeResolver, ['value', 'context', 'info']);
}

protected function buildCallback(Callback $callback, array $argNames, ?callable $expressionBuilder = null): GeneratorInterface
private function buildCallback(Callback $callback, array $argNames, ?callable $expressionBuilder = null): GeneratorInterface
{
if (null !== $callback->expression) {
if (null === $expressionBuilder) {
Expand Down

0 comments on commit a2aa631

Please sign in to comment.