@@ -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 | ); |
@@ -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 | } |
@@ -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); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | /** |
| 32 | 32 | * @var string |
| 33 | 33 | */ |
| 34 | - protected $targetClass= ''; |
|
| 34 | + protected $targetClass = ''; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * If false, $source is "User" (class with HasOne/HasMany posts()) |
@@ -16,10 +16,10 @@ discard block |
||
| 16 | 16 | public const RELATIONSHIP = "RELATIONSHIP"; |
| 17 | 17 | public const RELATIONSHIP_ONE_TO_ONE = "11"; |
| 18 | 18 | public const RELATIONSHIP_ONE_TO_MANY = "1N"; |
| 19 | - public const RELATIONSHIP_MANY_TO_MANY = "NN"; |
|
| 19 | + public const RELATIONSHIP_MANY_TO_MANY = "NN"; |
|
| 20 | 20 | public const MORPH_ONE_TO_ONE = "M11"; |
| 21 | 21 | public const MORPH_ONE_TO_MANY = "M1N"; |
| 22 | - public const MORPH_MANY_TO_MANY = "MNN"; |
|
| 22 | + public const MORPH_MANY_TO_MANY = "MNN"; |
|
| 23 | 23 | |
| 24 | 24 | private function __construct() |
| 25 | 25 | { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | if (!in_array($matches['mode'], $relationships)) { |
| 52 | 52 | throw new ClassNotFoundException('Invalid relationship'); |
| 53 | 53 | } |
| 54 | - return static::factory($matches['source'], $matches['target'], $matches['mode'], (bool)$matches['inverse']); |
|
| 54 | + return static::factory($matches['source'], $matches['target'], $matches['mode'], (bool) $matches['inverse']); |
|
| 55 | 55 | } |
| 56 | 56 | throw new ClassNotFoundException('Invalid relationship'); |
| 57 | 57 | } |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | function datatypes() |
| 10 | 10 | { |
| 11 | 11 | $markdown = DatatypeFactory::map( |
| 12 | - function (\ReflectionClass $reflection): array { |
|
| 12 | + function(\ReflectionClass $reflection): array { |
|
| 13 | 13 | $class = $reflection->getName(); |
| 14 | 14 | |
| 15 | 15 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $files = $processor->getCollection(); |
| 92 | 92 | if ($name && $name !== '*' && $name !== 'all') { |
| 93 | 93 | $files = $files->filter( |
| 94 | - function (GeneratedItem $g) use ($name) { |
|
| 94 | + function(GeneratedItem $g) use ($name) { |
|
| 95 | 95 | if (is_array($name)) { |
| 96 | 96 | throw new \Exception('Arrays not supported yet'); |
| 97 | 97 | } else { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $this->writeFiles( |
| 105 | 105 | $files, |
| 106 | 106 | base_path(), |
| 107 | - (bool)$this->option('overwrite') |
|
| 107 | + (bool) $this->option('overwrite') |
|
| 108 | 108 | ); |
| 109 | 109 | $this->info('Finished scaffolding. You might want to run `composer dump-autoload`'); |
| 110 | 110 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | return new GeneratedCollection( |
| 41 | - [ new GeneratedItem( |
|
| 41 | + [new GeneratedItem( |
|
| 42 | 42 | GeneratedItem::TYPE_SEED, |
| 43 | 43 | $this->generateString(), |
| 44 | 44 | $this->getGenerateFilename() |
@@ -101,6 +101,6 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | public function getGenerateFilename(): string |
| 103 | 103 | { |
| 104 | - return $this->getBasePath('database/seeds/'. $this->studlyName . 'Seeder.php'); |
|
| 104 | + return $this->getBasePath('database/seeds/' . $this->studlyName . 'Seeder.php'); |
|
| 105 | 105 | } |
| 106 | 106 | } |