diff --git a/Mage/Autoload.php b/Mage/Autoload.php index 132c6c3..ab088ba 100644 --- a/Mage/Autoload.php +++ b/Mage/Autoload.php @@ -32,6 +32,7 @@ class Autoload $classFileWithinPhar = $baseDir . $postfix; if($this->isReadable($classFileWithinPhar)) { + /** @noinspection PhpIncludeInspection */ require_once $classFileWithinPhar; return true; } @@ -39,6 +40,7 @@ class Autoload //Try to load a custom Task or Class. Notice that the path is absolute to CWD $classFileOutsidePhar = getcwd() . '/.mage/tasks' . $postfix; if($this->isReadable($classFileOutsidePhar)){ + /** @noinspection PhpIncludeInspection */ require_once $classFileOutsidePhar; return true; } diff --git a/Mage/Config.php b/Mage/Config.php index 8b4b532..5df5ef7 100644 --- a/Mage/Config.php +++ b/Mage/Config.php @@ -432,7 +432,7 @@ class Config * Gets General Configuration * * @param string $option - * @param string $default + * @param bool|string $default * @return mixed */ public function general($option, $default = false) @@ -453,7 +453,7 @@ class Config * Gets Environments Full Configuration * * @param string $option - * @param string $default + * @param bool|string $default * @return mixed */ public function environmentConfig($option, $default = false) @@ -465,7 +465,7 @@ class Config * Get deployment configuration * * @param string $option - * @param string $default + * @param bool|string $default * @return string */ public function deployment($option, $default = false) @@ -494,7 +494,7 @@ class Config * Returns Releasing Options * * @param string $option - * @param string $default + * @param bool|string $default * @return mixed */ public function release($option, $default = false) diff --git a/Mage/Console/Colors.php b/Mage/Console/Colors.php index fe232fe..fa320a3 100644 --- a/Mage/Console/Colors.php +++ b/Mage/Console/Colors.php @@ -47,6 +47,7 @@ class Colors * Parses a Text to represent Colors in the Terminal/Console. * * @param string $string + * @param Config $config * @return string */ public static function color($string, Config $config) diff --git a/Mage/Task/AbstractTask.php b/Mage/Task/AbstractTask.php index fc1541c..a13c844 100644 --- a/Mage/Task/AbstractTask.php +++ b/Mage/Task/AbstractTask.php @@ -248,11 +248,10 @@ abstract class AbstractTask return $command; } - /** - * @param $releasesDirectory - * @param $releaseId - * @return bool - */ + /** + * @param integer $releaseId + * @return bool + */ protected function tarRelease($releaseId) { $result = true; diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php index d476d9c..94662a5 100644 --- a/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php +++ b/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php @@ -10,6 +10,7 @@ namespace Mage\Task\BuiltIn\Deployment\Strategy; +use Mage\Console; use Mage\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract; use Mage\Task\Releases\IsReleaseAware; diff --git a/Mage/Task/BuiltIn/Ioncube/EncryptTask.php b/Mage/Task/BuiltIn/Ioncube/EncryptTask.php index 1a3f5e6..a4fe358 100644 --- a/Mage/Task/BuiltIn/Ioncube/EncryptTask.php +++ b/Mage/Task/BuiltIn/Ioncube/EncryptTask.php @@ -628,12 +628,13 @@ class EncryptTask extends AbstractTask ); } - /** - * reads an existing ioncube project - * file. - * - * @return array - */ + /** + * reads an existing ioncube project + * file. + * + * @param $fileName + * @return array + */ private function getOptionsFromFile($fileName) { $s = array (); $p = array (); diff --git a/Mage/Yaml/Inline.php b/Mage/Yaml/Inline.php index 1a46d7d..5e49cc7 100644 --- a/Mage/Yaml/Inline.php +++ b/Mage/Yaml/Inline.php @@ -21,6 +21,8 @@ use Mage\Yaml\Exception\DumpException; * * @author Fabien Potencier */ + +/** @noinspection PhpUndefinedClassInspection */ class Inline { const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')'; @@ -409,8 +411,9 @@ class Inline /** * Evaluates scalars and replaces magic values. * - * @param string $scalar + * @param string $scalar * + * @throws Exception\ParseException * @return string A YAML string */ private static function evaluateScalar($scalar) @@ -421,12 +424,14 @@ class Inline case 'null' === $scalarLower: case '' === $scalar: case '~' === $scalar: - return; + /** @noinspection PhpInconsistentReturnPointsInspection */ + return; case 'true' === $scalarLower: return true; case 'false' === $scalarLower: return false; // Optimise for returning strings. + /** @noinspection PhpMissingBreakStatementInspection */ case $scalar[0] === '+' || $scalar[0] === '-' || $scalar[0] === '.' || $scalar[0] === '!' || is_numeric($scalar[0]): switch (true) { case 0 === strpos($scalar, '!str'): @@ -442,6 +447,7 @@ class Inline throw new ParseException('Object support when parsing a YAML file has been disabled.'); } + /** @noinspection PhpInconsistentReturnPointsInspection */ return; case ctype_digit($scalar): $raw = $scalar; diff --git a/Mage/Yaml/Unescaper.php b/Mage/Yaml/Unescaper.php index 33e70d9..7c9091b 100644 --- a/Mage/Yaml/Unescaper.php +++ b/Mage/Yaml/Unescaper.php @@ -65,6 +65,7 @@ class Unescaper * * @return string The unescaped character */ + /** @noinspection PhpInconsistentReturnPointsInspection */ public function unescapeCharacter($value) { switch ($value{1}) {