@@ -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 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function getOutputRedirection($logFile); |
14 | 14 | |
15 | - /** |
|
15 | + /** |
|
16 | 16 | * @return string |
17 | 17 | */ |
18 | 18 | public function getShouldUnlockOnCompletion(); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | /** @var bool $asyncMode */ |
21 | 21 | protected $asyncMode = true; |
22 | 22 | |
23 | - /** |
|
23 | + /** |
|
24 | 24 | * ConfigBuilder constructor. |
25 | 25 | * @param \App\Satis\ConfigPersister $configPersister |
26 | 26 | */ |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | return $this; |
49 | 49 | } |
50 | 50 | |
51 | - /** |
|
51 | + /** |
|
52 | 52 | * @return bool|null |
53 | 53 | * @throws \App\Satis\Exceptions\PackageBuildFailedException |
54 | 54 | */ |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | $command = new BuildCommand( |
59 | 59 | $this->buildContext->getConfigFile(), |
60 | - config('satis.build_directory') . DIRECTORY_SEPARATOR . $this->buildContext->getBuildDirectory(), |
|
60 | + config('satis.build_directory').DIRECTORY_SEPARATOR.$this->buildContext->getBuildDirectory(), |
|
61 | 61 | config('satis.proxy') |
62 | 62 | ); |
63 | 63 | |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | $output = null; |
67 | 67 | try { |
68 | 68 | $output = $command->withCd(base_path())->run($this->asyncMode); |
69 | - } catch(PackageBuildFailedException $e) { |
|
69 | + } catch (PackageBuildFailedException $e) { |
|
70 | 70 | $output = $e->getMessage(); |
71 | 71 | } finally { |
72 | - if($this->asyncMode === false) { |
|
72 | + if ($this->asyncMode === false) { |
|
73 | 73 | $this->configPersister->unlock($this->buildContext->getItemId()); |
74 | 74 | } |
75 | 75 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | /** @var \App\Satis\Model\ConfigLock */ |
15 | 15 | protected $serializer; |
16 | 16 | |
17 | - /** |
|
17 | + /** |
|
18 | 18 | * ConfigMirror constructor. |
19 | 19 | * @param \JMS\Serializer\Serializer $serializer |
20 | 20 | */ |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $this->serializer = $serializer; |
23 | 23 | } |
24 | 24 | |
25 | - /** |
|
25 | + /** |
|
26 | 26 | * @param string $config |
27 | 27 | * @return string |
28 | 28 | */ |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | $homepage = $publicConfig->getHomepage(); |
42 | 42 | |
43 | - $publicConfig->setHomepage(rtrim($homepage, '/') . '/' . config('satis.public_repository')) |
|
43 | + $publicConfig->setHomepage(rtrim($homepage, '/').'/'.config('satis.public_repository')) |
|
44 | 44 | ->setRequireAll(false) |
45 | 45 | ->setRepositories(new RepositoryCollection([$repository])); |
46 | 46 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | $homepage = $privateConfig->getHomepage(); |
63 | 63 | |
64 | - $privateConfig->setHomepage(rtrim($homepage, '/') . '/' . config('satis.private_repository')) |
|
64 | + $privateConfig->setHomepage(rtrim($homepage, '/').'/'.config('satis.private_repository')) |
|
65 | 65 | ->setRequireAll(true) |
66 | 66 | ->setProviders(true) |
67 | 67 | ->setPackages(new PackageCollection()); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | class ConfigPersister { |
13 | 13 | /** @var \Illuminate\Filesystem\Filesystem $filesystem */ |
14 | - protected $filesystem; |
|
14 | + protected $filesystem; |
|
15 | 15 | /** @var \App\Satis\Model\ConfigLock */ |
16 | 16 | protected $configLock; |
17 | 17 | /** @var \App\Satis\ConfigMirror */ |
@@ -56,14 +56,14 @@ discard block |
||
56 | 56 | public function __construct(Filesystem $filesystem, ConfigLock $configLock, ConfigMirror $configMirror, |
57 | 57 | Serializer $serializer |
58 | 58 | ) { |
59 | - $this->filesystem = $filesystem; |
|
59 | + $this->filesystem = $filesystem; |
|
60 | 60 | $this->configLock = $configLock; |
61 | 61 | $this->configMirror = $configMirror; |
62 | 62 | $this->serializer = $serializer; |
63 | 63 | |
64 | 64 | $this->lockFilename = config('satis.lock'); |
65 | 65 | $this->configFile = config('satis.config'); |
66 | - } |
|
66 | + } |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * @return bool |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException |
27 | 27 | */ |
28 | 28 | protected function getLockFile() { |
29 | - if($this->filesystem->exists($this->lockFilename)) { |
|
29 | + if ($this->filesystem->exists($this->lockFilename)) { |
|
30 | 30 | $configLock = $this->serializer->deserialize( |
31 | 31 | $this->filesystem->get($this->lockFilename), |
32 | 32 | 'App\Satis\Model\ConfigLock', |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | public function lock($repositoryId) { |
79 | 79 | $lockedRepositories = $this->getLockedRepositories(); |
80 | 80 | |
81 | - if(!is_null($repositoryId) && !$lockedRepositories->contains($repositoryId)) { |
|
81 | + if (!is_null($repositoryId) && !$lockedRepositories->contains($repositoryId)) { |
|
82 | 82 | $lockedRepositories->push($repositoryId); |
83 | 83 | } |
84 | 84 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | public function unlock($repositoryId = null) { |
100 | 100 | $lockedRepositories = $this->getLockedRepositories(); |
101 | 101 | |
102 | - if($repositoryId !== null && $lockedRepositories->contains($repositoryId)) { |
|
102 | + if ($repositoryId !== null && $lockedRepositories->contains($repositoryId)) { |
|
103 | 103 | $lockedRepositories = $lockedRepositories->filter(function($id) use($repositoryId) { |
104 | 104 | return $id !== $repositoryId; |
105 | 105 | }); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | return '&> ' . escapeshellarg($logFile); |
20 | 20 | } |
21 | 21 | |
22 | - /** |
|
22 | + /** |
|
23 | 23 | * @return string |
24 | 24 | */ |
25 | 25 | public function getShouldUnlockOnCompletion() { |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @return string |
17 | 17 | */ |
18 | 18 | public function getOutputRedirection($logFile) { |
19 | - return '&> ' . escapeshellarg($logFile); |
|
19 | + return '&> '.escapeshellarg($logFile); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -9,14 +9,14 @@ |
||
9 | 9 | * @author Lukas Homza <[email protected]> |
10 | 10 | */ |
11 | 11 | class PrivateRepository extends BuildContext { |
12 | - /** |
|
12 | + /** |
|
13 | 13 | * @return int |
14 | 14 | */ |
15 | 15 | public function getType() { |
16 | 16 | return ConfigBuilder::PRIVATE_REPOSITORY; |
17 | 17 | } |
18 | 18 | |
19 | - /** |
|
19 | + /** |
|
20 | 20 | * @return string |
21 | 21 | */ |
22 | 22 | public function getConfigFile() { |
@@ -13,85 +13,85 @@ |
||
13 | 13 | * @author Lukas Homza <[email protected]> |
14 | 14 | */ |
15 | 15 | class Archive { |
16 | - /** |
|
17 | - * @var string |
|
18 | - * @Type("string") |
|
19 | - */ |
|
20 | - private $directory; |
|
16 | + /** |
|
17 | + * @var string |
|
18 | + * @Type("string") |
|
19 | + */ |
|
20 | + private $directory; |
|
21 | 21 | |
22 | - /** |
|
23 | - * @var string |
|
24 | - * @Type("string") |
|
25 | - */ |
|
26 | - private $format; |
|
22 | + /** |
|
23 | + * @var string |
|
24 | + * @Type("string") |
|
25 | + */ |
|
26 | + private $format; |
|
27 | 27 | |
28 | - /** |
|
29 | - * @var string |
|
30 | - * @Type("string") |
|
31 | - * @SerializedName("prefix-url") |
|
32 | - */ |
|
33 | - private $prefix_url; |
|
28 | + /** |
|
29 | + * @var string |
|
30 | + * @Type("string") |
|
31 | + * @SerializedName("prefix-url") |
|
32 | + */ |
|
33 | + private $prefix_url; |
|
34 | 34 | |
35 | - /** |
|
36 | - * @var boolean |
|
37 | - * @Type("boolean") |
|
38 | - * @SerializedName("skip-dev") |
|
39 | - */ |
|
40 | - private $skip_dev = true; |
|
35 | + /** |
|
36 | + * @var boolean |
|
37 | + * @Type("boolean") |
|
38 | + * @SerializedName("skip-dev") |
|
39 | + */ |
|
40 | + private $skip_dev = true; |
|
41 | 41 | |
42 | - /** |
|
43 | - * @param string $directory |
|
44 | - */ |
|
45 | - public function setDirectory($directory) { |
|
46 | - $this->directory = $directory; |
|
47 | - } |
|
42 | + /** |
|
43 | + * @param string $directory |
|
44 | + */ |
|
45 | + public function setDirectory($directory) { |
|
46 | + $this->directory = $directory; |
|
47 | + } |
|
48 | 48 | |
49 | - /** |
|
50 | - * @return string |
|
51 | - */ |
|
52 | - public function getDirectory() { |
|
53 | - return $this->directory; |
|
54 | - } |
|
49 | + /** |
|
50 | + * @return string |
|
51 | + */ |
|
52 | + public function getDirectory() { |
|
53 | + return $this->directory; |
|
54 | + } |
|
55 | 55 | |
56 | - /** |
|
57 | - * @param string $format |
|
58 | - */ |
|
59 | - public function setFormat($format) { |
|
60 | - $this->format = $format; |
|
61 | - } |
|
56 | + /** |
|
57 | + * @param string $format |
|
58 | + */ |
|
59 | + public function setFormat($format) { |
|
60 | + $this->format = $format; |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * @return string |
|
65 | - */ |
|
66 | - public function getFormat() { |
|
67 | - return $this->format; |
|
68 | - } |
|
63 | + /** |
|
64 | + * @return string |
|
65 | + */ |
|
66 | + public function getFormat() { |
|
67 | + return $this->format; |
|
68 | + } |
|
69 | 69 | |
70 | - /** |
|
71 | - * @param string $prefix_url |
|
72 | - */ |
|
73 | - public function setPrefixUrl($prefix_url) { |
|
74 | - $this->prefix_url = $prefix_url; |
|
75 | - } |
|
70 | + /** |
|
71 | + * @param string $prefix_url |
|
72 | + */ |
|
73 | + public function setPrefixUrl($prefix_url) { |
|
74 | + $this->prefix_url = $prefix_url; |
|
75 | + } |
|
76 | 76 | |
77 | - /** |
|
78 | - * @return string |
|
79 | - */ |
|
80 | - public function getPrefixUrl() { |
|
81 | - return $this->prefix_url; |
|
82 | - } |
|
77 | + /** |
|
78 | + * @return string |
|
79 | + */ |
|
80 | + public function getPrefixUrl() { |
|
81 | + return $this->prefix_url; |
|
82 | + } |
|
83 | 83 | |
84 | - /** |
|
85 | - * @param boolean $skip_dev |
|
86 | - */ |
|
87 | - public function setSkipDev($skip_dev) { |
|
88 | - $this->skip_dev = $skip_dev; |
|
89 | - } |
|
84 | + /** |
|
85 | + * @param boolean $skip_dev |
|
86 | + */ |
|
87 | + public function setSkipDev($skip_dev) { |
|
88 | + $this->skip_dev = $skip_dev; |
|
89 | + } |
|
90 | 90 | |
91 | - /** |
|
92 | - * @return boolean |
|
93 | - */ |
|
94 | - public function getSkipDev() { |
|
95 | - return $this->skip_dev; |
|
96 | - } |
|
91 | + /** |
|
92 | + * @return boolean |
|
93 | + */ |
|
94 | + public function getSkipDev() { |
|
95 | + return $this->skip_dev; |
|
96 | + } |
|
97 | 97 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | * @return $this |
36 | 36 | */ |
37 | 37 | public function isLocked($locked = null) { |
38 | - if($locked === null) { |
|
38 | + if ($locked === null) { |
|
39 | 39 | return $this->locked; |
40 | 40 | } |
41 | 41 |