@@ -40,37 +40,37 @@ |
||
40 | 40 | /** |
41 | 41 | * |
42 | 42 | */ |
43 | - public function generate(){ |
|
43 | + public function generate() { |
|
44 | 44 | |
45 | 45 | $this->moduleFactory->addModel($this->moduleName, true, true); |
46 | 46 | |
47 | - $this->moduleFactory->addService($this->moduleName . 'Service'); |
|
47 | + $this->moduleFactory->addService($this->moduleName.'Service'); |
|
48 | 48 | |
49 | - $this->moduleFactory->addController($this->moduleName . "Controller"); |
|
49 | + $this->moduleFactory->addController($this->moduleName."Controller"); |
|
50 | 50 | |
51 | - $this->moduleFactory->addTest($this->moduleName . 'ServiceTest', 'service'); |
|
52 | - $this->moduleFactory->addTest($this->moduleName . 'HttpTest', 'http'); |
|
53 | - $this->moduleFactory->addTest($this->moduleName . 'UnitTest', 'unit'); |
|
51 | + $this->moduleFactory->addTest($this->moduleName.'ServiceTest', 'service'); |
|
52 | + $this->moduleFactory->addTest($this->moduleName.'HttpTest', 'http'); |
|
53 | + $this->moduleFactory->addTest($this->moduleName.'UnitTest', 'unit'); |
|
54 | 54 | |
55 | - $this->moduleFactory->addEvent($this->moduleName . 'WasCreatedEvent'); |
|
56 | - $this->moduleFactory->addEvent($this->moduleName . 'WasUpdatedEvent'); |
|
57 | - $this->moduleFactory->addEvent($this->moduleName . 'WasDeletedEvent'); |
|
55 | + $this->moduleFactory->addEvent($this->moduleName.'WasCreatedEvent'); |
|
56 | + $this->moduleFactory->addEvent($this->moduleName.'WasUpdatedEvent'); |
|
57 | + $this->moduleFactory->addEvent($this->moduleName.'WasDeletedEvent'); |
|
58 | 58 | |
59 | - $this->moduleFactory->addRequest('Find'.$this->moduleName . 'Request'); |
|
60 | - $this->moduleFactory->addRequest('Index'.$this->moduleName . 'Request'); |
|
61 | - $this->moduleFactory->addRequest('Create'.$this->moduleName . 'Request'); |
|
62 | - $this->moduleFactory->addRequest('Update'.$this->moduleName . 'Request'); |
|
63 | - $this->moduleFactory->addRequest('Delete'.$this->moduleName . 'Request'); |
|
59 | + $this->moduleFactory->addRequest('Find'.$this->moduleName.'Request'); |
|
60 | + $this->moduleFactory->addRequest('Index'.$this->moduleName.'Request'); |
|
61 | + $this->moduleFactory->addRequest('Create'.$this->moduleName.'Request'); |
|
62 | + $this->moduleFactory->addRequest('Update'.$this->moduleName.'Request'); |
|
63 | + $this->moduleFactory->addRequest('Delete'.$this->moduleName.'Request'); |
|
64 | 64 | |
65 | - $this->moduleFactory->addPermission($this->moduleName . 'Permission'); |
|
65 | + $this->moduleFactory->addPermission($this->moduleName.'Permission'); |
|
66 | 66 | |
67 | - $this->moduleFactory->addPolicy($this->moduleName . 'Policy'); |
|
67 | + $this->moduleFactory->addPolicy($this->moduleName.'Policy'); |
|
68 | 68 | |
69 | 69 | $this->moduleFactory->addFactory($this->moduleName); |
70 | 70 | |
71 | 71 | $this->moduleFactory->addTransformer($this->moduleName.'Transformer', $this->moduleName); |
72 | 72 | |
73 | - $this->moduleFactory->addServiceProvider($this->moduleName . 'ServiceProvider'); |
|
73 | + $this->moduleFactory->addServiceProvider($this->moduleName.'ServiceProvider'); |
|
74 | 74 | |
75 | 75 | $this->moduleFactory->addRoute('v1'); |
76 | 76 |
@@ -71,20 +71,20 @@ |
||
71 | 71 | $this->info("Don't forget to add permissions to the Permission model!"); |
72 | 72 | } |
73 | 73 | |
74 | - protected function handleVersioningOption($shortcut, $type, $question, $default){ |
|
75 | - return $this->anticipate('What is the version of the route?',['v1','v2','v3','v4','v5'],$default); |
|
74 | + protected function handleVersioningOption($shortcut, $type, $question, $default) { |
|
75 | + return $this->anticipate('What is the version of the route?', [ 'v1', 'v2', 'v3', 'v4', 'v5' ], $default); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | protected function setOptions(): array |
79 | 79 | { |
80 | 80 | return [ |
81 | - ['versioning', null, InputOption::VALUE_OPTIONAL, 'The route version', 'v1'], |
|
81 | + [ 'versioning', null, InputOption::VALUE_OPTIONAL, 'The route version', 'v1' ], |
|
82 | 82 | ]; |
83 | 83 | } |
84 | 84 | |
85 | 85 | protected function getFileName() :string |
86 | 86 | { |
87 | - return strtolower(Str::plural($this->getModuleName())).'.'.$this->getVersion() . '.php'; |
|
87 | + return strtolower(Str::plural($this->getModuleName())).'.'.$this->getVersion().'.php'; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $type = $this->getType(); |
75 | 75 | |
76 | 76 | if (in_array($type, $this->types)) |
77 | - return "test-" . $type . ".stub"; |
|
77 | + return "test-".$type.".stub"; |
|
78 | 78 | |
79 | 79 | throw new Exception("Test type not supported"); |
80 | 80 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | protected function setOptions(): array |
88 | 88 | { |
89 | 89 | return [ |
90 | - ['type', $this->types, InputOption::VALUE_OPTIONAL, 'Indicates the type of the test.', $this->types[0]] |
|
90 | + [ 'type', $this->types, InputOption::VALUE_OPTIONAL, 'Indicates the type of the test.', $this->types[ 0 ] ] |
|
91 | 91 | ]; |
92 | 92 | } |
93 | 93 |
@@ -35,12 +35,12 @@ |
||
35 | 35 | /** |
36 | 36 | * @var array |
37 | 37 | */ |
38 | - protected $guarded = []; |
|
38 | + protected $guarded = [ ]; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * @var array |
42 | 42 | */ |
43 | - protected $casts = []; |
|
43 | + protected $casts = [ ]; |
|
44 | 44 | |
45 | 45 | protected $dates = [ |
46 | 46 | 'created_at', |
@@ -35,12 +35,12 @@ |
||
35 | 35 | /** |
36 | 36 | * @var array |
37 | 37 | */ |
38 | - protected $guarded = []; |
|
38 | + protected $guarded = [ ]; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * @var array |
42 | 42 | */ |
43 | - protected $casts = []; |
|
43 | + protected $casts = [ ]; |
|
44 | 44 | |
45 | 45 | protected $dates = [ |
46 | 46 | 'created_at', |
@@ -35,12 +35,12 @@ |
||
35 | 35 | /** |
36 | 36 | * @var array |
37 | 37 | */ |
38 | - protected $guarded = []; |
|
38 | + protected $guarded = [ ]; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * @var array |
42 | 42 | */ |
43 | - protected $casts = []; |
|
43 | + protected $casts = [ ]; |
|
44 | 44 | |
45 | 45 | protected $dates = [ |
46 | 46 | 'created_at', |
@@ -35,12 +35,12 @@ |
||
35 | 35 | /** |
36 | 36 | * @var array |
37 | 37 | */ |
38 | - protected $guarded = []; |
|
38 | + protected $guarded = [ ]; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * @var array |
42 | 42 | */ |
43 | - protected $casts = []; |
|
43 | + protected $casts = [ ]; |
|
44 | 44 | |
45 | 45 | protected $dates = [ |
46 | 46 | 'created_at', |
@@ -35,12 +35,12 @@ |
||
35 | 35 | /** |
36 | 36 | * @var array |
37 | 37 | */ |
38 | - protected $guarded = []; |
|
38 | + protected $guarded = [ ]; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * @var array |
42 | 42 | */ |
43 | - protected $casts = []; |
|
43 | + protected $casts = [ ]; |
|
44 | 44 | |
45 | 45 | protected $dates = [ |
46 | 46 | 'created_at', |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * The listeners that will be fired when the event is dispatched. |
13 | 13 | * @var array |
14 | 14 | */ |
15 | - public $listeners = []; |
|
15 | + public $listeners = [ ]; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @var Script |
@@ -35,6 +35,6 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function broadcastOn() |
37 | 37 | { |
38 | - return []; |
|
38 | + return [ ]; |
|
39 | 39 | } |
40 | 40 | } |