@@ -25,17 +25,17 @@ |
||
25 | 25 | $this->validateConfig($config); |
26 | 26 | |
27 | 27 | // Bind things to the container |
28 | - $this->app->singleton(GraphQLService::class, function (Application $app) use ($config) { |
|
28 | + $this->app->singleton(GraphQLService::class, function(Application $app) use ($config) { |
|
29 | 29 | $processor = $config['processor'] ?? Processor::class; |
30 | 30 | |
31 | 31 | return new GraphQLService(new $processor(new $config['schema']), $app->make(CacheRepository::class)); |
32 | 32 | }); |
33 | 33 | |
34 | - $this->app->singleton(TypeResolverInterface::class, function () use ($config) { |
|
34 | + $this->app->singleton(TypeResolverInterface::class, function() use ($config) { |
|
35 | 35 | return new $config['type_resolver'](); |
36 | 36 | }); |
37 | 37 | |
38 | - $this->app->bind(GraphiQLTokenMiddleware::class, function () use ($config) { |
|
38 | + $this->app->bind(GraphiQLTokenMiddleware::class, function() use ($config) { |
|
39 | 39 | return new GraphiQLTokenMiddleware($config['enable_graphiql'], $config['graphiql_token'] ?? null); |
40 | 40 | }); |
41 | 41 | } |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | public function setUp() |
31 | 31 | { |
32 | 32 | $this->cache = $this->getMockBuilder(\Illuminate\Cache\Repository::class) |
33 | - ->disableOriginalConstructor() |
|
34 | - ->getMock(); |
|
33 | + ->disableOriginalConstructor() |
|
34 | + ->getMock(); |
|
35 | 35 | |
36 | 36 | $this->processor = new Processor(new Schema()); |
37 | 37 | $this->service = new GraphQLService($this->processor, $this->cache); |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | public function testGetProcessor() |
42 | 42 | { |
43 | 43 | $this->cache->expects($this->any()) |
44 | - ->method('get') |
|
45 | - ->with(GraphQLService::PROCESSOR_CACHE_KEY) |
|
46 | - ->willReturn($this->processor); |
|
44 | + ->method('get') |
|
45 | + ->with(GraphQLService::PROCESSOR_CACHE_KEY) |
|
46 | + ->willReturn($this->processor); |
|
47 | 47 | |
48 | 48 | $this->assertEquals($this->processor, $this->service->getProcessor()); |
49 | 49 | } |