Completed
Push — master ( 73d1fa...507f55 )
by Lukáš
02:31
created
app/Console/Commands/Inspire.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
      */
29 29
     public function handle()
30 30
     {
31
-        $this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
31
+        $this->comment(PHP_EOL . Inspiring::quote() . PHP_EOL);
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
app/Console/Commands/Permissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
         $configFile = config('satis.config');
47 47
 
48
-        if($this->filesystem->exists($configFile)) {
48
+        if ($this->filesystem->exists($configFile)) {
49 49
             chmod($configFile, 777);
50 50
         } else {
51 51
             $this->error("\n" . 'Satis config file "' . $configFile . '" does not exist.
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     {
46 46
         if ($e instanceof ModelNotFoundException) {
47 47
             $e = new NotFoundHttpException($e->getMessage(), $e);
48
-        } elseif($e instanceof HttpException && \App::isLocal() === false) {
48
+        } elseif ($e instanceof HttpException && \App::isLocal() === false) {
49 49
             Response::json(['result' => false, 'message' => $e->getMessage()])
50 50
                 ->setStatusCode($e->getStatusCode())
51 51
                 ->send();
Please login to merge, or discard this patch.
app/Http/Controllers/Api/RepositoryController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             ]
35 35
         );
36 36
 
37
-        if($validator->fails()) {
37
+        if ($validator->fails()) {
38 38
             Response::json($validator->errors()->first('url'))
39 39
                 ->setStatusCode(400)
40 40
                 ->send();
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 
45 45
                 Response::json(['command_output' => $output])
46 46
                     ->send();
47
-            } catch(PackageBuildFailedException $e) {
47
+            } catch (PackageBuildFailedException $e) {
48 48
                 Response::json()
49 49
                     ->setStatusCode(500)
50 50
                     ->send();
51
-            } catch(RepositoryNotFoundException $e) {
51
+            } catch (RepositoryNotFoundException $e) {
52 52
                 Response::json()
53 53
                     ->setStatusCode(404)
54 54
                     ->send();
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
 
67 67
             Response::make($repositories)
68 68
               ->send();
69
-        } catch(RepositoryNotFoundException $e) {
69
+        } catch (RepositoryNotFoundException $e) {
70 70
             Response::json()
71 71
                 ->setStatusCode(404)
72 72
                 ->send();
73
-        } catch(PackageBuildFailedException $e) {
73
+        } catch (PackageBuildFailedException $e) {
74 74
             Response::json($e->getMessage())
75 75
                 ->setStatusCode(500)
76 76
                 ->send();
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
 
109 109
             Response::json()
110 110
                 ->send();
111
-        } catch(RepositoryNotFoundException $e) {
111
+        } catch (RepositoryNotFoundException $e) {
112 112
             Response::json()
113 113
                 ->setStatusCode(404)
114 114
                 ->send();
115
-        } catch(PackageBuildFailedException $e) {
115
+        } catch (PackageBuildFailedException $e) {
116 116
             Response::json($e->getMessage())
117 117
                 ->setStatusCode(500)
118 118
                 ->send();
Please login to merge, or discard this patch.
app/Http/Controllers/Controller.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * @param \Illuminate\Http\Request $request
25 25
      */
26 26
     protected function build(ConfigManager $configManager, BuildContext $buildContext, Request $request) {
27
-        if($request->ajax()) {
27
+        if ($request->ajax()) {
28 28
             $buildContext->setItemName($request->get('what'));
29 29
 
30 30
             $configManager->forceBuild($buildContext);
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
                 ->setConfig($configManager->getDefinition())
54 54
                 ->setRepositoryTypes(config('satis.repository_types'))
55 55
                 ->isLoaded(true);
56
-        } catch(Exception $e) {
56
+        } catch (Exception $e) {
57 57
             $message = $e->getMessage();
58
-            if($e instanceof FileNotFoundException) {
58
+            if ($e instanceof FileNotFoundException) {
59 59
                 $message = trans('satis.not_found');
60 60
             }
61 61
 
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function map(Router $router)
39 39
     {
40
-        $router->group(['namespace' => $this->namespace], function ($router) {
40
+        $router->group(['namespace' => $this->namespace], function($router) {
41 41
             require app_path('Http/routes.php');
42 42
         });
43 43
     }
Please login to merge, or discard this patch.
app/Providers/SatisServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                     'json',
56 56
                     function(VisitorInterface $visitor, Collection $collection, array $type, Context $context) {
57 57
                         $output = [];
58
-                        foreach($collection->values() as $package) {
58
+                        foreach ($collection->values() as $package) {
59 59
                             /** @var Package $package */
60 60
 
61 61
                             $output[$package->getName()] = $package->getVersion();
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                         $repositories = $visitor->visitArray($data, $type, $context);
78 78
 
79 79
                         $collection = new RepositoryCollection();
80
-                        foreach($repositories as $repository) {
80
+                        foreach ($repositories as $repository) {
81 81
                             $collection->put($repository->getId(), $repository);
82 82
                         }
83 83
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                     'json',
92 92
                     function(VisitorInterface $visitor, array $data, array $type, Context $context) {
93 93
                         $temp = [];
94
-                        foreach($data as $name => $version) {
94
+                        foreach ($data as $name => $version) {
95 95
                             $temp[] = ['name' => $name, 'version' => $version];
96 96
                         }
97 97
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                         $packages = $visitor->visitArray($temp, $type, $context);
100 100
 
101 101
                         $collection = new PackageCollection();
102
-                        foreach($packages as $package) {
102
+                        foreach ($packages as $package) {
103 103
                             $collection->put($package->getId(), $package);
104 104
                         }
105 105
 
Please login to merge, or discard this patch.
app/Satis/BuildCommand.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -67,16 +67,16 @@  discard block
 block discarded – undo
67 67
             $this->buildDirectory
68 68
         ]);
69 69
 
70
-        if($this->item !== null) {
70
+        if ($this->item !== null) {
71 71
             $chunks->push($this->item);
72 72
         }
73 73
 
74 74
         $chunks->push($commandContext->getOutputRedirection($this->logFile));
75 75
         $chunks->push($commandContext->getShouldUnlockOnCompletion());
76 76
 
77
-        foreach(['http', 'https'] as $protocol) {
77
+        foreach (['http', 'https'] as $protocol) {
78 78
             $proxy = $this->proxySettings->get($protocol);
79
-            if($proxy !== null) {
79
+            if ($proxy !== null) {
80 80
                 $chunks->prepend(strtoupper($protocol) . '_PROXY=' . $proxy);
81 81
             }
82 82
         }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
         chdir($this->currentDirectory);
121 121
 
122
-        if($commandContext instanceof SyncCommand) {
122
+        if ($commandContext instanceof SyncCommand) {
123 123
             $logger->info('Command output => ' . implode(PHP_EOL, $output));
124 124
         } else {
125 125
             $logger->notice('Command output can be found in "' . $this->logFile . '".');
@@ -168,11 +168,11 @@  discard block
 block discarded – undo
168 168
      * @param string $item
169 169
      */
170 170
     public function setItem($item) {
171
-        if($item === null) {
171
+        if ($item === null) {
172 172
             return;
173 173
         }
174 174
 
175
-        if(filter_var($item, FILTER_VALIDATE_URL)) {
175
+        if (filter_var($item, FILTER_VALIDATE_URL)) {
176 176
             $this->item = '--repository-url ' . escapeshellarg($item);
177 177
         } else {
178 178
             $this->item = escapeshellarg($item);
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
     public function run($asyncMode = true) {
209 209
         # -- force sync
210 210
         #if(true) {
211
-        if($asyncMode === false || $this->isWindows() === true) {
212
-            if($this->isWindows() === true) {
211
+        if ($asyncMode === false || $this->isWindows() === true) {
212
+            if ($this->isWindows() === true) {
213 213
                 $this->getLogger()
214 214
                     ->warn('OS does not support async mode, forcing sync.');
215 215
             }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
         $result = $this->exec(new SyncCommand());
233 233
 
234
-        if($result !== 0) {
234
+        if ($result !== 0) {
235 235
             throw new PackageBuildFailedException('Package build failed. Check build log for details.');
236 236
         }
237 237
 
Please login to merge, or discard this patch.
app/Satis/Collections/PackageCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      * @return $this
19 19
      */
20 20
     public function put($key, $value) {
21
-        if(!$value instanceof Package) {
21
+        if (!$value instanceof Package) {
22 22
             throw new InvalidArgumentException('PackageCollection accepts only elements of "Package" type.');
23 23
         }
24 24
 
Please login to merge, or discard this patch.