mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-19 22:15:05 +02:00
Tweaks.
This commit is contained in:
parent
60d16e57f9
commit
4c584b2634
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -249,8 +249,7 @@ abstract class AbstractTask
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $releasesDirectory
|
||||
* @param $releaseId
|
||||
* @param integer $releaseId
|
||||
* @return bool
|
||||
*/
|
||||
protected function tarRelease($releaseId)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -632,6 +632,7 @@ class EncryptTask extends AbstractTask
|
|||
* reads an existing ioncube project
|
||||
* file.
|
||||
*
|
||||
* @param $fileName
|
||||
* @return array
|
||||
*/
|
||||
private function getOptionsFromFile($fileName) {
|
||||
|
|
|
@ -21,6 +21,8 @@ use Mage\Yaml\Exception\DumpException;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
|
||||
/** @noinspection PhpUndefinedClassInspection */
|
||||
class Inline
|
||||
{
|
||||
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')';
|
||||
|
@ -411,6 +413,7 @@ class Inline
|
|||
*
|
||||
* @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:
|
||||
/** @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;
|
||||
|
|
|
@ -65,6 +65,7 @@ class Unescaper
|
|||
*
|
||||
* @return string The unescaped character
|
||||
*/
|
||||
/** @noinspection PhpInconsistentReturnPointsInspection */
|
||||
public function unescapeCharacter($value)
|
||||
{
|
||||
switch ($value{1}) {
|
||||
|
|
Loading…
Reference in a new issue