Skip to content

Commit 6e23623

Browse files
committed
fix some coding style issues
1 parent 03462b5 commit 6e23623

File tree

9 files changed

+42
-47
lines changed

9 files changed

+42
-47
lines changed

report.full

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ FOUND 12 ERROR(S) AND 3 WARNING(S) AFFECTING 9 LINE(S)
2323

2424
FILE: ...nstaller/src/MagentoHackathon/Composer/Magento/Deploy/Manager/Entry.php
2525
--------------------------------------------------------------------------------
26-
FOUND 12 ERROR(S) AFFECTING 9 LINE(S)
26+
FOUND 11 ERROR(S) AFFECTING 8 LINE(S)
2727
--------------------------------------------------------------------------------
2828
2 | ERROR | File doc comment is empty
2929
12 | ERROR | Missing class doc comment
@@ -42,13 +42,12 @@ FOUND 12 ERROR(S) AFFECTING 9 LINE(S)
4242
| | comment
4343
46 | ERROR | There must be exactly one blank line before the tags in function
4444
| | comment
45-
54 | ERROR | File must end with a newline character
4645
--------------------------------------------------------------------------------
4746

4847

4948
FILE: ...poser-installer/src/MagentoHackathon/Composer/Magento/DeployManager.php
5049
--------------------------------------------------------------------------------
51-
FOUND 23 ERROR(S) AFFECTING 18 LINE(S)
50+
FOUND 22 ERROR(S) AFFECTING 17 LINE(S)
5251
--------------------------------------------------------------------------------
5352
2 | ERROR | File doc comment is empty
5453
16 | ERROR | Missing class doc comment
@@ -74,13 +73,12 @@ FOUND 23 ERROR(S) AFFECTING 18 LINE(S)
7473
86 | ERROR | Missing function doc comment
7574
90 | ERROR | Expected "foreach (...) {\n"; found "foreach(...){\n"
7675
91 | ERROR | Expected "if (...) {\n"; found "if(...){\n"
77-
98 | ERROR | File must end with a newline character
7876
--------------------------------------------------------------------------------
7977

8078

8179
FILE: ...installer/src/MagentoHackathon/Composer/Magento/Deploystrategy/Copy.php
8280
--------------------------------------------------------------------------------
83-
FOUND 12 ERROR(S) AND 1 WARNING(S) AFFECTING 5 LINE(S)
81+
FOUND 11 ERROR(S) AND 1 WARNING(S) AFFECTING 4 LINE(S)
8482
--------------------------------------------------------------------------------
8583
4 | WARNING | PHP version not specified
8684
4 | ERROR | Missing @category tag in class comment
@@ -94,7 +92,6 @@ FOUND 12 ERROR(S) AND 1 WARNING(S) AFFECTING 5 LINE(S)
9492
16 | ERROR | Missing comment for param "$source" at position 1
9593
17 | ERROR | Expected 2 space(s) before variable type
9694
17 | ERROR | Missing comment for param "$dest" at position 2
97-
53 | ERROR | No space found after comma in function call
9895
--------------------------------------------------------------------------------
9996

10097

@@ -446,7 +443,7 @@ FOUND 19 ERROR(S) AND 2 WARNING(S) AFFECTING 11 LINE(S)
446443

