@@ -9,7 +9,7 @@  | 
                                                    ||
| 9 | 9 | public function filterByType(string $type): GeneratedCollection  | 
                                                        
| 10 | 10 |      { | 
                                                        
| 11 | 11 | return $this->filter(  | 
                                                        
| 12 | -            function ($i) use ($type) { | 
                                                        |
| 12 | +            function($i) use ($type) { | 
                                                        |
| 13 | 13 | return $i->type == $type;  | 
                                                        
| 14 | 14 | }  | 
                                                        
| 15 | 15 | );  | 
                                                        
@@ -10,7 +10,7 @@ discard block  | 
                                                    ||
| 10 | 10 | public function generate(): GeneratedCollection  | 
                                                        
| 11 | 11 |      { | 
                                                        
| 12 | 12 | return new GeneratedCollection(  | 
                                                        
| 13 | - [ new GeneratedItem(  | 
                                                        |
| 13 | + [new GeneratedItem(  | 
                                                        |
| 14 | 14 | GeneratedItem::TYPE_FACTORY,  | 
                                                        
| 15 | 15 | $this->generateString(),  | 
                                                        
| 16 | 16 | $this->getGenerateFilename()  | 
                                                        
@@ -25,6 +25,6 @@ discard block  | 
                                                    ||
| 25 | 25 | |
| 26 | 26 | public function getGenerateFilename(): string  | 
                                                        
| 27 | 27 |      { | 
                                                        
| 28 | -        return $this->getBasePath('database/factories/'. $this->studlyName . 'Factory.php'); | 
                                                        |
| 28 | +        return $this->getBasePath('database/factories/' . $this->studlyName . 'Factory.php'); | 
                                                        |
| 29 | 29 | }  | 
                                                        
| 30 | 30 | }  | 
                                                        
@@ -159,7 +159,7 @@ discard block  | 
                                                    ||
| 159 | 159 |      { | 
                                                        
| 160 | 160 | $originalTypeLoader = $this->schema->getConfig()->typeLoader;  | 
                                                        
| 161 | 161 | |
| 162 | -        $this->schema->getConfig()->typeLoader = function ($typeName) use ($originalTypeLoader) { | 
                                                        |
| 162 | +        $this->schema->getConfig()->typeLoader = function($typeName) use ($originalTypeLoader) { | 
                                                        |
| 163 | 163 | $type = $originalTypeLoader($typeName);  | 
                                                        
| 164 | 164 |              if ($type instanceof \GraphQL\Type\Definition\CustomScalarType) { | 
                                                        
| 165 | 165 | $scalarName = $type->name;  | 
                                                        
@@ -174,7 +174,7 @@ discard block  | 
                                                    ||
| 174 | 174 |      { | 
                                                        
| 175 | 175 | $this->ast = Visitor::visit($this->ast, [  | 
                                                        
| 176 | 176 | // load the scalar type classes  | 
                                                        
| 177 | -            NodeKind::SCALAR_TYPE_DEFINITION => function ($node) { | 
                                                        |
| 177 | +            NodeKind::SCALAR_TYPE_DEFINITION => function($node) { | 
                                                        |
| 178 | 178 | $scalarName = $node->name->value;  | 
                                                        
| 179 | 179 | |
| 180 | 180 | // load classes  | 
                                                        
@@ -237,7 +237,7 @@ discard block  | 
                                                    ||
| 237 | 237 | return [];  | 
                                                        
| 238 | 238 | }  | 
                                                        
| 239 | 239 | return array_map(  | 
                                                        
| 240 | -            function ($i) use ($basedir) { | 
                                                        |
| 240 | +            function($i) use ($basedir) { | 
                                                        |
| 241 | 241 | $name = $i[1];  | 
                                                        
| 242 | 242 |                  if (array_key_exists($name, $this->imports)) { | 
                                                        
| 243 | 243 | return $this->imports[$name];  | 
                                                        
@@ -168,6 +168,6 @@  | 
                                                    ||
| 168 | 168 | |
| 169 | 169 | public function getGenerateFilename(string $name): string  | 
                                                        
| 170 | 170 |      { | 
                                                        
| 171 | -        return $this->getBasePath('app/Policies/'. Str::studly($name) . 'Policy.php'); | 
                                                        |
| 171 | +        return $this->getBasePath('app/Policies/' . Str::studly($name) . 'Policy.php'); | 
                                                        |
| 172 | 172 | }  | 
                                                        
| 173 | 173 | }  | 
                                                        
@@ -106,7 +106,7 @@  | 
                                                    ||
| 106 | 106 |                      throw new Exception("Directive $validator does not have argument $argName"); | 
                                                        
| 107 | 107 | }  | 
                                                        
| 108 | 108 |                  if ($argValidator->type === 'Int') { | 
                                                        
| 109 | - $argValue = (int)$argValue;  | 
                                                        |
| 109 | + $argValue = (int) $argValue;  | 
                                                        |
| 110 | 110 | }  | 
                                                        
| 111 | 111 | $arguments[$argName] = $argValue;  | 
                                                        
| 112 | 112 | }  | 
                                                        
@@ -74,7 +74,7 @@ discard block  | 
                                                    ||
| 74 | 74 | * @param string[] $directiveNamespaces  | 
                                                        
| 75 | 75 | * @return array<string, string>  | 
                                                        
| 76 | 76 | */  | 
                                                        
| 77 | - public static function getDirectivesGraphql($directiveNamespaces = [ 'Modelarium\Laravel\Lighthouse\Directives' ]): array  | 
                                                        |
| 77 | + public static function getDirectivesGraphql($directiveNamespaces = ['Modelarium\Laravel\Lighthouse\Directives']): array  | 
                                                        |
| 78 | 78 |      { | 
                                                        
| 79 | 79 | $directives = [];  | 
                                                        
| 80 | 80 | |
@@ -84,15 +84,15 @@ discard block  | 
                                                    ||
| 84 | 84 | |
| 85 | 85 |              foreach ($classesInNamespace as $class) { | 
                                                        
| 86 | 86 | $reflection = new \ReflectionClass($class);  | 
                                                        
| 87 | -                if (! $reflection->isInstantiable()) { | 
                                                        |
| 87 | +                if (!$reflection->isInstantiable()) { | 
                                                        |
| 88 | 88 | continue;  | 
                                                        
| 89 | 89 | }  | 
                                                        
| 90 | 90 | |
| 91 | -                if (! is_a($class, \Nuwave\Lighthouse\Schema\Directives\BaseDirective::class, true)) { | 
                                                        |
| 91 | +                if (!is_a($class, \Nuwave\Lighthouse\Schema\Directives\BaseDirective::class, true)) { | 
                                                        |
| 92 | 92 | continue;  | 
                                                        
| 93 | 93 | }  | 
                                                        
| 94 | 94 | |
| 95 | - $name = DirectiveFactory::directiveName((string)$class);  | 
                                                        |
| 95 | + $name = DirectiveFactory::directiveName((string) $class);  | 
                                                        |
| 96 | 96 | $directives[$name] = trim($class::definition());  | 
                                                        
| 97 | 97 | }  | 
                                                        
| 98 | 98 | }  | 
                                                        
@@ -106,7 +106,7 @@ discard block  | 
                                                    ||
| 106 | 106 | * @param string[] $directiveNamespaces  | 
                                                        
| 107 | 107 | * @return string  | 
                                                        
| 108 | 108 | */  | 
                                                        
| 109 | - public static function getDirectivesGraphqlString($directiveNamespaces = [ 'Modelarium\\Laravel\\Lighthouse\\Directives' ]): string  | 
                                                        |
| 109 | + public static function getDirectivesGraphqlString($directiveNamespaces = ['Modelarium\\Laravel\\Lighthouse\\Directives']): string  | 
                                                        |
| 110 | 110 |      { | 
                                                        
| 111 | 111 |          return implode("\n\n", self::getDirectivesGraphql($directiveNamespaces)); | 
                                                        
| 112 | 112 | }  | 
                                                        
@@ -163,7 +163,7 @@ discard block  | 
                                                    ||
| 163 | 163 |                  if ($name === 'Query' || $name === 'Mutation' || $name === 'Subscription' || $name === 'Can') { | 
                                                        
| 164 | 164 | continue;  | 
                                                        
| 165 | 165 | }  | 
                                                        
| 166 | - $g = $this->processType((string)$name, $object);  | 
                                                        |
| 166 | + $g = $this->processType((string) $name, $object);  | 
                                                        |
| 167 | 167 | $this->collection = $this->collection->merge($g);  | 
                                                        
| 168 | 168 | }  | 
                                                        
| 169 | 169 | }  | 
                                                        
@@ -81,7 +81,7 @@ discard block  | 
                                                    ||
| 81 | 81 | $writtenFiles = $this->writeFiles(  | 
                                                        
| 82 | 82 | $collection,  | 
                                                        
| 83 | 83 | $basepath,  | 
                                                        
| 84 | -            (bool)$this->option('overwrite') | 
                                                        |
| 84 | +            (bool) $this->option('overwrite') | 
                                                        |
| 85 | 85 | );  | 
                                                        
| 86 | 86 |          $this->info('Files generated.'); | 
                                                        
| 87 | 87 | |
@@ -97,7 +97,7 @@ discard block  | 
                                                    ||
| 97 | 97 | // this runs all prettier commands in parallel.  | 
                                                        
| 98 | 98 | $run = array_reduce(  | 
                                                        
| 99 | 99 | $writtenFiles,  | 
                                                        
| 100 | -                function ($carry, $f) use ($command) { | 
                                                        |
| 100 | +                function($carry, $f) use ($command) { | 
                                                        |
| 101 | 101 |                      return $carry . '(' . $command . $f . ') & '; | 
                                                        
| 102 | 102 | }  | 
                                                        
| 103 | 103 | );  | 
                                                        
@@ -69,7 +69,7 @@  | 
                                                    ||
| 69 | 69 |          $target = base_path('graphql/data/' . $this->lowerName . '.graphql'); | 
                                                        
| 70 | 70 | $this->writeFile(  | 
                                                        
| 71 | 71 | $target,  | 
                                                        
| 72 | -            (bool)$this->option('overwrite'), | 
                                                        |
| 72 | +            (bool) $this->option('overwrite'), | 
                                                        |
| 73 | 73 | $graphql  | 
                                                        
| 74 | 74 | );  | 
                                                        
| 75 | 75 |          $this->info('Type generated at ' . $target); | 
                                                        
@@ -46,7 +46,7 @@  | 
                                                    ||
| 46 | 46 | */  | 
                                                        
| 47 | 47 | public static function scalars(array $datatypes, string $ns): array  | 
                                                        
| 48 | 48 |      { | 
                                                        
| 49 | -        $graphql = [ '# File automatically generated by Modelarium on ' . date('c') . "\n\n" ]; | 
                                                        |
| 49 | +        $graphql = ['# File automatically generated by Modelarium on ' . date('c') . "\n\n"]; | 
                                                        |
| 50 | 50 | |
| 51 | 51 |          foreach ($datatypes as $name) { | 
                                                        
| 52 | 52 | $typeName = Str::studly($name);  |