From: Marcus Boerger Date: Thu, 10 May 2007 23:22:24 +0000 (+0000) Subject: - WS X-Git-Tag: RELEASE_1_2_0~106 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b6a6e3f5f4d19bc2fac4d079f0a16baf25d5bdb;p=php - WS --- diff --git a/ext/phar/phar.php b/ext/phar/phar.php index e06e0f48af..b30193f78e 100644 --- a/ext/phar/phar.php +++ b/ext/phar/phar.php @@ -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 << [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; diff --git a/ext/phar/phar/clicommand.inc b/ext/phar/phar/clicommand.inc index 73ac8db031..9aa132cb2e 100755 --- a/ext/phar/phar/clicommand.inc +++ b/ext/phar/phar/clicommand.inc @@ -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')); diff --git a/ext/phar/phar/pharcommand.inc b/ext/phar/phar/pharcommand.inc index 638b2b431b..91d9729ed5 100755 --- a/ext/phar/phar/pharcommand.inc +++ b/ext/phar/phar/pharcommand.inc @@ -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;