Test Setup Failed
Push — master ( 13335d...c33eff )
by Php Easy Api
05:13
created
src/resta/Console/Source/Model/Model.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     /**
15 15
      * @var $type
16 16
      */
17
-    public $type='model';
17
+    public $type = 'model';
18 18
 
19 19
     /**
20 20
      * @var array
@@ -31,27 +31,27 @@  discard block
 block discarded – undo
31 31
     /**
32 32
      * @var $commandRule
33 33
      */
34
-    public $commandRule=['model','?table'];
34
+    public $commandRule = ['model', '?table'];
35 35
 
36 36
     /**
37 37
      * @method create
38 38
      * @return mixed
39 39
      */
40
-    public function create(){
40
+    public function create() {
41 41
 
42
-        $this->argument['file']=$this->argument['model'];
42
+        $this->argument['file'] = $this->argument['model'];
43 43
 
44
-        if(!isset($this->argument['table'])){
45
-            $this->argument['table']=$this->argument['file'].'s';
44
+        if (!isset($this->argument['table'])) {
45
+            $this->argument['table'] = $this->argument['file'].'s';
46 46
         }
47 47
 
48 48
         //lower case for table
49
-        $this->argument['table']=strtolower($this->argument['table']);
49
+        $this->argument['table'] = strtolower($this->argument['table']);
50 50
 
51
-        $this->directory['modelDir']=$this->version().'/Model';
52
-        $this->directory['builderDir']=$this->directory['modelDir'].'/Builder';
53
-        $this->directory['contract']=$this->directory['modelDir'].'/Contract';
54
-        $this->directory['helper']=$this->directory['modelDir'].'/Helper';
51
+        $this->directory['modelDir'] = $this->version().'/Model';
52
+        $this->directory['builderDir'] = $this->directory['modelDir'].'/Builder';
53
+        $this->directory['contract'] = $this->directory['modelDir'].'/Contract';
54
+        $this->directory['helper'] = $this->directory['modelDir'].'/Helper';
55 55
 
56 56
         //set project directory
57 57
         $this->file->makeDirectory($this);
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
         $this->touch['model/builder']   = $this->model().'/Builder/'.$this->argument['file'].'Builder.php';
62 62
         $this->touch['model/contract']  = $this->model().'/Contract/'.$this->argument['file'].'Contract.php';
63 63
 
64
-        if(!file_exists($this->directory['helper'].''.DIRECTORY_SEPARATOR.'Scope.php')){
65
-            $this->touch['model/scope']     = $this->directory['helper'].''.DIRECTORY_SEPARATOR.'Scope.php';
64
+        if (!file_exists($this->directory['helper'].''.DIRECTORY_SEPARATOR.'Scope.php')) {
65
+            $this->touch['model/scope'] = $this->directory['helper'].''.DIRECTORY_SEPARATOR.'Scope.php';
66 66
         }
67 67
 
68 68
         //set project touch
69
-        $this->file->touch($this,[
69
+        $this->file->touch($this, [
70 70
             'stub'=>'Model_Create'
71 71
         ]);
72 72
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     /**
79 79
      * @return bool
80 80
      */
81
-    private function setAnnotations(){
81
+    private function setAnnotations() {
82 82
 
83 83
         return Utils::changeClass(path()->serviceAnnotations().'.php',
84 84
             ['Trait ServiceAnnotationsManager'=>'Trait ServiceAnnotationsManager'.PHP_EOL.' * @method \\'.app()->namespace()->builder().'\\'.$this->argument['file'].'Builder '.strtolower($this->argument['file']).'Builder'
Please login to merge, or discard this patch.