s/CliArgs/Cli\Args/g
authorMichael Wallner <mike@php.net>
Thu, 3 Sep 2015 10:51:49 +0000 (12:51 +0200)
committerMichael Wallner <mike@php.net>
Thu, 3 Sep 2015 10:51:49 +0000 (12:51 +0200)
src/pharext/Cli/Args.php
src/pharext/Cli/Command.php
src/pharext/Command.php
src/pharext/Installer.php
src/pharext/Packager.php

index 2c148bf2ba7ef6dcc8bd06e4f7063b82534530b0..c248a74dcc964c81c089d1b2204a8cacfe3dcfb0 100644 (file)
@@ -79,7 +79,7 @@ class Args implements \ArrayAccess
        /**
         * Compile the original spec
         * @param array|Traversable $spec
-        * @return pharext\CliArgs self
+        * @return pharext\Cli\Args self
         */
        public function compile($spec) {
                foreach ($spec as $arg) {
@@ -118,7 +118,7 @@ class Args implements \ArrayAccess
         *
         * The Generator yields any parsing errors.
         * Parsing will stop when all arguments are processed or the first option
-        * flagged CliArgs::HALT was encountered.
+        * flagged Cli\Args::HALT was encountered.
         *
         * @param int $argc
         * @param array $argv
index e8d0ee02608f15710a213e9176fed58a0748a81f..01c50c4f3feb1393a45d1979250e138738804956 100644 (file)
@@ -3,7 +3,6 @@
 namespace pharext\Cli;
 
 use pharext\Archive;
-use pharext\Cli\Args as CliArgs;
 
 use Phar;
 
@@ -11,7 +10,7 @@ trait Command
 {
        /**
         * Command line arguments
-        * @var pharext\CliArgs
+        * @var pharext\Cli\Args
         */
        private $args;
        
index 7664a35867e568f20ea812a7750f88fba0ac0c42..0d30b552eadf2416a02d804ea62926f7d704ce0f 100644 (file)
@@ -30,7 +30,7 @@ interface Command
        
        /**
         * Retrieve command line arguments
-        * @return pharext\CliArgs
+        * @return pharext\Cli\Args
         */
        public function getArgs();
        
index b5dba6d9e0565f4e70bbab6422f308aee878aa67..4b9f87a674766d7a0a7d4e303e79962b52700ec1 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace pharext;
 
-use pharext\Cli\Args as CliArgs;
 use pharext\Cli\Command as CliCommand;
 
 use Phar;
@@ -25,37 +24,37 @@ class Installer implements Command
         * Create the command
         */
        public function __construct() {
-               $this->args = new CliArgs([
+               $this->args = new Cli\Args([
                        ["h", "help", "Display help",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                        ["v", "verbose", "More output",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
                        ["q", "quiet", "Less output",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
                        ["p", "prefix", "PHP installation prefix if phpize is not in \$PATH, e.g. /opt/php7",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG],
                        ["n", "common-name", "PHP common program name, e.g. php5 or zts-php",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG,
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG,
                                "php"],
                        ["c", "configure", "Additional extension configure flags, e.g. -c --with-flag",
-                               CliArgs::OPTIONAL|CliArgs::MULTI|CliArgs::REQARG],
+                               Cli\Args::OPTIONAL|Cli\Args::MULTI|Cli\Args::REQARG],
                        ["s", "sudo", "Installation might need increased privileges",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::OPTARG,
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::OPTARG,
                                "sudo -S %s"],
                        ["i", "ini", "Activate in this php.ini instead of loaded default php.ini",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG],
                        [null, "signature", "Show package signature",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                        [null, "license", "Show package license",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                        [null, "name", "Show package name",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                        [null, "date", "Show package release date",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                        [null, "release", "Show package release version",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                        [null, "version", "Show pharext version",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                ]);
        }
 
index 10542e489a74611366a2033e9e0600e8afad71fa..c648d8af2795a82330c959865294c6678aa60e64 100644 (file)
@@ -3,7 +3,6 @@
 namespace pharext;
 
 use Phar;
-use pharext\Cli\Args as CliArgs;
 use pharext\Cli\Command as CliCommand;
 use pharext\Exception;
 
@@ -30,42 +29,42 @@ class Packager implements Command
         * Create the command
         */
        public function __construct() {
-               $this->args = new CliArgs([
+               $this->args = new Cli\Args([
                        ["h", "help", "Display this help",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                        ["v", "verbose", "More output",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
                        ["q", "quiet", "Less output",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
                        ["n", "name", "Extension name",
-                               CliArgs::REQUIRED|CliArgs::SINGLE|CliArgs::REQARG],
+                               Cli\Args::REQUIRED|Cli\Args::SINGLE|Cli\Args::REQARG],
                        ["r", "release", "Extension release version",
-                               CliArgs::REQUIRED|CliArgs::SINGLE|CliArgs::REQARG],
+                               Cli\Args::REQUIRED|Cli\Args::SINGLE|Cli\Args::REQARG],
                        ["s", "source", "Extension source directory",
-                               CliArgs::REQUIRED|CliArgs::SINGLE|CliArgs::REQARG],
+                               Cli\Args::REQUIRED|Cli\Args::SINGLE|Cli\Args::REQARG],
                        ["g", "git", "Use `git ls-tree` to determine file list",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
                        ["b", "branch", "Checkout this tag/branch",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG],
                        ["p", "pecl", "Use PECL package.xml to determine file list, name and release",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
                        ["d", "dest", "Destination directory",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG,
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG,
                                "."],
                        ["z", "gzip", "Create additional PHAR compressed with gzip",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
                        ["Z", "bzip", "Create additional PHAR compressed with bzip",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
                        ["S", "sign", "Sign the PHAR with a private key",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG],
                        ["E", "zend", "Mark as Zend Extension",
-                               CliArgs::OPTIONAL|CliARgs::SINGLE|CliArgs::NOARG],
+                               Cli\Args::OPTIONAL|CliARgs::SINGLE|Cli\Args::NOARG],
                        [null, "signature", "Show pharext signature",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                        [null, "license", "Show pharext license",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                        [null, "version", "Show pharext version",
-                               CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+                               Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
                ]);
        }
        
@@ -107,8 +106,8 @@ class Packager implements Command
                }
 
                try {
-                       /* source needs to be evaluated before CliArgs validation, 
-                        * so e.g. name and version can be overriden and CliArgs 
+                       /* source needs to be evaluated before Cli\Args validation, 
+                        * so e.g. name and version can be overriden and Cli\Args 
                         * does not complain about missing arguments
                         */
                        $this->loadSource();