Completed
Push — master ( 8d804e...0560b7 )
by Amine
15s queued 12s
created
src/Commands/ResourcesCommand.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 
76 76
     protected function getResourceParams($modelName, $i)
77 77
     {
78
-       $i['name'] = Str::snake($modelName);
78
+        $i['name'] = Str::snake($modelName);
79 79
 
80 80
         foreach(['hasMany', 'hasOne', 'add', 'belongsTo', 'belongsToMany'] as $relation){
81 81
             if(isset($i[$relation])){
Please login to merge, or discard this patch.
src/Commands/ModelCommand.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 class ModelCommand extends BaseCommand {
5 5
 
6
-	protected $signature = 'wn:model
6
+    protected $signature = 'wn:model
7 7
         {name : Name of the model.}
8 8
         {--fillable= : the fillable fields.}
9 9
         {--guarded= : the guarded fields.}
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         {--force= : override the existing files}
21 21
     ';
22 22
 
23
-	protected $description = 'Generates a model class for a RESTfull resource';
23
+    protected $description = 'Generates a model class for a RESTfull resource';
24 24
 
25 25
     public function handle()
26 26
     {
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 
47 47
     protected function getAsArrayFields($arg, $isOption = true)
48 48
     {
49
-    	$arg = ($isOption) ? $this->option($arg) : $this->argument($arg);
49
+        $arg = ($isOption) ? $this->option($arg) : $this->argument($arg);
50 50
         if(is_string($arg)){
51
-        	$arg = explode(',', $arg);
51
+            $arg = explode(',', $arg);
52 52
         } else if(! is_array($arg)) {
53 53
             $arg = [];
54 54
         }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     protected function getNamespace()
61 61
     {
62
-    	return str_replace(' ', '\\', ucwords(str_replace('/', ' ', $this->option('path'))));
62
+        return str_replace(' ', '\\', ucwords(str_replace('/', ' ', $this->option('path'))));
63 63
     }
64 64
 
65 65
     protected function getRelations()
Please login to merge, or discard this patch.
src/Commands/ControllerCommand.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -5,33 +5,33 @@
 block discarded – undo
5 5
 
6 6
 class ControllerCommand extends BaseCommand {
7 7
 
8
-	protected $signature = 'wn:controller
8
+    protected $signature = 'wn:controller
9 9
         {model : Name of the model (with namespace if not App)}
10 10
 		{--no-routes= : without routes}
11 11
         {--force= : override the existing files}
12 12
         {--laravel : Use Laravel style route definitions}
13 13
     ';
14 14
 
15
-	protected $description = 'Generates RESTful controller using the RESTActions trait';
15
+    protected $description = 'Generates RESTful controller using the RESTActions trait';
16 16
 
17 17
     public function handle()
18 18
     {
19
-    	$model = $this->argument('model');
20
-    	$name = '';
21
-    	if(strrpos($model, "\\") === false){
22
-    		$name = $model;
23
-    		$model = "App\\Models\\" . $model;
24
-    	} else {
25
-    		$name = explode("\\", $model);
26
-    		$name = $name[count($name) - 1];
27
-    	}
19
+        $model = $this->argument('model');
20
+        $name = '';
21
+        if(strrpos($model, "\\") === false){
22
+            $name = $model;
23
+            $model = "App\\Models\\" . $model;
24
+        } else {
25
+            $name = explode("\\", $model);
26
+            $name = $name[count($name) - 1];
27
+        }
28 28
         $controller = ucwords(\Illuminate\Support\Str::plural($name)) . 'Controller';
29 29
         $content = $this->getTemplate('controller')
30
-        	->with([
31
-        		'name' => $controller,
32
-        		'model' => $model
33
-        	])
34
-        	->get();
30
+            ->with([
31
+                'name' => $controller,
32
+                'model' => $model
33
+            ])
34
+            ->get();
35 35
 
36 36
         $this->save($content, "./app/Http/Controllers/{$controller}.php", "{$controller}");
37 37
         if(! $this->option('no-routes')){
Please login to merge, or discard this patch.