From 49a7e0857aad086954e85995bad9dffd73bbba76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Monta=C3=B1ez?= Date: Fri, 13 Jun 2014 16:25:24 -0300 Subject: [PATCH] Missing use statement should be avoided #inslight --- Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php | 1 + Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php | 1 + Mage/Yaml/Dumper.php | 2 ++ Mage/Yaml/Exception/DumpException.php | 2 ++ Mage/Yaml/Exception/ParseException.php | 2 ++ Mage/Yaml/Exception/RuntimeException.php | 2 ++ Mage/Yaml/Inline.php | 2 ++ Mage/Yaml/Parser.php | 9 +++++---- Mage/Yaml/Yaml.php | 2 ++ 9 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php index 23585c9..79a2e87 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\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract; use Mage\Task\Releases\IsReleaseAware; /** diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php index 7c74113..eae35bb 100644 --- a/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php +++ b/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php @@ -10,6 +10,7 @@ namespace Mage\Task\BuiltIn\Deployment\Strategy; +use Mage\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract; use Mage\Task\Releases\IsReleaseAware; /** diff --git a/Mage/Yaml/Dumper.php b/Mage/Yaml/Dumper.php index db542b1..fff6913 100644 --- a/Mage/Yaml/Dumper.php +++ b/Mage/Yaml/Dumper.php @@ -11,6 +11,8 @@ namespace Mage\Yaml; +use Mage\Yaml\Inline; + /** * Dumper dumps PHP variables to YAML strings. * diff --git a/Mage/Yaml/Exception/DumpException.php b/Mage/Yaml/Exception/DumpException.php index d520477..bc3581b 100644 --- a/Mage/Yaml/Exception/DumpException.php +++ b/Mage/Yaml/Exception/DumpException.php @@ -11,6 +11,8 @@ namespace Mage\Yaml\Exception; +use Mage\Yaml\Exception\RuntimeException; + /** * Exception class thrown when an error occurs during dumping. * diff --git a/Mage/Yaml/Exception/ParseException.php b/Mage/Yaml/Exception/ParseException.php index 7be46a2..d8ea2b3 100644 --- a/Mage/Yaml/Exception/ParseException.php +++ b/Mage/Yaml/Exception/ParseException.php @@ -11,6 +11,8 @@ namespace Mage\Yaml\Exception; +use Mage\Yaml\Exception\RuntimeException; + if (!defined('JSON_UNESCAPED_UNICODE')) { define('JSON_UNESCAPED_SLASHES', 64); define('JSON_UNESCAPED_UNICODE', 256); diff --git a/Mage/Yaml/Exception/RuntimeException.php b/Mage/Yaml/Exception/RuntimeException.php index 451e0c8..51245bd 100644 --- a/Mage/Yaml/Exception/RuntimeException.php +++ b/Mage/Yaml/Exception/RuntimeException.php @@ -11,6 +11,8 @@ namespace Mage\Yaml\Exception; +use Mage\Yaml\Exception\ExceptionInterface; + /** * Exception class thrown when an error occurs during parsing. * diff --git a/Mage/Yaml/Inline.php b/Mage/Yaml/Inline.php index 67bf093..1a46d7d 100644 --- a/Mage/Yaml/Inline.php +++ b/Mage/Yaml/Inline.php @@ -11,6 +11,8 @@ namespace Mage\Yaml; +use Mage\Yaml\Escaper; +use Mage\Yaml\Unescaper; use Mage\Yaml\Exception\ParseException; use Mage\Yaml\Exception\DumpException; diff --git a/Mage/Yaml/Parser.php b/Mage/Yaml/Parser.php index aa9cbc5..c5e1fb8 100644 --- a/Mage/Yaml/Parser.php +++ b/Mage/Yaml/Parser.php @@ -11,6 +11,7 @@ namespace Mage\Yaml; +use Mage\Yaml\Inline; use Mage\Yaml\Exception\ParseException; /** @@ -92,7 +93,7 @@ class Parser // array if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { $c = $this->getRealCurrentLineNb() + 1; - $parser = new Parser($c); + $parser = new self($c); $parser->refs =& $this->refs; $data[] = $parser->parse($this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap); } else { @@ -102,7 +103,7 @@ class Parser ) { // this is a compact notation element, add to next block and parse $c = $this->getRealCurrentLineNb(); - $parser = new Parser($c); + $parser = new self($c); $parser->refs =& $this->refs; $block = $values['value']; @@ -145,7 +146,7 @@ class Parser $value = $this->getNextEmbedBlock(); } $c = $this->getRealCurrentLineNb() + 1; - $parser = new Parser($c); + $parser = new self($c); $parser->refs =& $this->refs; $parsed = $parser->parse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap); @@ -187,7 +188,7 @@ class Parser } } else { $c = $this->getRealCurrentLineNb() + 1; - $parser = new Parser($c); + $parser = new self($c); $parser->refs =& $this->refs; $value = $parser->parse($this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap); // Spec: Keys MUST be unique; first one wins. diff --git a/Mage/Yaml/Yaml.php b/Mage/Yaml/Yaml.php index 201cfc8..25944a4 100644 --- a/Mage/Yaml/Yaml.php +++ b/Mage/Yaml/Yaml.php @@ -11,6 +11,8 @@ namespace Mage\Yaml; +use Mage\Yaml\Parser; +use Mage\Yaml\Dumper; use Mage\Yaml\Exception\ParseException; /**