Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Uses /usr/bin/env to check for the correct php interpreter. Replaced …

…'t' (should be \t ?) by a logic based on the longest line.
  • Loading branch information...
commit 4c5115a50bf3381c81483233e86db515e835a2e2 1 parent 4d17b83
@ecolinet ecolinet authored
Showing with 6 additions and 3 deletions.
  1. +4 −1 lib/cli/Flag.php
  2. +2 −2 wsdl2php
View
5 lib/cli/Flag.php
@@ -55,6 +55,8 @@ public function __construct($name, $description, $isBool = false)
$this->isBool = $isBool;
$this->aliases = array();
$this->maxNumAliases = 4;
+ // Based on the longest one : "-c, --classes, --classNames, --classList"
+ $this->maxLength = 41; // TODO : must be computed
}
/**
@@ -63,7 +65,8 @@ public function __construct($name, $description, $isBool = false)
*/
public function __toString()
{
- return implode(', ', array_merge(array($this->name), $this->aliases)).str_pad('', $this->maxNumAliases - count($this->aliases), "t").$this->description.PHP_EOL;
+ $aliasesString = implode(', ', array_merge(array($this->name), $this->aliases));
+ return $aliasesString . str_repeat(' ', 42-strlen($aliasesString)).$this->description.PHP_EOL;
}
/**
View
4 wsdl2php
@@ -1,4 +1,4 @@
-#!/usr/bin/php
+#!/usr/bin/env php
<?php
-require_once dirname(__FILE__).'/generate.php';
+require_once dirname(__FILE__).'/generate.php';
Please sign in to comment.
Something went wrong with that request. Please try again.