Skip to content

Commit

Permalink
fix some coding style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Flyingmana committed Jun 14, 2014
1 parent 03462b5 commit 6e23623
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 47 deletions.
70 changes: 31 additions & 39 deletions report.full
Expand Up @@ -23,7 +23,7 @@ FOUND 12 ERROR(S) AND 3 WARNING(S) AFFECTING 9 LINE(S)

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


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


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


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

FILE: ...er-installer/src/MagentoHackathon/Composer/Magento/PackageXmlParser.php
--------------------------------------------------------------------------------
FOUND 31 ERROR(S) AND 1 WARNING(S) AFFECTING 16 LINE(S)
FOUND 30 ERROR(S) AND 1 WARNING(S) AFFECTING 16 LINE(S)
--------------------------------------------------------------------------------
4 | WARNING | PHP version not specified
4 | ERROR | Missing @category tag in class comment
Expand All @@ -458,53 +455,51 @@ FOUND 31 ERROR(S) AND 1 WARNING(S) AFFECTING 16 LINE(S)
10 | ERROR | Missing @author tag in class comment
31 | ERROR | Missing comment for param "$moduleDir" at position 1
32 | ERROR | Missing comment for param "$packageXmlFile" at position 2
32 | ERROR | Doc comment for "$translations" missing
45 | ERROR | Expected 2 space(s) before variable type
45 | ERROR | Missing comment for param "$moduleDir" at position 1
60 | ERROR | There must be exactly one blank line before the tags in
33 | ERROR | Missing comment for param "$translations" at position 3
46 | ERROR | Expected 2 space(s) before variable type
46 | ERROR | Missing comment for param "$moduleDir" at position 1
61 | ERROR | There must be exactly one blank line before the tags in
| | function comment
68 | ERROR | Expected 2 space(s) before variable type
68 | ERROR | Missing comment for param "$file" at position 1
68 | ERROR | There must be exactly one blank line before the tags in
69 | ERROR | Expected 2 space(s) before variable type
69 | ERROR | Missing comment for param "$file" at position 1
69 | ERROR | There must be exactly one blank line before the tags in
| | function comment
81 | ERROR | There must be exactly one blank line before the tags in
82 | ERROR | There must be exactly one blank line before the tags in
| | function comment
89 | ERROR | There must be exactly one blank line before the tags in
90 | ERROR | There must be exactly one blank line before the tags in
| | function comment
106 | ERROR | There must be exactly one blank line before the tags in
107 | ERROR | There must be exactly one blank line before the tags in
| | function comment
139 | ERROR | Expected 2 space(s) before variable type
139 | ERROR | Missing comment for param "$target" at position 1
139 | ERROR | There must be exactly one blank line before the tags in
140 | ERROR | Expected 2 space(s) before variable type
140 | ERROR | Missing comment for param "$target" at position 1
140 | ERROR | There must be exactly one blank line before the tags in
| | function comment
154 | ERROR | There must be exactly one blank line before the tags in
155 | ERROR | There must be exactly one blank line before the tags in
| | function comment
170 | ERROR | Expected 2 space(s) before variable type
170 | ERROR | Missing comment for param "$element" at position 1
170 | ERROR | There must be exactly one blank line before the tags in
171 | ERROR | Expected 2 space(s) before variable type
171 | ERROR | Missing comment for param "$element" at position 1
171 | ERROR | There must be exactly one blank line before the tags in
| | function comment
174 | ERROR | Opening brace should be on a new line
204 | ERROR | Expected 2 space(s) before variable type
204 | ERROR | Missing comment for param "$element" at position 1
204 | ERROR | There must be exactly one blank line before the tags in
175 | ERROR | Opening brace should be on a new line
205 | ERROR | Expected 2 space(s) before variable type
205 | ERROR | Missing comment for param "$element" at position 1
205 | ERROR | There must be exactly one blank line before the tags in
| | function comment
209 | ERROR | Inline control structures are not allowed
--------------------------------------------------------------------------------


FILE: ...nto-composer-installer/src/MagentoHackathon/Composer/Magento/Parser.php
--------------------------------------------------------------------------------
FOUND 3 ERROR(S) AFFECTING 3 LINE(S)
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | Missing file doc comment
5 | ERROR | Missing interface doc comment
21 | ERROR | File must end with a newline character
2 | ERROR | Missing file doc comment
5 | ERROR | Missing interface doc comment
--------------------------------------------------------------------------------


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


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


FILE: ...poser-installer/src/MagentoHackathon/Composer/Magento/ProjectConfig.php
--------------------------------------------------------------------------------
FOUND 15 ERROR(S) AFFECTING 13 LINE(S)
FOUND 14 ERROR(S) AFFECTING 12 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | File doc comment is empty
12 | ERROR | Missing class doc comment
Expand All @@ -600,7 +593,6 @@ FOUND 15 ERROR(S) AFFECTING 13 LINE(S)
38 | ERROR | Missing function doc comment
45 | ERROR | Missing function doc comment
50 | ERROR | Missing function doc comment
58 | ERROR | File must end with a newline character
--------------------------------------------------------------------------------


Expand Down
Expand Up @@ -51,4 +51,4 @@ public function getDeployStrategy()
}


}
}
2 changes: 1 addition & 1 deletion src/MagentoHackathon/Composer/Magento/DeployManager.php
Expand Up @@ -95,4 +95,4 @@ public function doDeploy()
}
}

}
}
Expand Up @@ -50,7 +50,7 @@ public function createDelegate($source, $dest)
}

if (file_exists($destPath) && is_dir($destPath)) {
$mapSource = rtrim($mapSource,'*');
$mapSource = rtrim($mapSource, '*');
if (strcmp(substr($cleanDest, strlen($mapDest)+1), substr($source, strlen($mapSource)+1)) === 0) {
// copy each child of $sourcePath into $destPath
foreach (new \DirectoryIterator($sourcePath) as $item) {
Expand Down
5 changes: 4 additions & 1 deletion src/MagentoHackathon/Composer/Magento/PackageXmlParser.php
Expand Up @@ -30,6 +30,7 @@ class PackageXmlParser extends PathTranslationParser
*
* @param string $moduleDir
* @param string $packageXmlFile
* @param array $translations
*/
public function __construct($moduleDir, $packageXmlFile, $translations = array())
{
Expand Down Expand Up @@ -206,6 +207,8 @@ protected function getElementPaths(\SimpleXMLElement $element) {
*/
protected function getFirstChild(\SimpleXMLElement$element)
{
foreach ($element->children() as $child) return $child;
foreach ($element->children() as $child) {
return $child;
}
}
}
2 changes: 1 addition & 1 deletion src/MagentoHackathon/Composer/Magento/Parser.php
Expand Up @@ -18,4 +18,4 @@ interface Parser
* @throws \ErrorException
*/
public function getMappings();
}
}
Expand Up @@ -80,4 +80,4 @@ public function translatePathMappings($mappings)

return $mappings;
}
}
}
2 changes: 1 addition & 1 deletion src/MagentoHackathon/Composer/Magento/Plugin.php
Expand Up @@ -219,4 +219,4 @@ protected function copyRecursive($source, $target)

}

}
}
2 changes: 1 addition & 1 deletion src/MagentoHackathon/Composer/Magento/ProjectConfig.php
Expand Up @@ -55,4 +55,4 @@ public function getLibraryConfigByPackagename( $packagename )



}
}

0 comments on commit 6e23623

Please sign in to comment.