Test Setup Failed
Push — master ( 088099...6a2c8e )
by Php Easy Api
04:27
created
src/resta/Console/Source/Event/Event.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@
 block discarded – undo
51 51
 
52 52
         $eventDispatchers=app()->resolve(ClosureDispatcher::class,['bind'=>app()['eventDispatcher']])->call(function(){
53 53
             return [
54
-              'listen'      => $this->listen,
55
-              'subscriber'  => $this->subscribe
54
+                'listen'      => $this->listen,
55
+                'subscriber'  => $this->subscribe
56 56
             ];
57 57
         });
58 58
 
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 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='event';
17
+    public $type = 'event';
18 18
 
19 19
     /**
20 20
      * @var bool
@@ -31,22 +31,22 @@  discard block
 block discarded – undo
31 31
     /**
32 32
      * @var $commandRule
33 33
      */
34
-    protected $commandRule=[];
34
+    protected $commandRule = [];
35 35
 
36 36
     /**
37 37
      * @method create
38 38
      * @return mixed
39 39
      */
40
-    public function generate(){
40
+    public function generate() {
41 41
 
42
-        $this->argument['source']=StaticPathList::$events;
43
-        $this->argument['sourcelisten']=StaticPathList::$listeners;
42
+        $this->argument['source'] = StaticPathList::$events;
43
+        $this->argument['sourcelisten'] = StaticPathList::$listeners;
44 44
 
45
-        $this->argument['eventNamespace']=app()->namespace()->optionalEvents().'';
46
-        $this->argument['listenNamespace']=app()->namespace()->optionalListeners().'';
47
-        $this->argument['subscriberNamespace']=app()->namespace()->optionalSubscribers().'';
45
+        $this->argument['eventNamespace'] = app()->namespace()->optionalEvents().'';
46
+        $this->argument['listenNamespace'] = app()->namespace()->optionalListeners().'';
47
+        $this->argument['subscriberNamespace'] = app()->namespace()->optionalSubscribers().'';
48 48
 
49
-        $eventDispatchers=app()->resolve(ClosureDispatcher::class,['bind'=>app()['eventDispatcher']])->call(function(){
49
+        $eventDispatchers = app()->resolve(ClosureDispatcher::class, ['bind'=>app()['eventDispatcher']])->call(function() {
50 50
             return [
51 51
               'listen'      => $this->listen,
52 52
               'subscriber'  => $this->subscribe
@@ -54,40 +54,40 @@  discard block
 block discarded – undo
54 54
         });
55 55
 
56 56
 
57
-        $this->directory['eventsDir']=path()->optionalEvents();
58
-        $this->directory['eventsListenDir']=path()->optionalListeners();
59
-        $this->directory['eventsListenSubscriberDir']=path()->optionalSubscribers();
57
+        $this->directory['eventsDir'] = path()->optionalEvents();
58
+        $this->directory['eventsListenDir'] = path()->optionalListeners();
59
+        $this->directory['eventsListenSubscriberDir'] = path()->optionalSubscribers();
60 60
 
61 61
         //set project directory
62 62
         $this->file->makeDirectory($this);
63 63
         
64 64
 
65 65
 
66
-        foreach ($eventDispatchers['listen'] as $event=>$listens){
66
+        foreach ($eventDispatchers['listen'] as $event=>$listens) {
67 67
 
68 68
 
69
-            $this->argument['eventMain']=ucfirst($event);
69
+            $this->argument['eventMain'] = ucfirst($event);
70 70
 
71
-            $this->argument['eventKeyNamespace']=app()->namespace()->optionalEvents().'\\'.$this->argument['eventMain'];
71
+            $this->argument['eventKeyNamespace'] = app()->namespace()->optionalEvents().'\\'.$this->argument['eventMain'];
72 72
 
73
-            $mainFile=$this->directory['eventsDir'].'/'.ucfirst($event).'.php';
73
+            $mainFile = $this->directory['eventsDir'].'/'.ucfirst($event).'.php';
74 74
 
75
-            if(!file_exists($mainFile)){
76
-                $this->touch['event/main']=$mainFile;
75
+            if (!file_exists($mainFile)) {
76
+                $this->touch['event/main'] = $mainFile;
77 77
             }
78 78
 
79 79
             //set project touch
80 80
             $this->file->touch($this);
81 81
 
82 82
 
83
-            foreach ($listens as $listen){
83
+            foreach ($listens as $listen) {
84 84
 
85
-                $listenFile=$this->directory['eventsListenDir'].'/'.ucfirst($listen).'.php';
85
+                $listenFile = $this->directory['eventsListenDir'].'/'.ucfirst($listen).'.php';
86 86
 
87
-                $this->argument['eventListen']=ucfirst($listen);
87
+                $this->argument['eventListen'] = ucfirst($listen);
88 88
 
89
-                if(!file_exists($listenFile)){
90
-                    $this->touch['event/listen']=$listenFile;
89
+                if (!file_exists($listenFile)) {
90
+                    $this->touch['event/listen'] = $listenFile;
91 91
 
92 92
                     //set project touch
93 93
                     $this->file->touch($this);
@@ -99,16 +99,16 @@  discard block
 block discarded – undo
99 99
 
100 100
         }
101 101
 
102
-        foreach ($eventDispatchers['subscriber'] as $subscriber){
102
+        foreach ($eventDispatchers['subscriber'] as $subscriber) {
103 103
 
104
-            $eventSubscriberName=''.ucfirst($subscriber);
104
+            $eventSubscriberName = ''.ucfirst($subscriber);
105 105
 
106
-            $subscriberFile=$this->directory['eventsListenSubscriberDir'].'/'.$eventSubscriberName.'.php';
106
+            $subscriberFile = $this->directory['eventsListenSubscriberDir'].'/'.$eventSubscriberName.'.php';
107 107
 
108
-            $this->argument['eventSubscriber']=$eventSubscriberName;
108
+            $this->argument['eventSubscriber'] = $eventSubscriberName;
109 109
 
110
-            if(!file_exists($subscriberFile)){
111
-                $this->touch['event/subscriber']=$subscriberFile;
110
+            if (!file_exists($subscriberFile)) {
111
+                $this->touch['event/subscriber'] = $subscriberFile;
112 112
 
113 113
                 //set project touch
114 114
                 $this->file->touch($this);
Please login to merge, or discard this patch.
src/resta/Console/Source/Middleware/Middleware.php 1 patch
Spacing   +5 added lines, -5 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='middleware';
17
+    public $type = 'middleware';
18 18
 
19 19
     /**
20 20
      * @var array
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
     /**
32 32
      * @var $commandRule
33 33
      */
34
-    public $commandRule=['middleware'];
34
+    public $commandRule = ['middleware'];
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->touch['middleware/middleware']= path()->middleware().'/'.$this->argument['middleware'].'.php';
42
+        $this->touch['middleware/middleware'] = path()->middleware().'/'.$this->argument['middleware'].'.php';
43 43
 
44 44
 
45 45
         $this->file->touch($this);
46 46
 
47
-        chmod($this->touch['middleware/middleware'],0777);
47
+        chmod($this->touch['middleware/middleware'], 0777);
48 48
 
49 49
         echo $this->classical(' > Middleware called as "'.$this->argument['middleware'].'" has been successfully created in the '.app()->namespace()->middleware().'');
50 50
 
Please login to merge, or discard this patch.
src/resta/Console/Source/Boot/Boot.php 1 patch
Spacing   +6 added lines, -6 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='boot';
17
+    public $type = 'boot';
18 18
 
19 19
     /**
20 20
      * @var array
@@ -26,19 +26,19 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * @var $commandRule
28 28
      */
29
-    protected $commandRule='boot';
29
+    protected $commandRule = 'boot';
30 30
 
31 31
     /**
32 32
      * @method create
33 33
      * @return mixed
34 34
      */
35
-    public function create(){
35
+    public function create() {
36 36
 
37
-        $bootName=explode("\\",$this->argument['project']);
37
+        $bootName = explode("\\", $this->argument['project']);
38 38
 
39
-        $this->argument['boot']=current($bootName);
39
+        $this->argument['boot'] = current($bootName);
40 40
 
41
-        $this->touch['main/boot']        = StaticPathModel::bootDir().'/'.$this->argument['boot'].'.php';
41
+        $this->touch['main/boot'] = StaticPathModel::bootDir().'/'.$this->argument['boot'].'.php';
42 42
 
43 43
         $this->file->touch($this);
44 44
         
Please login to merge, or discard this patch.
src/resta/Console/Source/Key/Key.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     /**
16 16
      * @var $type
17 17
      */
18
-    public $type='key';
18
+    public $type = 'key';
19 19
 
20 20
     /**
21 21
      * @var array
@@ -27,19 +27,19 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @var $commandRule
29 29
      */
30
-    public $commandRule=[];
30
+    public $commandRule = [];
31 31
 
32 32
     /**
33 33
      * @method generate
34 34
      * @return mixed
35 35
      */
36
-    public function generate(){
36
+    public function generate() {
37 37
 
38 38
         //key generate file
39
-        $this->touch['main/keygenerate']= StaticPathModel::getEncrypter();
39
+        $this->touch['main/keygenerate'] = StaticPathModel::getEncrypter();
40 40
 
41 41
         //key generate code
42
-        $this->argument['applicationKey']=app()['encrypter']->setCipherText();
42
+        $this->argument['applicationKey'] = app()['encrypter']->setCipherText();
43 43
 
44 44
         //set key file touch
45 45
         $this->file->touch($this);
Please login to merge, or discard this patch.
src/resta/Console/Source/Model/Model.php 1 patch
Spacing   +12 added lines, -12 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,26 +31,26 @@  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';
51
+        $this->directory['modelDir'] = $this->version().'/Model';
52
+        $this->directory['builderDir'] = $this->directory['modelDir'].'/Builder';
53
+        $this->directory['contract'] = $this->directory['modelDir'].'/Contract';
54 54
 
55 55
         //set project directory
56 56
         $this->file->makeDirectory($this);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $this->touch['model/contract'] = $this->model().'/Contract/'.$this->argument['file'].'Contract.php';
62 62
 
63 63
         //set project touch
64
-        $this->file->touch($this,[
64
+        $this->file->touch($this, [
65 65
             'stub'=>'Model_Create'
66 66
         ]);
67 67
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     /**
74 74
      * @return bool
75 75
      */
76
-    private function setAnnotations(){
76
+    private function setAnnotations() {
77 77
 
78 78
         return Utils::changeClass(path()->serviceAnnotations().'.php',
79 79
             ['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.
src/resta/Console/Source/Migration/Migration.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     /**
16 16
      * @var $type
17 17
      */
18
-    public $type='migration';
18
+    public $type = 'migration';
19 19
 
20 20
     /**
21 21
      * @var array
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      * @var $commandRule
35 35
      */
36
-    public $commandRule=['create'=>[
37
-        'name','table'
36
+    public $commandRule = ['create'=>[
37
+        'name', 'table'
38 38
     ],
39 39
         'push'=>[]];
40 40
 
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
 
58 58
         echo $this->info('Migration Push Process :');
59 59
 
60
-        $this->table->setHeaders(['id','table','file','type','status','message','seeder']);
60
+        $this->table->setHeaders(['id', 'table', 'file', 'type', 'status', 'message', 'seeder']);
61 61
 
62 62
         foreach ($pushResult as $key=>$value) {
63 63
 
64
-            $file = end(explode("/",$pushResult[$key]['file']));
64
+            $file = end(explode("/", $pushResult[$key]['file']));
65 65
 
66
-            if($pushResult[$key]['success']===true){
66
+            if ($pushResult[$key]['success']===true) {
67 67
 
68 68
                 $this->table->addRow([
69 69
                     $key,
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                     'No',
76 76
                 ]);
77 77
             }
78
-            else{
78
+            else {
79 79
 
80 80
                 $this->table->addRow([
81 81
                     $key,
@@ -107,19 +107,19 @@  discard block
 block discarded – undo
107 107
 
108 108
         $stubType = (!file_exists($tablePath)) ? 'create' : 'alter';
109 109
 
110
-        if(!file_exists($path)){
110
+        if (!file_exists($path)) {
111 111
 
112
-            $this->file->fs->mkdir($path,0777);
113
-            $this->file->fs->chmod($path,0777,000,true);
112
+            $this->file->fs->mkdir($path, 0777);
113
+            $this->file->fs->chmod($path, 0777, 000, true);
114 114
         }
115 115
 
116
-        $migrationCreate = $this->getSchema()->stub($this->argument['table'],$this->argument['name'],$stubType);
116
+        $migrationCreate = $this->getSchema()->stub($this->argument['table'], $this->argument['name'], $stubType);
117 117
 
118 118
         echo $this->info('Migration Create Process :');
119 119
 
120
-        $this->table->setHeaders(['id','method','table','style','name','type','status','message']);
120
+        $this->table->setHeaders(['id', 'method', 'table', 'style', 'name', 'type', 'status', 'message']);
121 121
 
122
-        foreach ($migrationCreate['directory'] as $key=>$data){
122
+        foreach ($migrationCreate['directory'] as $key=>$data) {
123 123
 
124 124
             $this->table->addRow([
125 125
                 $key,
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             ]);
135 135
         }
136 136
 
137
-        foreach ($migrationCreate['file'] as $key=>$data){
137
+        foreach ($migrationCreate['file'] as $key=>$data) {
138 138
 
139 139
             $this->table->addRow([
140 140
                 $key,
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@
 block discarded – undo
74 74
                     'Ok',
75 75
                     'No',
76 76
                 ]);
77
-            }
78
-            else{
77
+            } else{
79 78
 
80 79
                 $this->table->addRow([
81 80
                     $key,
Please login to merge, or discard this patch.
src/resta/Console/Source/Env/Env.php 1 patch
Spacing   +5 added lines, -5 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='env';
17
+    public $type = 'env';
18 18
 
19 19
     /**
20 20
      * @var array
@@ -26,18 +26,18 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * @var $commandRule
28 28
      */
29
-    protected $commandRule='env';
29
+    protected $commandRule = 'env';
30 30
 
31 31
     /**
32 32
      * @method create
33 33
      * @return mixed
34 34
      */
35
-    public function create(){
35
+    public function create() {
36 36
 
37
-        $envFile= $this->checkGroupArgument($this->argument['project'],'');
37
+        $envFile = $this->checkGroupArgument($this->argument['project'], '');
38 38
 
39 39
         //key generate file
40
-        $this->touch['main/env']= StaticPathModel::appPath().'/'.strtolower($envFile).'.yaml';
40
+        $this->touch['main/env'] = StaticPathModel::appPath().'/'.strtolower($envFile).'.yaml';
41 41
 
42 42
         //set key file touch
43 43
         $this->file->touch($this);
Please login to merge, or discard this patch.
src/resta/Console/Source/Exception/Exception.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     /**
16 16
      * @var $type
17 17
      */
18
-    public $type='exception';
18
+    public $type = 'exception';
19 19
 
20 20
     /**
21 21
      * @var array
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     /**
33 33
      * @var $commandRule
34 34
      */
35
-    public $commandRule=['exception'];
35
+    public $commandRule = ['exception'];
36 36
 
37 37
     /**
38 38
      * @method create
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         //set project directory
50 50
         $this->file->makeDirectory($this);
51 51
 
52
-        $this->touch['exception/exception'] =$this->directory['exceptionDir'].'/'.$exception.'Exception.php';
52
+        $this->touch['exception/exception'] = $this->directory['exceptionDir'].'/'.$exception.'Exception.php';
53 53
 
54 54
         //set project touch
55 55
         $this->file->touch($this);
Please login to merge, or discard this patch.
src/resta/Console/Source/Provider/Provider.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     /**
16 16
      * @var $type
17 17
      */
18
-    public $type='provider';
18
+    public $type = 'provider';
19 19
 
20 20
     /**
21 21
      * @var array
@@ -32,28 +32,28 @@  discard block
 block discarded – undo
32 32
     /**
33 33
      * @var array
34 34
      */
35
-    protected $commandRule=[];
35
+    protected $commandRule = [];
36 36
 
37 37
     /**
38 38
      * @method create
39 39
      * @return mixed
40 40
      */
41
-    public function create(){
41
+    public function create() {
42 42
 
43
-        $bootName=explode("\\",$this->argument['project']);
43
+        $bootName = explode("\\", $this->argument['project']);
44 44
 
45
-        if(file_exists(app()->path()->app())){
45
+        if (file_exists(app()->path()->app())) {
46 46
 
47
-            if(!isset($this->argument['provider'])) exception()->invalidArgument('Provider key is not valid');
47
+            if (!isset($this->argument['provider'])) exception()->invalidArgument('Provider key is not valid');
48 48
 
49 49
             $this->argument['ProviderNamespace'] = app()->namespace()->provider();
50 50
             $this->touch['provider/provider'] = app()->path()->provider().'/'.$this->argument['provider'].'.php';
51 51
         }
52
-        else{
52
+        else {
53 53
 
54
-            $providerName = explode(":",current($bootName));
54
+            $providerName = explode(":", current($bootName));
55 55
 
56
-            $this->argument['provider']=ucfirst(end($providerName));
56
+            $this->argument['provider'] = ucfirst(end($providerName));
57 57
             $this->argument['ProviderNamespace'] = 'Providers';
58 58
             $this->touch['provider/provider'] = StaticPathModel::providerDir().'/'.$this->argument['provider'].'.php';
59 59
         }
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,12 +44,13 @@
 block discarded – undo
44 44
 
45 45
         if(file_exists(app()->path()->app())){
46 46
 
47
-            if(!isset($this->argument['provider'])) exception()->invalidArgument('Provider key is not valid');
47
+            if(!isset($this->argument['provider'])) {
48
+                exception()->invalidArgument('Provider key is not valid');
49
+            }
48 50
 
49 51
             $this->argument['ProviderNamespace'] = app()->namespace()->provider();
50 52
             $this->touch['provider/provider'] = app()->path()->provider().'/'.$this->argument['provider'].'.php';
51
-        }
52
-        else{
53
+        } else{
53 54
 
54 55
             $providerName = explode(":",current($bootName));
55 56
 
Please login to merge, or discard this patch.