Skip to content

Commit 156de31

Browse files
committed
codestyle fixes
1 parent 486ba40 commit 156de31

File tree

9 files changed

+13
-28
lines changed

9 files changed

+13
-28
lines changed

src/MagentoHackathon/Composer/Magento/Deploystrategy/DeploystrategyAbstract.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ public function deploy()
113113
*/
114114
protected function beforeDeploy()
115115
{
116-
117116
}
118117

119118
/**
@@ -123,7 +122,6 @@ protected function beforeDeploy()
123122
*/
124123
protected function afterDeploy()
125124
{
126-
127125
}
128126

129127
/**
@@ -150,7 +148,6 @@ public function clean()
150148
*/
151149
protected function beforeClean()
152150
{
153-
154151
}
155152

156153
/**
@@ -160,7 +157,6 @@ protected function beforeClean()
160157
*/
161158
protected function afterClean()
162159
{
163-
164160
}
165161

166162
/**

src/MagentoHackathon/Composer/Magento/Deploystrategy/Move.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function transfer($item, $subDestPath)
3030
*/
3131
protected function afterDeploy()
3232
{
33-
if(is_dir($this->sourceDir)) {
33+
if (is_dir($this->sourceDir)) {
3434
$this->removeDir($this->sourceDir);
3535
}
3636
}
@@ -50,7 +50,7 @@ private function removeDir($path)
5050
);
5151
foreach ($iterator as $fileInfo) {
5252
$filename = $fileInfo->getFilename();
53-
if($filename != '..' || $filename != '.') {
53+
if ($filename != '..' || $filename != '.') {
5454
$removeAction = ($fileInfo->isDir() ? 'rmdir' : 'unlink');
5555
try {
5656
$removeAction($fileInfo->getRealPath());
@@ -60,11 +60,9 @@ private function removeDir($path)
6060
} else {
6161
throw new Exception(sprintf('%s could not be removed.', $fileInfo->getRealPath()));
6262
}
63-
6463
}
6564
}
6665
}
6766
rmdir($path);
6867
}
69-
7068
}

src/MagentoHackathon/Composer/Magento/Plugin.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,20 +264,20 @@ public function onPackageUpdate(PackageEvent $event)
264264
$rule = $event->getOperation()->getReason();
265265
if ($rule instanceof Rule) {
266266
if ($event->getOperation()->getJobType() === 'update') {
267-
if ($rule->getJob() && $rule->getJob()['packageName'] === 'magento-hackathon/magento-composer-installer') {
267+
if (
268+
$rule->getJob()
269+
&& $rule->getJob()['packageName'] === 'magento-hackathon/magento-composer-installer') {
268270
throw new \Exception(
269-
'Dont update the "magento-hackathon/magento-composer-installer" with active plugins.' . PHP_EOL .
271+
'Dont update the "magento-hackathon/magento-composer-installer" with active plugins.'
272+
. PHP_EOL .
270273
'Consult the documentation on how to update the Installer' . PHP_EOL .
271274
'https://github.com/Cotya/magento-composer-installer#update-the-installer' . PHP_EOL
272275
);
273276
}
274277
}
275-
} else {
276-
277278
}
278-
279279
}
280-
280+
281281
/**
282282
* test configured repositories and give message about adding recommended ones
283283
*/

src/MagentoHackathon/Composer/Magento/ProjectConfig.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,5 +518,4 @@ public function setNoDevMode()
518518
{
519519
$this->isDevMode = false;
520520
}
521-
522521
}

tests/MagentoHackathon/Composer/FullStack/Feature/UpdatePluginTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,5 @@ public function testDeployOfEarlierInstalledPackages()
8080
} catch (\Exception $e) {
8181
$this->assertContains('Dont update the', $e->getMessage());
8282
}
83-
84-
8583
}
8684
}

tests/MagentoHackathon/Composer/Magento/Deploystrategy/CopyTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getTestDeployStrategyFiletype($isDir = false)
2525

2626
return self::TEST_FILETYPE_FILE;
2727
}
28-
28+
2929
public function testCopyDirToDirOfSameName()
3030
{
3131
$sourceRoot = 'root';
@@ -53,7 +53,7 @@ public function testCopyDirToDirOfSameName()
5353
public function testWildcardCopyToExistingDir()
5454
{
5555
$sourceContents = "app/code/test.php";
56-
56+
5757
//create target directory before
5858
$this->mkdir(sprintf('%s/app/code', $this->destDir));
5959
$this->mkdir(sprintf('%s/app/code', $this->sourceDir));
@@ -72,7 +72,6 @@ public function testWildcardCopyToExistingDir()
7272
$this->strategy->deploy();
7373

7474
$this->assertFileNotExists(sprintf('%s/app/app/code/test.php', $this->destDir));
75-
7675
}
7776

7877
public function testDeployedFilesAreStored()

tests/MagentoHackathon/Composer/Magento/Event/EventManagerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ public function testListenThrowsExceptionIfArgument2NotCallable()
2929
public function testAddListener()
3030
{
3131
$this->eventManager->listen('some-event', function () {
32-
3332
});
3433
$this->eventManager->listen('some-event', function () {
35-
3634
});
3735
}
3836

tests/MagentoHackathon/Composer/Magento/FullStack/GlobalPluginTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@
77

88
class GlobalPluginTest extends AbstractTest
99
{
10-
10+
1111
protected static $processLogCounter = 1;
1212

1313
protected function setUp()
1414
{
15-
1615
}
17-
16+
1817
protected function tearDown()
1918
{
20-
2119
}
2220

2321
protected function prepareCleanDirectories()
@@ -40,7 +38,7 @@ public function testGlobalInstall()
4038
$process->run();
4139
$this->assertProcess($process);
4240
}
43-
41+
4442
public function testGlobalUpdate()
4543
{
4644
$this->markTestSkipped('This has not been implemented yet.');

tests/MagentoHackathon/Composer/Magento/Repository/InstalledFilesFilesystemRepositoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ public function testFindAllPackages()
151151
$this->repository->add($package);
152152
$this->assertCount(1, $this->repository->findAll());
153153
$this->assertSame(array($package), $this->repository->findAll());
154-
155154
}
156155

157156
public function tearDown()

0 commit comments

Comments
 (0)