From 08a5e0b552f81c72e49e1139a044ebc347416a3e Mon Sep 17 00:00:00 2001 From: Julien Rosset Date: Wed, 1 Sep 2021 19:26:53 +0200 Subject: [PATCH] =?UTF-8?q?D=C3=A9placement=20vers=20namespace=20global=20?= =?UTF-8?q?"jrosset"=20+=20support=20PHP=208?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 27 +++++++++++-------- Tests/test.php | 12 ++++----- composer.json | 6 ++--- composer.lock | 6 ++--- src/CommandLine/Argument/ArgumentAbstract.php | 2 +- src/CommandLine/Argument/IArgument.php | 4 +-- .../Argument/IArgumentValueDescription.php | 2 +- src/CommandLine/Argument/Option/Flag.php | 8 +++--- .../Argument/Option/FlagWithReverse.php | 2 +- .../Argument/Option/IArgumentOption.php | 4 +-- .../Option/IArgumentOptionSecondary.php | 2 +- .../Argument/Option/OptionAbstract.php | 4 +-- src/CommandLine/Argument/Option/Value.php | 10 +++---- src/CommandLine/Argument/ParseResult.php | 2 +- .../Argument/Parser/BooleanParser.php | 2 +- .../Argument/Parser/DecimalParser.php | 2 +- .../Argument/Parser/EnumParser.php | 2 +- .../Argument/Parser/IValueParser.php | 2 +- .../Argument/Parser/IntegerParser.php | 2 +- .../Argument/Parser/PathParser.php | 8 +++--- .../Argument/Parser/RegexParser.php | 2 +- .../Argument/Parser/StringParser.php | 2 +- .../Argument/Parser/stdStringClass.php | 2 +- src/CommandLine/Argument/Value/FixedValue.php | 6 ++--- .../Argument/Value/IArgumentValue.php | 4 +-- src/CommandLine/Argument/Value/Value.php | 10 +++---- .../Argument/Value/ValueAbstract.php | 4 +-- src/CommandLine/CommandLine.php | 24 ++++++++--------- src/CommandLine/Exception/IException.php | 5 ++-- src/CommandLine/Exception/IncorrectParse.php | 4 +-- src/CommandLine/Exception/MissingArgument.php | 4 +-- src/CommandLine/Exception/TooMuchValues.php | 5 ++-- 32 files changed, 95 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index 848bdd6..68ff96f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # PHPCommandLine + __Command line management library in PHP (CLI)__ ![last release](https://badgen.net/packagist/v/darkelfe14728/commandline?label=Last%20release) @@ -8,28 +9,32 @@ __Command line management library in PHP (CLI)__ A command-line options parser with configurable expects and help auto generation. There is two kind of arguments : - - options (short/long tag) : _-h_ or _--version_ - - values : my/path/to/a/file - + +- options (short/long tag) : _-h_ or _--version_ +- values : my/path/to/a/file + ## Installation + ``` -composer require darkelfe14728/commandline +composer require jrosset/commandline ``` ## Description -At first, create a new CommandLine with program name and description. Add options and values by using respectively _addOption_ and _addValue_. -Default options for help (-h / --help) and version (--version) can be add with _addDefaultArguments_ and use _treatDefaultArguments_ for launching associated treatments. + +At first, create a new CommandLine with program name and description. Add options and values by using respectively _addOption_ and _addValue_. Default options for help (-h / +--help) and version (--version) can be add with _addDefaultArguments_ and use _treatDefaultArguments_ for launching associated treatments. Treat script arguments with _parse_ : return an object of variables. -## Example +## Example + ```php addDefaultArguments(); diff --git a/Tests/test.php b/Tests/test.php index f385de0..20c8a28 100644 --- a/Tests/test.php +++ b/Tests/test.php @@ -2,18 +2,18 @@ require_once '../vendor/autoload.php'; -use CommandLine\Argument\Option\Flag; -use CommandLine\Argument\Option\Value; -use CommandLine\Argument\Parser\IntegerParser; -use CommandLine\Argument\Parser\PathParser; -use CommandLine\CommandLine; +use jrosset\CommandLine\Argument\Option\Flag; +use jrosset\CommandLine\Argument\Option\Value; +use jrosset\CommandLine\Argument\Parser\IntegerParser; +use jrosset\CommandLine\Argument\Parser\PathParser; +use jrosset\CommandLine\CommandLine; $cmdline = new CommandLine('Test', 'Programme de test', 'php test.php'); $cmdline->addDefaultArguments(); $cmdline->addOption(new Flag('array_form', false, 'Sous la forme d\'un tableau ?' . "\n" . 'Ou pas')); $cmdline->addOption((new Value('days', 'Nombre jour', new IntegerParser(0, 365)))->setDefault(3)); $cmdline->addOption((new Value('years', 'Nombre d\'années', new IntegerParser(0)))->setDefault(5)); -$cmdline->addValue((new \CommandLine\Argument\Value\Value('path', 'Chemin sauvegarde images', new PathParser(), true))); +$cmdline->addValue((new \jrosset\CommandLine\Argument\Value\Value('path', 'Chemin sauvegarde images', new PathParser(), true))); $cmdline->addExitCode(0, 'OK'); $cmdline->addExitCode(255, 'Unexpected error' . "\n" . 'Unknown error'); diff --git a/composer.json b/composer.json index ad89219..ee983ad 100644 --- a/composer.json +++ b/composer.json @@ -1,15 +1,15 @@ { - "name": "darkelfe14728/commandline", + "name": "jrosset/commandline", "description": "Command line management library (CLI)", "keywords": [ "cli", "parser" ], "minimum-stability": "dev", "require": { - "php": "^5.6 || ^7.0" + "php": ">= 7.2" }, "autoload": { "psr-4": { - "CommandLine\\": "src/CommandLine/" + "jrosset\\": "src/" }, "exclude-from-classmap": [ "Tests/" ] }, diff --git a/composer.lock b/composer.lock index c048861..0339fff 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "879579c4f4d897535fbe43c7d1a38fc1", + "content-hash": "c4ba533c1f0324fb3d0f3a361f9b5cf8", "packages": [ ], "packages-dev": [ ], "aliases": [ ], @@ -13,8 +13,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^5.6 || ^7.0" + "php": ">= 7.2" }, "platform-dev": [ ], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.1.0" } diff --git a/src/CommandLine/Argument/ArgumentAbstract.php b/src/CommandLine/Argument/ArgumentAbstract.php index ef9b6a7..d98289f 100644 --- a/src/CommandLine/Argument/ArgumentAbstract.php +++ b/src/CommandLine/Argument/ArgumentAbstract.php @@ -3,7 +3,7 @@ /** * Déclaration de la classe CommandLine\Argument\AbstractArgument. */ -namespace CommandLine\Argument; +namespace jrosset\CommandLine\Argument; /** * Classe abstraite pour n'importe quel type de paramètre diff --git a/src/CommandLine/Argument/IArgument.php b/src/CommandLine/Argument/IArgument.php index 4c5f164..8db0b7e 100644 --- a/src/CommandLine/Argument/IArgument.php +++ b/src/CommandLine/Argument/IArgument.php @@ -2,9 +2,9 @@ /** * Déclaration de l'interface CommandLine\Argument\IArgument */ -namespace CommandLine\Argument; +namespace jrosset\CommandLine\Argument; -use CommandLine\Exception\IncorrectParse; +use jrosset\CommandLine\Exception\IncorrectParse; /** * Interface que tout argument doit implémenter diff --git a/src/CommandLine/Argument/IArgumentValueDescription.php b/src/CommandLine/Argument/IArgumentValueDescription.php index bfe303b..fb7743a 100644 --- a/src/CommandLine/Argument/IArgumentValueDescription.php +++ b/src/CommandLine/Argument/IArgumentValueDescription.php @@ -2,7 +2,7 @@ /** * Déclaration de l'interface CommandLine\Argument\IArgumentValueDescription */ -namespace CommandLine\Argument; +namespace jrosset\CommandLine\Argument; /** * Interface à implementer par les arguments qui souhaitent détailler la valeur attendue diff --git a/src/CommandLine/Argument/Option/Flag.php b/src/CommandLine/Argument/Option/Flag.php index 739c0d0..00c21a7 100644 --- a/src/CommandLine/Argument/Option/Flag.php +++ b/src/CommandLine/Argument/Option/Flag.php @@ -2,19 +2,19 @@ /** * Déclare la classe CommandLine\Argument\Option\Flag. */ -namespace CommandLine\Argument\Option; +namespace jrosset\CommandLine\Argument\Option; -use CommandLine\Argument\ParseResult; use InvalidArgumentException; +use jrosset\CommandLine\Argument\ParseResult; /** * Option de type "flag" contenant True ou False * * Si fourni, retournera la valeur inverse de {@see getDefault() getDefault} * - * @see FlagReverse - * * @package CommandLine\Argument\Option + * @see FlagReverse + * */ class Flag extends OptionAbstract { /** diff --git a/src/CommandLine/Argument/Option/FlagWithReverse.php b/src/CommandLine/Argument/Option/FlagWithReverse.php index a7a2c33..d55eff4 100644 --- a/src/CommandLine/Argument/Option/FlagWithReverse.php +++ b/src/CommandLine/Argument/Option/FlagWithReverse.php @@ -2,7 +2,7 @@ /** * Déclare la classe CommandLine\Argument\Option\OptionFlagWithReverse. */ -namespace CommandLine\Argument\Option; +namespace jrosset\CommandLine\Argument\Option; /** * Option de type "flag" : vaut True ou False avec son tag inversé. diff --git a/src/CommandLine/Argument/Option/IArgumentOption.php b/src/CommandLine/Argument/Option/IArgumentOption.php index 6ca838c..58122ef 100644 --- a/src/CommandLine/Argument/Option/IArgumentOption.php +++ b/src/CommandLine/Argument/Option/IArgumentOption.php @@ -2,9 +2,9 @@ /** * Déclaration de l'interface CommandLine\Argument\Option\IArgumentOption */ -namespace CommandLine\Argument\Option; +namespace jrosset\CommandLine\Argument\Option; -use CommandLine\Argument\IArgument; +use jrosset\CommandLine\Argument\IArgument; /** * Interface à implémenter si l'argument est de type "option" diff --git a/src/CommandLine/Argument/Option/IArgumentOptionSecondary.php b/src/CommandLine/Argument/Option/IArgumentOptionSecondary.php index f2ea906..8a2d82d 100644 --- a/src/CommandLine/Argument/Option/IArgumentOptionSecondary.php +++ b/src/CommandLine/Argument/Option/IArgumentOptionSecondary.php @@ -2,7 +2,7 @@ /** * Déclaration de l'interface CommandLine\Argument\Option\IArgumentSecondary. */ -namespace CommandLine\Argument\Option; +namespace jrosset\CommandLine\Argument\Option; /** * Interface à implémenter si l'argument "option" auto-déclare d'autres arguments diff --git a/src/CommandLine/Argument/Option/OptionAbstract.php b/src/CommandLine/Argument/Option/OptionAbstract.php index 6d38802..e9b1945 100644 --- a/src/CommandLine/Argument/Option/OptionAbstract.php +++ b/src/CommandLine/Argument/Option/OptionAbstract.php @@ -2,10 +2,10 @@ /** * Déclaration de la classe CommandLine\Argument\Option\OptionAbstract. */ -namespace CommandLine\Argument\Option; +namespace jrosset\CommandLine\Argument\Option; -use CommandLine\Argument\ArgumentAbstract; use InvalidArgumentException; +use jrosset\CommandLine\Argument\ArgumentAbstract; /** * Classe abstraite pour les arguments de type "option" : --xxx / -x diff --git a/src/CommandLine/Argument/Option/Value.php b/src/CommandLine/Argument/Option/Value.php index 85f4d7a..c4049e4 100644 --- a/src/CommandLine/Argument/Option/Value.php +++ b/src/CommandLine/Argument/Option/Value.php @@ -2,12 +2,12 @@ /** * Déclaration de la classe CommandLine\Argument\Option\Value */ -namespace CommandLine\Argument\Option; +namespace jrosset\CommandLine\Argument\Option; -use CommandLine\Argument\IArgumentValueDescription; -use CommandLine\Argument\Parser\IValueParser; -use CommandLine\Argument\ParseResult; -use CommandLine\Exception\IncorrectParse; +use jrosset\CommandLine\Argument\IArgumentValueDescription; +use jrosset\CommandLine\Argument\Parser\IValueParser; +use jrosset\CommandLine\Argument\ParseResult; +use jrosset\CommandLine\Exception\IncorrectParse; use RuntimeException; /** diff --git a/src/CommandLine/Argument/ParseResult.php b/src/CommandLine/Argument/ParseResult.php index b2ead83..5711e64 100644 --- a/src/CommandLine/Argument/ParseResult.php +++ b/src/CommandLine/Argument/ParseResult.php @@ -2,7 +2,7 @@ /** * Déclaration de la classe CommandLine\Argument\ParseResult. */ -namespace CommandLine\Argument; +namespace jrosset\CommandLine\Argument; /** * Résultat du parsage d'un argument diff --git a/src/CommandLine/Argument/Parser/BooleanParser.php b/src/CommandLine/Argument/Parser/BooleanParser.php index bd0990e..bf5319c 100644 --- a/src/CommandLine/Argument/Parser/BooleanParser.php +++ b/src/CommandLine/Argument/Parser/BooleanParser.php @@ -2,7 +2,7 @@ /** * Déclaration de la classe CommandLine\Argument\Parser\BooleanParser */ -namespace CommandLine\Argument\Parser; +namespace jrosset\CommandLine\Argument\Parser; use RangeException; diff --git a/src/CommandLine/Argument/Parser/DecimalParser.php b/src/CommandLine/Argument/Parser/DecimalParser.php index 2aeacdf..c4bddd5 100644 --- a/src/CommandLine/Argument/Parser/DecimalParser.php +++ b/src/CommandLine/Argument/Parser/DecimalParser.php @@ -2,7 +2,7 @@ /** * Déclaration de la classe CommandLine\Argument\Parser\DecimalParser */ -namespace CommandLine\Argument\Parser; +namespace jrosset\CommandLine\Argument\Parser; use InvalidArgumentException; use RangeException; diff --git a/src/CommandLine/Argument/Parser/EnumParser.php b/src/CommandLine/Argument/Parser/EnumParser.php index e69c3aa..4e03153 100644 --- a/src/CommandLine/Argument/Parser/EnumParser.php +++ b/src/CommandLine/Argument/Parser/EnumParser.php @@ -2,7 +2,7 @@ /** * Déclaration de la classe CommandLine\Argument\Parser\EnumParser */ -namespace CommandLine\Argument\Parser; +namespace jrosset\CommandLine\Argument\Parser; use InvalidArgumentException; use RangeException; diff --git a/src/CommandLine/Argument/Parser/IValueParser.php b/src/CommandLine/Argument/Parser/IValueParser.php index e1f8834..80b6a79 100644 --- a/src/CommandLine/Argument/Parser/IValueParser.php +++ b/src/CommandLine/Argument/Parser/IValueParser.php @@ -2,7 +2,7 @@ /** * Déclare l'interface CommandLine\Argument\Parser\IValueParser */ -namespace CommandLine\Argument\Parser; +namespace jrosset\CommandLine\Argument\Parser; /** * Interface pour les parseurs diff --git a/src/CommandLine/Argument/Parser/IntegerParser.php b/src/CommandLine/Argument/Parser/IntegerParser.php index 6ee5406..90e137a 100644 --- a/src/CommandLine/Argument/Parser/IntegerParser.php +++ b/src/CommandLine/Argument/Parser/IntegerParser.php @@ -2,7 +2,7 @@ /** * Déclaration de la classe CommandLine\Argument\Parser\IntegerParser */ -namespace CommandLine\Argument\Parser; +namespace jrosset\CommandLine\Argument\Parser; use InvalidArgumentException; use RangeException; diff --git a/src/CommandLine/Argument/Parser/PathParser.php b/src/CommandLine/Argument/Parser/PathParser.php index 89352e2..8eec701 100644 --- a/src/CommandLine/Argument/Parser/PathParser.php +++ b/src/CommandLine/Argument/Parser/PathParser.php @@ -3,7 +3,7 @@ * Déclaration de la classe CommandLine\Argument\Parser\PathParser */ -namespace CommandLine\Argument\Parser; +namespace jrosset\CommandLine\Argument\Parser; use InvalidArgumentException; use UnexpectedValueException; @@ -25,8 +25,10 @@ class PathParser implements IValueParser { * @var string[] Les expressions régulières pour identifier un chemin */ const REGEX_PATH = array( - 'unix' => /** @lang PhpRegExp */ '@^(?/*(?:[^/\n]+(?:/+[^/\n]+)*/+)?)(?(?[^/\n]+?)(?:(?:\.(?[a-zA-Z0-9_]+))|(?:/+))?)$@', - 'windows' => /** @lang PhpRegExp */ '@^(?(?:(?:(?:(?:[a-zA-Z]:)|[\\\\/])[\\\\/])|(?![\\\\/]))(?:[^<>:"/\\\\|?*]+(?:[\\\\/][^<>:"/\\\\|?*]+)*[\\\\/]+)?)(?(?[^<>:"/\\\\|?*]+?)(?:(?:\.(?[a-zA-Z0-9_]+))|(?:[\\\\/]))?)$@', + 'unix' => /** @lang PhpRegExp */ + '@^(?/*(?:[^/\n]+(?:/+[^/\n]+)*/+)?)(?(?[^/\n]+?)(?:\.(?[a-zA-Z0-9_]+)|/+)?)$@', + 'windows' => /** @lang PhpRegExp */ + '@^(?(?:(?:[a-zA-Z]:|[/])[/]|(?![\\\\/]))(?:[^<>:"/\\\\|?*]+(?:[\\\\/][^<>:"/\\\\|?*]+)*[\\\\/]+)?)(?(?[^<>:"/\\\\|?*]+?)(?:\.(?[a-zA-Z0-9_]+)|[/])?)$@', ); /** diff --git a/src/CommandLine/Argument/Parser/RegexParser.php b/src/CommandLine/Argument/Parser/RegexParser.php index e0e8a64..9fa19d3 100644 --- a/src/CommandLine/Argument/Parser/RegexParser.php +++ b/src/CommandLine/Argument/Parser/RegexParser.php @@ -2,7 +2,7 @@ /** * Déclaration de la classe CommandLine\Argument\Parser\RegexParser */ -namespace CommandLine\Argument\Parser; +namespace jrosset\CommandLine\Argument\Parser; use RangeException; diff --git a/src/CommandLine/Argument/Parser/StringParser.php b/src/CommandLine/Argument/Parser/StringParser.php index 62c16a7..5061ffb 100644 --- a/src/CommandLine/Argument/Parser/StringParser.php +++ b/src/CommandLine/Argument/Parser/StringParser.php @@ -2,7 +2,7 @@ /** * Déclaration de la classe CommandLine\Argument\Parser\StringParser */ -namespace CommandLine\Argument\Parser; +namespace jrosset\CommandLine\Argument\Parser; /** * Parseur vers une chaine de caractères diff --git a/src/CommandLine/Argument/Parser/stdStringClass.php b/src/CommandLine/Argument/Parser/stdStringClass.php index ce2511d..9cee371 100644 --- a/src/CommandLine/Argument/Parser/stdStringClass.php +++ b/src/CommandLine/Argument/Parser/stdStringClass.php @@ -2,7 +2,7 @@ /** * Déclaration de la classe CommandLine\Argument\Parser\stdStringClass */ -namespace CommandLine\Argument\Parser; +namespace jrosset\CommandLine\Argument\Parser; use stdClass; diff --git a/src/CommandLine/Argument/Value/FixedValue.php b/src/CommandLine/Argument/Value/FixedValue.php index a875481..f3cc9ba 100644 --- a/src/CommandLine/Argument/Value/FixedValue.php +++ b/src/CommandLine/Argument/Value/FixedValue.php @@ -2,10 +2,10 @@ /** * Déclaration de CommandLine\Argument\Value\FixedValue */ -namespace CommandLine\Argument\Value; +namespace jrosset\CommandLine\Argument\Value; -use CommandLine\Argument\IArgumentValueDescription; -use CommandLine\Argument\ParseResult; +use jrosset\CommandLine\Argument\IArgumentValueDescription; +use jrosset\CommandLine\Argument\ParseResult; /** * Argument devant correspondre une valeur fixe diff --git a/src/CommandLine/Argument/Value/IArgumentValue.php b/src/CommandLine/Argument/Value/IArgumentValue.php index 7ff71f6..c2faf96 100644 --- a/src/CommandLine/Argument/Value/IArgumentValue.php +++ b/src/CommandLine/Argument/Value/IArgumentValue.php @@ -2,9 +2,9 @@ /** * Déclaration de l'interface CommandLine\Argument\Option\IArgumentValue */ -namespace CommandLine\Argument\Value; +namespace jrosset\CommandLine\Argument\Value; -use CommandLine\Argument\IArgument; +use jrosset\CommandLine\Argument\IArgument; /** * Interface à implémenter si l'argument est de type "valeur" diff --git a/src/CommandLine/Argument/Value/Value.php b/src/CommandLine/Argument/Value/Value.php index 422cb26..5e7c3b2 100644 --- a/src/CommandLine/Argument/Value/Value.php +++ b/src/CommandLine/Argument/Value/Value.php @@ -2,12 +2,12 @@ /** * Déclaration de CommandLine\Argument\Value\Value */ -namespace CommandLine\Argument\Value; +namespace jrosset\CommandLine\Argument\Value; -use CommandLine\Argument\IArgumentValueDescription; -use CommandLine\Argument\Parser\IValueParser; -use CommandLine\Argument\ParseResult; -use CommandLine\Exception\IncorrectParse; +use jrosset\CommandLine\Argument\IArgumentValueDescription; +use jrosset\CommandLine\Argument\Parser\IValueParser; +use jrosset\CommandLine\Argument\ParseResult; +use jrosset\CommandLine\Exception\IncorrectParse; use RangeException; /** diff --git a/src/CommandLine/Argument/Value/ValueAbstract.php b/src/CommandLine/Argument/Value/ValueAbstract.php index bca51d7..1a3b976 100644 --- a/src/CommandLine/Argument/Value/ValueAbstract.php +++ b/src/CommandLine/Argument/Value/ValueAbstract.php @@ -4,10 +4,10 @@ * Déclaration de la classe CommandLine\Argument\Value\ValueArgument. */ -namespace CommandLine\Argument\Value; +namespace jrosset\CommandLine\Argument\Value; -use CommandLine\Argument\ArgumentAbstract; use InvalidArgumentException; +use jrosset\CommandLine\Argument\ArgumentAbstract; /** * Classe abstraite pour les paramètres de type "valeur" diff --git a/src/CommandLine/CommandLine.php b/src/CommandLine/CommandLine.php index 9af0957..d271a96 100644 --- a/src/CommandLine/CommandLine.php +++ b/src/CommandLine/CommandLine.php @@ -3,19 +3,19 @@ * Déclaration de la classe CommandLine\CommandLine */ -namespace CommandLine; - -use CommandLine\Argument\IArgument; -use CommandLine\Argument\IArgumentValueDescription; -use CommandLine\Argument\Option\IArgumentOption; -use CommandLine\Argument\Option\OptionAbstract; -use CommandLine\Argument\ParseResult; -use CommandLine\Argument\Value\IArgumentValue; -use CommandLine\Argument\Value\ValueAbstract; -use CommandLine\Exception\IncorrectParse; -use CommandLine\Exception\MissingArgument; -use CommandLine\Exception\TooMuchValues; +namespace jrosset\CommandLine; + use InvalidArgumentException; +use jrosset\CommandLine\Argument\IArgument; +use jrosset\CommandLine\Argument\IArgumentValueDescription; +use jrosset\CommandLine\Argument\Option\IArgumentOption; +use jrosset\CommandLine\Argument\Option\OptionAbstract; +use jrosset\CommandLine\Argument\ParseResult; +use jrosset\CommandLine\Argument\Value\IArgumentValue; +use jrosset\CommandLine\Argument\Value\ValueAbstract; +use jrosset\CommandLine\Exception\IncorrectParse; +use jrosset\CommandLine\Exception\MissingArgument; +use jrosset\CommandLine\Exception\TooMuchValues; use ReflectionClass; use ReflectionException; use stdClass; diff --git a/src/CommandLine/Exception/IException.php b/src/CommandLine/Exception/IException.php index c5bf6f2..3f5720f 100644 --- a/src/CommandLine/Exception/IException.php +++ b/src/CommandLine/Exception/IException.php @@ -2,11 +2,12 @@ /** * Déclaration de l'interface d'exception CommandLine\Exception\IException. */ -namespace CommandLine\Exception; +namespace jrosset\CommandLine\Exception; /** * Interface pour toutes les exceptions du module. * * @package CommandLine\Exception */ -interface IException {} \ No newline at end of file +interface IException { +} \ No newline at end of file diff --git a/src/CommandLine/Exception/IncorrectParse.php b/src/CommandLine/Exception/IncorrectParse.php index fad5d74..c2ba608 100644 --- a/src/CommandLine/Exception/IncorrectParse.php +++ b/src/CommandLine/Exception/IncorrectParse.php @@ -2,9 +2,9 @@ /** * Déclaration de l'exception CommandLine\Exception\IncorrectParse. */ -namespace CommandLine\Exception; +namespace jrosset\CommandLine\Exception; -use CommandLine\Argument\IArgument; +use jrosset\CommandLine\Argument\IArgument; use RuntimeException; /** diff --git a/src/CommandLine/Exception/MissingArgument.php b/src/CommandLine/Exception/MissingArgument.php index 9e33c00..1b5575e 100644 --- a/src/CommandLine/Exception/MissingArgument.php +++ b/src/CommandLine/Exception/MissingArgument.php @@ -2,7 +2,7 @@ /** * Déclaration de l'exception CommandLine\Exception\MissingArgument */ -namespace CommandLine\Exception; +namespace jrosset\CommandLine\Exception; use RuntimeException; @@ -11,6 +11,6 @@ use RuntimeException; * * @package CommandLine\Exception * - * @see Solution::parseExplicit() + * @see Solution::parseExplicit() */ class MissingArgument extends RuntimeException implements IException {} \ No newline at end of file diff --git a/src/CommandLine/Exception/TooMuchValues.php b/src/CommandLine/Exception/TooMuchValues.php index 1440a97..19636cf 100644 --- a/src/CommandLine/Exception/TooMuchValues.php +++ b/src/CommandLine/Exception/TooMuchValues.php @@ -2,7 +2,7 @@ /** * Déclaration de l'exception CommandLine\Exception\TooMushValues */ -namespace CommandLine\Exception; +namespace jrosset\CommandLine\Exception; use RuntimeException; @@ -11,4 +11,5 @@ use RuntimeException; * * @package CommandLine\Exception */ -class TooMuchValues extends RuntimeException implements IException {} \ No newline at end of file +class TooMuchValues extends RuntimeException implements IException { +} \ No newline at end of file