447444
FILE: ...er-installer/src/MagentoHackathon/Composer/Magento/PackageXmlParser.php
448445
--------------------------------------------------------------------------------
449-
FOUND 31 ERROR(S) AND 1 WARNING(S) AFFECTING 16 LINE(S)
446+
FOUND 30 ERROR(S) AND 1 WARNING(S) AFFECTING 16 LINE(S)
450447
--------------------------------------------------------------------------------
451448
4 | WARNING | PHP version not specified
452449
4 | ERROR | Missing @category tag in class comment
@@ -458,53 +455,51 @@ FOUND 31 ERROR(S) AND 1 WARNING(S) AFFECTING 16 LINE(S)
458455
10 | ERROR | Missing @author tag in class comment
459456
31 | ERROR | Missing comment for param "$moduleDir" at position 1
460457
32 | ERROR | Missing comment for param "$packageXmlFile" at position 2
461-
32 | ERROR | Doc comment for "$translations" missing
462-
45 | ERROR | Expected 2 space(s) before variable type
463-
45 | ERROR | Missing comment for param "$moduleDir" at position 1
464-
60 | ERROR | There must be exactly one blank line before the tags in
458+
33 | ERROR | Missing comment for param "$translations" at position 3
459+
46 | ERROR | Expected 2 space(s) before variable type
460+
46 | ERROR | Missing comment for param "$moduleDir" at position 1
461+
61 | ERROR | There must be exactly one blank line before the tags in
465462
| | function comment
466-
68 | ERROR | Expected 2 space(s) before variable type
467-
68 | ERROR | Missing comment for param "$file" at position 1
468-
68 | ERROR | There must be exactly one blank line before the tags in
463+
69 | ERROR | Expected 2 space(s) before variable type
464+
69 | ERROR | Missing comment for param "$file" at position 1
465+
69 | ERROR | There must be exactly one blank line before the tags in
469466
| | function comment
470-
81 | ERROR | There must be exactly one blank line before the tags in
467+
82 | ERROR | There must be exactly one blank line before the tags in
471468
| | function comment
472-
89 | ERROR | There must be exactly one blank line before the tags in
469+
90 | ERROR | There must be exactly one blank line before the tags in
473470
| | function comment
474-
106 | ERROR | There must be exactly one blank line before the tags in
471+
107 | ERROR | There must be exactly one blank line before the tags in
475472
| | function comment
476-
139 | ERROR | Expected 2 space(s) before variable type
477-
139 | ERROR | Missing comment for param "$target" at position 1
478-
139 | ERROR | There must be exactly one blank line before the tags in
473+
140 | ERROR | Expected 2 space(s) before variable type
474+
140 | ERROR | Missing comment for param "$target" at position 1
475+
140 | ERROR | There must be exactly one blank line before the tags in
479476
| | function comment
480-
154 | ERROR | There must be exactly one blank line before the tags in
477+
155 | ERROR | There must be exactly one blank line before the tags in
481478
| | function comment
482-
170 | ERROR | Expected 2 space(s) before variable type
483-
170 | ERROR | Missing comment for param "$element" at position 1
484-
170 | ERROR | There must be exactly one blank line before the tags in
479+
171 | ERROR | Expected 2 space(s) before variable type
480+
171 | ERROR | Missing comment for param "$element" at position 1
481+
171 | ERROR | There must be exactly one blank line before the tags in
485482
| | function comment
486-
174 | ERROR | Opening brace should be on a new line
487-
204 | ERROR | Expected 2 space(s) before variable type
488-
204 | ERROR | Missing comment for param "$element" at position 1
489-
204 | ERROR | There must be exactly one blank line before the tags in
483+
175 | ERROR | Opening brace should be on a new line
484+
205 | ERROR | Expected 2 space(s) before variable type
485+
205 | ERROR | Missing comment for param "$element" at position 1
486+
205 | ERROR | There must be exactly one blank line before the tags in
490487
| | function comment
491-
209 | ERROR | Inline control structures are not allowed
492488
--------------------------------------------------------------------------------
493489

494490

495491
FILE: ...nto-composer-installer/src/MagentoHackathon/Composer/Magento/Parser.php
496492
--------------------------------------------------------------------------------
497-
FOUND 3 ERROR(S) AFFECTING 3 LINE(S)
493+
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
498494
--------------------------------------------------------------------------------
499-
2 | ERROR | Missing file doc comment
500-
5 | ERROR | Missing interface doc comment
501-
21 | ERROR | File must end with a newline character
495+
2 | ERROR | Missing file doc comment
496+
5 | ERROR | Missing interface doc comment
502497
--------------------------------------------------------------------------------
503498

504499

505500
FILE: ...staller/src/MagentoHackathon/Composer/Magento/PathTranslationParser.php
506501
--------------------------------------------------------------------------------
507-
FOUND 18 ERROR(S) AFFECTING 12 LINE(S)
502+
FOUND 17 ERROR(S) AFFECTING 11 LINE(S)
508503
--------------------------------------------------------------------------------
509504
2 | ERROR | Missing file doc comment
510505
8 | ERROR | Missing @category tag in class comment
@@ -527,13 +522,12 @@ FOUND 18 ERROR(S) AFFECTING 12 LINE(S)
527522
69 | ERROR | Expected "foreach (...) {\n"; found "foreach(...) {\n"
528523
70 | ERROR | Expected "foreach (...) {\n"; found "foreach(...) {\n"
529524
71 | ERROR | Expected "if (...) {\n"; found "if(...) {\n"
530-
83 | ERROR | File must end with a newline character
531525
--------------------------------------------------------------------------------
532526

