Completed
Push — master ( ad21ea...77c158 )
by Marco
05:26
created
src/Actions/App.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -59,19 +59,19 @@  discard block
 block discarded – undo
59 59
 
60 60
         $update = array_intersect($old_apps, $new_apps);
61 61
         
62
-        foreach ( $uninstall as $app ) {
62
+        foreach ($uninstall as $app) {
63 63
             
64 64
             $this->removeApp($io, $package_name, $app, $initial_extra[$app]);
65 65
             
66 66
         }
67 67
         
68
-        foreach ( $install as $app ) {
68
+        foreach ($install as $app) {
69 69
             
70 70
             $this->addApp($io, $package_name, $app, $target_extra[$app]);
71 71
             
72 72
         }
73 73
         
74
-        foreach ( $update as $app ) {
74
+        foreach ($update as $app) {
75 75
             
76 76
             $this->updateApp($io, $package_name, $app, $initial_extra[$app], $target_extra[$app]);
77 77
             
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         try {
107 107
             
108
-            if ( $assets !== null ) {
108
+            if ($assets !== null) {
109 109
             
110 110
                 $fs->rcopy($path.'/'.$assets, COMODOJO_INSTALLER_WORKING_DIRECTORY.'/'.COMODOJO_INSTALLER_APP_ASSETS.'/'.$app);    
111 111
                 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
             $this->getPackageInstaller()->apps()->delete($id);
137 137
             
138
-            if ( $assets !== null ) {
138
+            if ($assets !== null) {
139 139
 
140 140
                 $fs->rmdir(COMODOJO_INSTALLER_WORKING_DIRECTORY.'/'.COMODOJO_INSTALLER_APP_ASSETS.'/'.$app);
141 141
             
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
             
170 170
             $this->getPackageInstaller()->apps()->update($id, $package_name, $app, $description);
171 171
 
172
-            if ( $old_assets !== null ) {
172
+            if ($old_assets !== null) {
173 173
                 
174 174
                 $fs->rmdir(COMODOJO_INSTALLER_WORKING_DIRECTORY.'/'.COMODOJO_INSTALLER_APP_ASSETS.'/'.$app);
175 175
                 
176 176
             }
177 177
             
178
-            if ( $new_assets !== null ) {
178
+            if ($new_assets !== null) {
179 179
                 
180 180
                 $fs->rcopy($path.'/'.$new_assets, COMODOJO_INSTALLER_WORKING_DIRECTORY.'/'.COMODOJO_INSTALLER_APP_ASSETS.'/'.$app);
181 181
                 
Please login to merge, or discard this patch.
src/Actions/Authentication.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -59,19 +59,19 @@  discard block
 block discarded – undo
59 59
 
60 60
         $update = array_intersect($old_providers, $new_providers);
61 61
         
62
-        foreach ( $uninstall as $provider ) {
62
+        foreach ($uninstall as $provider) {
63 63
             
64 64
             $this->removeAuthProvider($io, $package_name, $provider, $initial_extra[$provider]);
65 65
             
66 66
         }
67 67
         
68
-        foreach ( $install as $provider ) {
68
+        foreach ($install as $provider) {
69 69
             
70 70
             $this->addAuthProvider($io, $package_name, $provider, $target_extra[$provider]);
71 71
             
72 72
         }
73 73
         
74
-        foreach ( $update as $provider ) {
74
+        foreach ($update as $provider) {
75 75
             
76 76
             $this->updateAuthProvider($io, $package_name, $provider, $target_extra[$provider]);
77 77
             
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         
98 98
         try {
99 99
 
100
-            if ( !self::validateProvider($configuration) ) throw new InstallerException('Skipping invalid authentication provider '.$provider.' in '.$package_name);
100
+            if (!self::validateProvider($configuration)) throw new InstallerException('Skipping invalid authentication provider '.$provider.' in '.$package_name);
101 101
 
102 102
             $class = $configuration['class'];
103 103
             
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         
120 120
         try {
121 121
 
122
-            if ( !self::validateProvider($configuration) ) throw new InstallerException('Skipping invalid authentication provider '.$provider.' in '.$package_name);
122
+            if (!self::validateProvider($configuration)) throw new InstallerException('Skipping invalid authentication provider '.$provider.' in '.$package_name);
123 123
             
124 124
             $id = $this->getPackageInstaller()->authentication()->getByName($provider)->getId();
125 125
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         
140 140
         try {
141 141
 
142
-            if ( !self::validateProvider($configuration) ) throw new InstallerException('Skipping invalid authentication provider '.$provider.' in '.$package_name);
142
+            if (!self::validateProvider($configuration)) throw new InstallerException('Skipping invalid authentication provider '.$provider.' in '.$package_name);
143 143
 
144 144
             $class = $configuration['class'];
145 145
             
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     
162 162
     private static function validateProvider($auth) {
163 163
 
164
-        return !( empty($auth["class"]) );
164
+        return !(empty($auth["class"]));
165 165
 
166 166
     }
167 167
 
Please login to merge, or discard this patch.
src/Actions/Command.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
             
68 68
             try {
69 69
 
70
-                if ( !self::validateCommand($actions) ) throw new InstallerException('Skipping invalid command '.$command.' in '.$package_name);
70
+                if (!self::validateCommand($actions)) throw new InstallerException('Skipping invalid command '.$command.' in '.$package_name);
71 71
                 
72 72
                 $class = $actions["class"];
73 73
 
Please login to merge, or discard this patch.
src/Actions/DispatcherPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
             try {
68 68
 
69
-                if ( !self::validatePlugin($configuration) ) throw new InstallerException('Skipping invalid plugin in '.$package_name);
69
+                if (!self::validatePlugin($configuration)) throw new InstallerException('Skipping invalid plugin in '.$package_name);
70 70
 
71 71
                 $plugin_name = $package_name.'-dispatcher-'.$plugin;
72 72
                 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
     private static function validatePlugin($plugin) {
112 112
 
113
-        return !( empty($plugin["class"]) || empty($plugin["event"]) );
113
+        return !(empty($plugin["class"]) || empty($plugin["event"]));
114 114
 
115 115
     }
116 116
 
Please login to merge, or discard this patch.
src/Actions/ExtenderPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
             try {
68 68
 
69
-                if ( !self::validatePlugin($configuration) ) throw new InstallerException('Skipping invalid plugin in '.$package_name);
69
+                if (!self::validatePlugin($configuration)) throw new InstallerException('Skipping invalid plugin in '.$package_name);
70 70
 
71 71
                 $plugin_name = $package_name.'-extender-'.$plugin;
72 72
                 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
     private static function validatePlugin($plugin) {
112 112
 
113
-        return !( empty($plugin["class"]) || empty($plugin["event"]) );
113
+        return !(empty($plugin["class"]) || empty($plugin["event"]));
114 114
 
115 115
     }
116 116
 
Please login to merge, or discard this patch.
src/Actions/ExtenderTask.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
             try {
71 71
 
72
-                if ( !self::validateTask($task) ) throw new InstallerException('Skipping invalid task in '.$package_name);
72
+                if (!self::validateTask($task)) throw new InstallerException('Skipping invalid task in '.$package_name);
73 73
                 
74 74
                 $name = $task['name'];
75 75
                 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
     private static function validateTask($task) {
113 113
 
114
-        return !( empty($task["name"]) || empty($task["class"]) );
114
+        return !(empty($task["name"]) || empty($task["class"]));
115 115
 
116 116
     }
117 117
 
Please login to merge, or discard this patch.
src/Actions/Rpc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
             try {
69 69
 
70
-                if ( !self::validateRpc($rpc) ) throw new InstallerException('Skipping invalid rpc service in '.$package_name);
70
+                if (!self::validateRpc($rpc)) throw new InstallerException('Skipping invalid rpc service in '.$package_name);
71 71
                 
72 72
                 $callback = $rpc['callback'];
73 73
                 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
     private static function validateRpc($rpc) {
115 115
 
116
-        return !( empty($rpc['callback']) || ( isset($rpc['signatures']) && !is_array($rpc['signatures']) ) );
116
+        return !(empty($rpc['callback']) || (isset($rpc['signatures']) && !is_array($rpc['signatures'])));
117 117
 
118 118
     }
119 119
 
Please login to merge, or discard this patch.
src/Actions/Service.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
             try {
68 68
 
69
-                if ( !self::validateService($service) ) throw new InstallerException('Skipping invalid service in '.$package_name);
69
+                if (!self::validateService($service)) throw new InstallerException('Skipping invalid service in '.$package_name);
70 70
 
71 71
                 $route = $service["route"];
72 72
                 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     private static function validateService($service) {
110 110
 
111
-        return !( empty($service["route"]) || empty($service["type"]) || empty($service["class"]) );
111
+        return !(empty($service["route"]) || empty($service["type"]) || empty($service["class"]));
112 112
 
113 113
     }
114 114
 
Please login to merge, or discard this patch.
src/Actions/Setting.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -59,19 +59,19 @@  discard block
 block discarded – undo
59 59
 
60 60
         $update = array_intersect($old_settings, $new_settings);
61 61
         
62
-        foreach ( $uninstall as $setting ) {
62
+        foreach ($uninstall as $setting) {
63 63
             
64 64
             $this->removeSetting($io, $package_name, $setting, $initial_extra[$setting]);
65 65
             
66 66
         }
67 67
         
68
-        foreach ( $install as $setting ) {
68
+        foreach ($install as $setting) {
69 69
             
70 70
             $this->addSetting($io, $package_name, $setting, $target_extra[$setting]);
71 71
             
72 72
         }
73 73
         
74
-        foreach ( $update as $setting ) {
74
+        foreach ($update as $setting) {
75 75
             
76 76
             $this->updateSetting($io, $package_name, $setting, $initial_extra[$setting], $target_extra[$setting]);
77 77
             
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         
98 98
         try {
99 99
 
100
-            if ( !self::validateSetting($value) ) throw new InstallerException('Skipping invalid setting '.$setting.' in '.$package_name);
100
+            if (!self::validateSetting($value)) throw new InstallerException('Skipping invalid setting '.$setting.' in '.$package_name);
101 101
 
102 102
             $this->getPackageInstaller()->settings()->add($package_name, $setting, $value);
103 103
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         
116 116
         try {
117 117
 
118
-            if ( !self::validateSetting($value) ) throw new InstallerException('Skipping invalid setting '.$setting.' in '.$package_name);
118
+            if (!self::validateSetting($value)) throw new InstallerException('Skipping invalid setting '.$setting.' in '.$package_name);
119 119
 
120 120
             $id = $this->getPackageInstaller()->settings()->getByName($setting)->getId();
121 121
 
@@ -135,17 +135,17 @@  discard block
 block discarded – undo
135 135
         
136 136
         try {
137 137
 
138
-            if ( !self::validateSetting($value) ) throw new InstallerException('Skipping invalid setting '.$setting.' in '.$package_name);
138
+            if (!self::validateSetting($value)) throw new InstallerException('Skipping invalid setting '.$setting.' in '.$package_name);
139 139
 
140 140
             $old = $this->getPackageInstaller()->settings()->getByName($setting);
141 141
             
142
-            if ( $old->getValue() == $old_value ) {
142
+            if ($old->getValue() == $old_value) {
143 143
                 
144 144
                 $this->getPackageInstaller()->settings()->update($old->getId(), $package_name, $setting, $new_value);
145 145
                 
146 146
                 $io->write(" <comment>~</comment> updated setting ".$setting);
147 147
                 
148
-            } else if ( $io->askConfirmation("Replace modified setting ".$setting."?", false) === true ) {
148
+            } else if ($io->askConfirmation("Replace modified setting ".$setting."?", false) === true) {
149 149
                 
150 150
                 $this->getPackageInstaller()->settings()->update($old->getId(), $package_name, $setting, $new_value);
151 151
                 
Please login to merge, or discard this patch.