Test Failed
Push — master ( 4e7ae2...2ce0aa )
by Joe
04:58
created
src/Installer.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -157,13 +157,13 @@
 block discarded – undo
157 157
 	{
158 158
 		if ($this->type == 'myadmin-template') {
159 159
 			$this->initializeTemplateDir();
160
-			$basePath = ($this->templateDir ? $this->templateDir.'/' : '') . $package->getPrettyName();
160
+			$basePath = ($this->templateDir ? $this->templateDir.'/' : '').$package->getPrettyName();
161 161
 		} else {
162 162
 			$this->initializeVendorDir();
163
-			$basePath = ($this->vendorDir ? $this->vendorDir.'/' : '') . $package->getPrettyName();
163
+			$basePath = ($this->vendorDir ? $this->vendorDir.'/' : '').$package->getPrettyName();
164 164
 		}
165 165
 		$targetDir = $package->getTargetDir();
166
-		return $basePath . ($targetDir ? '/'.$targetDir : '');
166
+		return $basePath.($targetDir ? '/'.$targetDir : '');
167 167
 	}
168 168
 
169 169
 	/**
Please login to merge, or discard this patch.
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
  *
39 39
  * @package MyAdmin\Plugins
40 40
  */
41
-class Installer extends LibraryInstaller
42
-{
41
+class Installer extends LibraryInstaller {
43 42
 	protected $templateDir;
44 43
 
45 44
 	/**
@@ -51,8 +50,7 @@  discard block
 block discarded – undo
51 50
 	 * @param Filesystem      $filesystem
52 51
 	 * @param BinaryInstaller $binaryInstaller
53 52
 	 */
54
-	public function __construct(IOInterface $io, Composer $composer, $type = 'library', Filesystem $filesystem = null, BinaryInstaller $binaryInstaller = null)
55
-	{
53
+	public function __construct(IOInterface $io, Composer $composer, $type = 'library', Filesystem $filesystem = null, BinaryInstaller $binaryInstaller = null) {
56 54
 		$this->composer = $composer;
57 55
 		$this->downloadManager = $composer->getDownloadManager();
58 56
 		$this->io = $io;
@@ -66,8 +64,7 @@  discard block
 block discarded – undo
66 64
 	/**
67 65
 	 * {@inheritDoc}
68 66
 	 */
69
-	public function supports($packageType)
70
-	{
67
+	public function supports($packageType) {
71 68
 		return in_array($packageType, [
72 69
 			'myadmin-template',
73 70
 			'myadmin-module',
@@ -86,8 +83,7 @@  discard block
 block discarded – undo
86 83
 	 *
87 84
 	 * @return bool
88 85
 	 */
89
-	public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
90
-	{
86
+	public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) {
91 87
 		return parent::isInstalled($repo, $package);
92 88
 		//return $repo->hasPackage($package) && is_readable($this->getInstallPath($package));
93 89
 	}
@@ -95,8 +91,7 @@  discard block
 block discarded – undo
95 91
 	/**
96 92
 	 * {@inheritDoc}
97 93
 	 */
98
-	public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
99
-	{
94
+	public function install(InstalledRepositoryInterface $repo, PackageInterface $package) {
100 95
 		$this->initializeVendorDir();
101 96
 		$downloadPath = $this->getInstallPath($package);
102 97
 		// remove the binaries if it appears the package files are missing
@@ -114,8 +109,7 @@  discard block
 block discarded – undo
114 109
 	 * {@inheritDoc}
115 110
 	 * @throws \InvalidArgumentException
116 111
 	 */
117
-	public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
118
-	{
112
+	public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {
119 113
 		if (!$repo->hasPackage($initial)) {
120 114
 			throw new \InvalidArgumentException('Package is not installed: '.$initial);
121 115
 		}
@@ -133,8 +127,7 @@  discard block
 block discarded – undo
133 127
 	 * {@inheritDoc}
134 128
 	 * @throws \InvalidArgumentException
135 129
 	 */
136
-	public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
137
-	{
130
+	public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) {
138 131
 		if (!$repo->hasPackage($package)) {
139 132
 			throw new \InvalidArgumentException('Package is not installed: '.$package);
140 133
 		}
@@ -153,8 +146,7 @@  discard block
 block discarded – undo
153 146
 	/**
154 147
 	 * {@inheritDoc}
155 148
 	 */
156
-	public function getInstallPath(PackageInterface $package)
157
-	{
149
+	public function getInstallPath(PackageInterface $package) {
158 150
 		if ($this->type == 'myadmin-template') {
159 151
 			$this->initializeTemplateDir();
160 152
 			$basePath = ($this->templateDir ? $this->templateDir.'/' : '') . $package->getPrettyName();
@@ -171,8 +163,7 @@  discard block
 block discarded – undo
171 163
 	 *
172 164
 	 * @param PackageInterface $package Package instance
173 165
 	 */
174
-	public function ensureBinariesPresence(PackageInterface $package)
175
-	{
166
+	public function ensureBinariesPresence(PackageInterface $package) {
176 167
 		$this->binaryInstaller->installBinaries($package, $this->getInstallPath($package), false);
177 168
 	}
178 169
 
@@ -185,8 +176,7 @@  discard block
 block discarded – undo
185 176
 	 * @param  PackageInterface $package
186 177
 	 * @return string
187 178
 	 */
188
-	protected function getPackageBasePath(PackageInterface $package)
189
-	{
179
+	protected function getPackageBasePath(PackageInterface $package) {
190 180
 		$installPath = $this->getInstallPath($package);
191 181
 		$targetDir = $package->getTargetDir();
192 182
 		if ($targetDir) {
@@ -198,8 +188,7 @@  discard block
 block discarded – undo
198 188
 	/**
199 189
 	 * @param \Composer\Package\PackageInterface $package
200 190
 	 */
201
-	protected function installCode(PackageInterface $package)
202
-	{
191
+	protected function installCode(PackageInterface $package) {
203 192
 		$downloadPath = $this->getInstallPath($package);
204 193
 		$this->downloadManager->download($package, $downloadPath);
205 194
 	}
@@ -208,8 +197,7 @@  discard block
 block discarded – undo
208 197
 	 * @param \Composer\Package\PackageInterface $initial
209 198
 	 * @param \Composer\Package\PackageInterface $target
210 199
 	 */
211
-	protected function updateCode(PackageInterface $initial, PackageInterface $target)
212
-	{
200
+	protected function updateCode(PackageInterface $initial, PackageInterface $target) {
213 201
 		$initialDownloadPath = $this->getInstallPath($initial);
214 202
 		$targetDownloadPath = $this->getInstallPath($target);
215 203
 		if ($targetDownloadPath !== $initialDownloadPath) {
@@ -230,20 +218,17 @@  discard block
 block discarded – undo
230 218
 	/**
231 219
 	 * @param \Composer\Package\PackageInterface $package
232 220
 	 */
233
-	protected function removeCode(PackageInterface $package)
234
-	{
221
+	protected function removeCode(PackageInterface $package) {
235 222
 		$downloadPath = $this->getPackageBasePath($package);
236 223
 		$this->downloadManager->remove($package, $downloadPath);
237 224
 	}
238 225
 
239
-	protected function initializeVendorDir()
240
-	{
226
+	protected function initializeVendorDir() {
241 227
 		$this->filesystem->ensureDirectoryExists($this->vendorDir);
242 228
 		$this->vendorDir = realpath($this->vendorDir);
243 229
 	}
244 230
 
245
-	protected function initializeTemplateDir()
246
-	{
231
+	protected function initializeTemplateDir() {
247 232
 		$this->filesystem->ensureDirectoryExists($this->templateDir);
248 233
 		$this->templateDir = realpath($this->templateDir);
249 234
 	}
Please login to merge, or discard this patch.
src/TemplateInstaller.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,14 +17,12 @@  discard block
 block discarded – undo
17 17
  *
18 18
  * @package MyAdmin\Plugins
19 19
  */
20
-class TemplateInstaller extends LibraryInstaller
21
-{
20
+class TemplateInstaller extends LibraryInstaller {
22 21
 	/**
23 22
 	 * {@inheritDoc}
24 23
 	 * @throws \InvalidArgumentException
25 24
 	 */
26
-	public function getInstallPath(PackageInterface $package)
27
-	{
25
+	public function getInstallPath(PackageInterface $package) {
28 26
 		$prefix = mb_substr($package->getPrettyName(), 0, 23);
29 27
 		if ('myadmin/template-' !== $prefix) {
30 28
 			throw new \InvalidArgumentException(
@@ -39,8 +37,7 @@  discard block
 block discarded – undo
39 37
 	/**
40 38
 	 * {@inheritDoc}
41 39
 	 */
42
-	public function supports($packageType)
43
-	{
40
+	public function supports($packageType) {
44 41
 		return 'myadmin-template' === $packageType;
45 42
 	}
46 43
 }
Please login to merge, or discard this patch.
src/CommandProvider.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,13 +21,11 @@
 block discarded – undo
21 21
  *
22 22
  * @package MyAdmin\Plugins
23 23
  */
24
-class CommandProvider implements CommandProviderCapability
25
-{
24
+class CommandProvider implements CommandProviderCapability {
26 25
 	/**
27 26
 	 * @return array
28 27
 	 */
29
-	public function getCommands()
30
-	{
28
+	public function getCommands() {
31 29
 		return [
32 30
 			new Command,
33 31
 			new Parse,
Please login to merge, or discard this patch.
src/function_requirements.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
  * @param $function
12 12
  * @return bool whether or not it found the given function/class
13 13
  */
14
-function function_requirements($function)
15
-{
14
+function function_requirements($function) {
16 15
 	return $GLOBALS['tf']->function_requirements($function);
17 16
 }
Please login to merge, or discard this patch.