533527

534528
FILE: ...nto-composer-installer/src/MagentoHackathon/Composer/Magento/Plugin.php
535529
--------------------------------------------------------------------------------
536-
FOUND 33 ERROR(S) AND 3 WARNING(S) AFFECTING 35 LINE(S)
530+
FOUND 32 ERROR(S) AND 3 WARNING(S) AFFECTING 34 LINE(S)
537531
--------------------------------------------------------------------------------
538532
2 | ERROR | File doc comment is empty
539533
26 | ERROR | Missing class doc comment
@@ -576,13 +570,12 @@ FOUND 33 ERROR(S) AND 3 WARNING(S) AFFECTING 35 LINE(S)
576570
183 | WARNING | Line exceeds 120 characters; contains 132 characters
577571
202 | ERROR | Missing comment for param "$source" at position 1
578572
203 | ERROR | Missing comment for param "$target" at position 2
579-
222 | ERROR | File must end with a newline character
580573
--------------------------------------------------------------------------------
581574

582575

583576
FILE: ...poser-installer/src/MagentoHackathon/Composer/Magento/ProjectConfig.php
584577
--------------------------------------------------------------------------------
585-
FOUND 15 ERROR(S) AFFECTING 13 LINE(S)
578+
FOUND 14 ERROR(S) AFFECTING 12 LINE(S)
586579
--------------------------------------------------------------------------------
587580
2 | ERROR | File doc comment is empty
588581
12 | ERROR | Missing class doc comment
@@ -600,7 +593,6 @@ FOUND 15 ERROR(S) AFFECTING 13 LINE(S)
600593
38 | ERROR | Missing function doc comment
601594
45 | ERROR | Missing function doc comment
602595
50 | ERROR | Missing function doc comment
603-
58 | ERROR | File must end with a newline character
604596
--------------------------------------------------------------------------------
605597

606598

src/MagentoHackathon/Composer/Magento/Deploy/Manager/Entry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ public function getDeployStrategy()
5151
}
5252

5353

54-
}
54+
}

src/MagentoHackathon/Composer/Magento/DeployManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ public function doDeploy()
9595
}
9696
}
9797

98-
}
98+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function createDelegate($source, $dest)
5050
}
5151

5252
if (file_exists($destPath) && is_dir($destPath)) {
53-
$mapSource = rtrim($mapSource,'*');
53+
$mapSource = rtrim($mapSource, '*');
5454
if (strcmp(substr($cleanDest, strlen($mapDest)+1), substr($source, strlen($mapSource)+1)) === 0) {
5555
// copy each child of $sourcePath into $destPath
5656
foreach (new \DirectoryIterator($sourcePath) as $item) {

src/MagentoHackathon/Composer/Magento/PackageXmlParser.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class PackageXmlParser extends PathTranslationParser
3030
*
3131
* @param string $moduleDir
3232
* @param string $packageXmlFile
33+
* @param array $translations
3334
*/
3435
public function __construct($moduleDir, $packageXmlFile, $translations = array())
3536
{
@@ -206,6 +207,8 @@ protected function getElementPaths(\SimpleXMLElement $element) {
206207
*/
207208
protected function getFirstChild(\SimpleXMLElement$element)
208209
{
209-
foreach ($element->children() as $child) return $child;
210+
foreach ($element->children() as $child) {
211+
return $child;
212+
}
210213
}
211214
}

src/MagentoHackathon/Composer/Magento/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ interface Parser
1818
* @throws \ErrorException
1919
*/
2020
public function getMappings();
21-
}
21+
}

src/MagentoHackathon/Composer/Magento/PathTranslationParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ public function translatePathMappings($mappings)
8080

8181
return $mappings;
8282
}
83-
}
83+
}

src/MagentoHackathon/Composer/Magento/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,4 @@ protected function copyRecursive($source, $target)
219219

220220
}
221221

222-
}
222+
}

src/MagentoHackathon/Composer/Magento/ProjectConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ public function getLibraryConfigByPackagename( $packagename )
5555

5656

5757

58-
}
58+
}

0 commit comments

Comments
 (0)