]> granicus.if.org Git - php/commitdiff
- WS
authorMarcus Boerger <helly@php.net>
Thu, 10 May 2007 23:22:24 +0000 (23:22 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 10 May 2007 23:22:24 +0000 (23:22 +0000)
ext/phar/phar.php
ext/phar/phar/clicommand.inc
ext/phar/phar/pharcommand.inc

index e06e0f48af30a232705516c61073c5ab708bb4a0..b30193f78eee14dfa3b9b44add70de5fd5bdd83e 100644 (file)
@@ -220,7 +220,7 @@ if (!class_exists('CLICommand'))
                {
                        return (bool)$arg;
                }
-       
+
                static function cli_arg_typ_select($arg, $cfg)
                {
                        if (!in_array($arg, array_keys($cfg['select'])))
@@ -241,7 +241,7 @@ if (!class_exists('CLICommand'))
                        }
                        return $f;
                }
-       
+
                static function cli_arg_typ_file($arg)
                {
                        $f = realpath($arg);
@@ -252,7 +252,7 @@ if (!class_exists('CLICommand'))
                        }
                        return $f;
                }
-       
+
                static function cli_arg_typ_filenew($arg)
                {
                        $d = dirname($arg);
@@ -279,11 +279,11 @@ if (!class_exists('CLICommand'))
                {
                        return "This help.";
                }
-       
+
                function cli_cmd_run_help()
                {
                        $argv = $this->argv;
-       
+
                        echo <<<EOF
 $argv[0] <command> [options]
 
@@ -445,7 +445,7 @@ class PharCommand extends CLICommand
                $phar  = new Phar($archive, 0, $alias);
 
                $phar->startBuffering();
-               
+
                if (isset($stub))
                {
                        $phar->setStub(file_get_contents($stub));
@@ -474,7 +474,7 @@ class PharCommand extends CLICommand
                        break;
                case 'bz2':
                case 'bzip2':
-                       $phar->compressAllFilesBZIP2();         
+                       $phar->compressAllFilesBZIP2();
                        break;
                default:
                        break;
index 73ac8db03149b97a1903e26a6da284cc169a4d14..9aa132cb2e121555bd5fb5011765ab4038eb878d 100755 (executable)
@@ -28,7 +28,7 @@ abstract class CLICommand
                $this->argv = $argv;
                $this->cmds = self::getCommands($this);
                $this->typs = self::getArgTyps($this);
-               
+
                if ($argc < 2)
                {
                        echo "No command given, check ${argv[0]} help\n";
@@ -123,7 +123,7 @@ abstract class CLICommand
                                exit(1);
                        }
                }
-               
+
                call_user_func(array($this, $this->cmds[$command]['run']), $this->args);
        }
 
@@ -132,7 +132,7 @@ abstract class CLICommand
                $a = array();
                $r = new ReflectionClass($cmdclass);
                $l = strlen($prefix);
-               
+
                foreach($r->getMethods() as $m)
                {
                        if (substr($m->name, 0, $l) == $prefix)
@@ -159,7 +159,7 @@ abstract class CLICommand
        {
                return self::getSubFuncs($cmdclass, 'cli_cmd_', array('arg','inf','run'));
        }
-       
+
        static function getArgTyps(CLICommand $cmdclass)
        {
                return self::getSubFuncs($cmdclass, 'cli_arg_', array('typ'));
index 638b2b431b3849ec763154dbff0bf5cce3bc55d6..91d9729ed5754327b326967bcf908b5d82ca0f91 100755 (executable)
@@ -119,7 +119,7 @@ class PharCommand extends CLICommand
                $phar  = new Phar($archive, 0, $alias);
 
                $phar->startBuffering();
-               
+
                if (isset($stub))
                {
                        $phar->setStub(file_get_contents($stub));
@@ -148,7 +148,7 @@ class PharCommand extends CLICommand
                        break;
                case 'bz2':
                case 'bzip2':
-                       $phar->compressAllFilesBZIP2();         
+                       $phar->compressAllFilesBZIP2();
                        break;
                default:
                        break;