@@ -45,7 +45,7 @@ |
||
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(); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $repositories = $configManager->getPackages($packageId); |
66 | 66 | |
67 | 67 | Response::make($repositories) |
68 | - ->send(); |
|
68 | + ->send(); |
|
69 | 69 | } catch(RepositoryNotFoundException $e) { |
70 | 70 | Response::json() |
71 | 71 | ->setStatusCode(404) |
@@ -117,5 +117,5 @@ discard block |
||
117 | 117 | ->setStatusCode(500) |
118 | 118 | ->send(); |
119 | 119 | } |
120 | - } |
|
120 | + } |
|
121 | 121 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | ] |
35 | 35 | ); |
36 | 36 | |
37 | - if($validator->fails()) { |
|
37 | + if ($validator->fails()) { |
|
38 | 38 | Response::json($validator->errors()->first('name')) |
39 | 39 | ->setStatusCode(400) |
40 | 40 | ->send(); |
@@ -44,11 +44,11 @@ discard block |
||
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 |
||
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 |
||
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(); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $repositories = $configManager->getRepositories($repositoryId); |
66 | 66 | |
67 | 67 | Response::make($repositories) |
68 | - ->send(); |
|
68 | + ->send(); |
|
69 | 69 | } catch(RepositoryNotFoundException $e) { |
70 | 70 | Response::json() |
71 | 71 | ->setStatusCode(404) |
@@ -117,5 +117,5 @@ discard block |
||
117 | 117 | ->setStatusCode(500) |
118 | 118 | ->send(); |
119 | 119 | } |
120 | - } |
|
120 | + } |
|
121 | 121 | } |
@@ -34,7 +34,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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(); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @author Lukas Homza <[email protected]> |
19 | 19 | */ |
20 | 20 | class Controller extends BaseController { |
21 | - /** |
|
21 | + /** |
|
22 | 22 | * @param \App\Satis\ConfigManager $configManager |
23 | 23 | * @param \App\Satis\BuildContext $buildContext |
24 | 24 | * @param \Illuminate\Http\Request $request |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | ]); |
74 | 74 | } |
75 | 75 | |
76 | - /** |
|
76 | + /** |
|
77 | 77 | * @param \App\Satis\ConfigManager $configManager |
78 | 78 | * @param \Illuminate\Http\Request $request |
79 | 79 | */ |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $this->build($configManager, new PrivateRepository(), $request); |
82 | 82 | } |
83 | 83 | |
84 | - /** |
|
84 | + /** |
|
85 | 85 | * @param \App\Satis\ConfigManager $configManager |
86 | 86 | * @param \Illuminate\Http\Request $request |
87 | 87 | */ |
@@ -24,7 +24,7 @@ discard block |
||
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->setDisableBuild(true) |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | ->setConfig($configManager->getDefinition()) |
58 | 58 | ->setRepositoryTypes(config('satis.repository_types')) |
59 | 59 | ->isLoaded(true); |
60 | - } catch(Exception $e) { |
|
60 | + } catch (Exception $e) { |
|
61 | 61 | $message = $e->getMessage(); |
62 | - if($e instanceof FileNotFoundException) { |
|
62 | + if ($e instanceof FileNotFoundException) { |
|
63 | 63 | $message = trans('satis.not_found'); |
64 | 64 | } |
65 | 65 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | return view('index', [ |
75 | 75 | 'satis' => $serializer->serialize($controlPanelConfig, 'json'), |
76 | 76 | 'webpackDevServer' => config('satis.webpack_dev_server'), |
77 | - 'nodeServer' => config('satis.node.host') . ':' . config('satis.node.port') |
|
77 | + 'nodeServer' => config('satis.node.host').':'.config('satis.node.port') |
|
78 | 78 | ]); |
79 | 79 | } |
80 | 80 |
@@ -37,7 +37,7 @@ |
||
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 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * @author Lukas Homza <[email protected]> |
24 | 24 | */ |
25 | 25 | class SatisServiceProvider extends ServiceProvider { |
26 | - /** |
|
26 | + /** |
|
27 | 27 | * @return void |
28 | 28 | */ |
29 | 29 | public function boot() { |
@@ -55,13 +55,13 @@ discard block |
||
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(); |
62 | 62 | } |
63 | 63 | |
64 | - if(!$output) { |
|
64 | + if (!$output) { |
|
65 | 65 | return null; |
66 | 66 | } |
67 | 67 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $repositories = $visitor->visitArray($data, $type, $context); |
82 | 82 | |
83 | 83 | $collection = new RepositoryCollection(); |
84 | - foreach($repositories as $repository) { |
|
84 | + foreach ($repositories as $repository) { |
|
85 | 85 | $collection->put($repository->getId(), $repository); |
86 | 86 | } |
87 | 87 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'json', |
96 | 96 | function(VisitorInterface $visitor, array $data, array $type, Context $context) { |
97 | 97 | $temp = []; |
98 | - foreach($data as $name => $version) { |
|
98 | + foreach ($data as $name => $version) { |
|
99 | 99 | $temp[] = ['name' => $name, 'version' => $version]; |
100 | 100 | } |
101 | 101 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $packages = $visitor->visitArray($temp, $type, $context); |
104 | 104 | |
105 | 105 | $collection = new PackageCollection(); |
106 | - foreach($packages as $package) { |
|
106 | + foreach ($packages as $package) { |
|
107 | 107 | $collection->put($package->getId(), $package); |
108 | 108 | } |
109 | 109 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | /** @var string $itemName */ |
13 | 13 | protected $itemName; |
14 | 14 | |
15 | - /** |
|
15 | + /** |
|
16 | 16 | * @return int |
17 | 17 | */ |
18 | 18 | abstract public function getType(); |
@@ -18,7 +18,7 @@ |
||
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 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @return $this |
19 | 19 | */ |
20 | 20 | public function put($key, $value) { |
21 | - if(!$value instanceof Repository) { |
|
21 | + if (!$value instanceof Repository) { |
|
22 | 22 | throw new InvalidArgumentException('RepositoryCollection accepts only elements of "Repository" type.'); |
23 | 23 | } |
24 | 24 |