mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-24 08:10:07 +02:00
Tweaks.
This commit is contained in:
parent
60d16e57f9
commit
4c584b2634
|
@ -32,6 +32,7 @@ class Autoload
|
||||||
$classFileWithinPhar = $baseDir . $postfix;
|
$classFileWithinPhar = $baseDir . $postfix;
|
||||||
if($this->isReadable($classFileWithinPhar))
|
if($this->isReadable($classFileWithinPhar))
|
||||||
{
|
{
|
||||||
|
/** @noinspection PhpIncludeInspection */
|
||||||
require_once $classFileWithinPhar;
|
require_once $classFileWithinPhar;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -39,6 +40,7 @@ class Autoload
|
||||||
//Try to load a custom Task or Class. Notice that the path is absolute to CWD
|
//Try to load a custom Task or Class. Notice that the path is absolute to CWD
|
||||||
$classFileOutsidePhar = getcwd() . '/.mage/tasks' . $postfix;
|
$classFileOutsidePhar = getcwd() . '/.mage/tasks' . $postfix;
|
||||||
if($this->isReadable($classFileOutsidePhar)){
|
if($this->isReadable($classFileOutsidePhar)){
|
||||||
|
/** @noinspection PhpIncludeInspection */
|
||||||
require_once $classFileOutsidePhar;
|
require_once $classFileOutsidePhar;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -432,7 +432,7 @@ class Config
|
||||||
* Gets General Configuration
|
* Gets General Configuration
|
||||||
*
|
*
|
||||||
* @param string $option
|
* @param string $option
|
||||||
* @param string $default
|
* @param bool|string $default
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function general($option, $default = false)
|
public function general($option, $default = false)
|
||||||
|
@ -453,7 +453,7 @@ class Config
|
||||||
* Gets Environments Full Configuration
|
* Gets Environments Full Configuration
|
||||||
*
|
*
|
||||||
* @param string $option
|
* @param string $option
|
||||||
* @param string $default
|
* @param bool|string $default
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function environmentConfig($option, $default = false)
|
public function environmentConfig($option, $default = false)
|
||||||
|
@ -465,7 +465,7 @@ class Config
|
||||||
* Get deployment configuration
|
* Get deployment configuration
|
||||||
*
|
*
|
||||||
* @param string $option
|
* @param string $option
|
||||||
* @param string $default
|
* @param bool|string $default
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function deployment($option, $default = false)
|
public function deployment($option, $default = false)
|
||||||
|
@ -494,7 +494,7 @@ class Config
|
||||||
* Returns Releasing Options
|
* Returns Releasing Options
|
||||||
*
|
*
|
||||||
* @param string $option
|
* @param string $option
|
||||||
* @param string $default
|
* @param bool|string $default
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function release($option, $default = false)
|
public function release($option, $default = false)
|
||||||
|
|
|
@ -47,6 +47,7 @@ class Colors
|
||||||
* Parses a Text to represent Colors in the Terminal/Console.
|
* Parses a Text to represent Colors in the Terminal/Console.
|
||||||
*
|
*
|
||||||
* @param string $string
|
* @param string $string
|
||||||
|
* @param Config $config
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function color($string, Config $config)
|
public static function color($string, Config $config)
|
||||||
|
|
|
@ -248,11 +248,10 @@ abstract class AbstractTask
|
||||||
return $command;
|
return $command;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $releasesDirectory
|
* @param integer $releaseId
|
||||||
* @param $releaseId
|
* @return bool
|
||||||
* @return bool
|
*/
|
||||||
*/
|
|
||||||
protected function tarRelease($releaseId)
|
protected function tarRelease($releaseId)
|
||||||
{
|
{
|
||||||
$result = true;
|
$result = true;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
namespace Mage\Task\BuiltIn\Deployment\Strategy;
|
namespace Mage\Task\BuiltIn\Deployment\Strategy;
|
||||||
|
|
||||||
|
use Mage\Console;
|
||||||
use Mage\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract;
|
use Mage\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract;
|
||||||
use Mage\Task\Releases\IsReleaseAware;
|
use Mage\Task\Releases\IsReleaseAware;
|
||||||
|
|
||||||
|
|
|
@ -628,12 +628,13 @@ class EncryptTask extends AbstractTask
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* reads an existing ioncube project
|
* reads an existing ioncube project
|
||||||
* file.
|
* file.
|
||||||
*
|
*
|
||||||
* @return array
|
* @param $fileName
|
||||||
*/
|
* @return array
|
||||||
|
*/
|
||||||
private function getOptionsFromFile($fileName) {
|
private function getOptionsFromFile($fileName) {
|
||||||
$s = array ();
|
$s = array ();
|
||||||
$p = array ();
|
$p = array ();
|
||||||
|
|
|
@ -21,6 +21,8 @@ use Mage\Yaml\Exception\DumpException;
|
||||||
*
|
*
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
* @author Fabien Potencier <fabien@symfony.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** @noinspection PhpUndefinedClassInspection */
|
||||||
class Inline
|
class Inline
|
||||||
{
|
{
|
||||||
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')';
|
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')';
|
||||||
|
@ -409,8 +411,9 @@ class Inline
|
||||||
/**
|
/**
|
||||||
* Evaluates scalars and replaces magic values.
|
* Evaluates scalars and replaces magic values.
|
||||||
*
|
*
|
||||||
* @param string $scalar
|
* @param string $scalar
|
||||||
*
|
*
|
||||||
|
* @throws Exception\ParseException
|
||||||
* @return string A YAML string
|
* @return string A YAML string
|
||||||
*/
|
*/
|
||||||
private static function evaluateScalar($scalar)
|
private static function evaluateScalar($scalar)
|
||||||
|
@ -421,12 +424,14 @@ class Inline
|
||||||
case 'null' === $scalarLower:
|
case 'null' === $scalarLower:
|
||||||
case '' === $scalar:
|
case '' === $scalar:
|
||||||
case '~' === $scalar:
|
case '~' === $scalar:
|
||||||
return;
|
/** @noinspection PhpInconsistentReturnPointsInspection */
|
||||||
|
return;
|
||||||
case 'true' === $scalarLower:
|
case 'true' === $scalarLower:
|
||||||
return true;
|
return true;
|
||||||
case 'false' === $scalarLower:
|
case 'false' === $scalarLower:
|
||||||
return false;
|
return false;
|
||||||
// Optimise for returning strings.
|
// Optimise for returning strings.
|
||||||
|
/** @noinspection PhpMissingBreakStatementInspection */
|
||||||
case $scalar[0] === '+' || $scalar[0] === '-' || $scalar[0] === '.' || $scalar[0] === '!' || is_numeric($scalar[0]):
|
case $scalar[0] === '+' || $scalar[0] === '-' || $scalar[0] === '.' || $scalar[0] === '!' || is_numeric($scalar[0]):
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case 0 === strpos($scalar, '!str'):
|
case 0 === strpos($scalar, '!str'):
|
||||||
|
@ -442,6 +447,7 @@ class Inline
|
||||||
throw new ParseException('Object support when parsing a YAML file has been disabled.');
|
throw new ParseException('Object support when parsing a YAML file has been disabled.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @noinspection PhpInconsistentReturnPointsInspection */
|
||||||
return;
|
return;
|
||||||
case ctype_digit($scalar):
|
case ctype_digit($scalar):
|
||||||
$raw = $scalar;
|
$raw = $scalar;
|
||||||
|
|
|
@ -65,6 +65,7 @@ class Unescaper
|
||||||
*
|
*
|
||||||
* @return string The unescaped character
|
* @return string The unescaped character
|
||||||
*/
|
*/
|
||||||
|
/** @noinspection PhpInconsistentReturnPointsInspection */
|
||||||
public function unescapeCharacter($value)
|
public function unescapeCharacter($value)
|
||||||
{
|
{
|
||||||
switch ($value{1}) {
|
switch ($value{1}) {
|
||||||
|
|
Loading…
Reference in a new issue