Skip to content

Commit

Permalink
* remove debug code
Browse files Browse the repository at this point in the history
 * force array type (Commands::pear2skeleton)
 * don't inject $args (since it's not necessary used)
  • Loading branch information
till committed Jul 13, 2011
1 parent dab0001 commit 5caf7f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
8 changes: 3 additions & 5 deletions src/Pyrus/Developer/PackageFile/Commands.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ function runTests($frontend, $args, $options)
/**
* Create the PEAR2 skeleton
*
* @param mixed $frontend
* @param mixed $frontend \Pyrus\ScriptFrontend\Commands
* @param array $args
* @param array $options
*
Expand All @@ -444,17 +444,15 @@ function runTests($frontend, $args, $options)
* @uses Pyrus\Developer\PackageFile\Commands\PEAR2Skeleton
* @uses self::makePackageXml()
*/
public function pear2Skeleton($frontend, $args, $options)
public function pear2Skeleton($frontend, array $args, array $options)
{
if (!isset($args['channel'])) {
$args['channel'] = 'pear2.php.net';
}

$info = $this->parsePackageName($args['package'], $args['channel']);
var_dump($frontend, $info, $args);
exit;

$skeleton = new Commands\PEAR2Skeleton($args, $info);
$skeleton = new Commands\PEAR2Skeleton($info);
$skeleton->generate();

$options['stub'] = $skeleton->getStub();
Expand Down
9 changes: 1 addition & 8 deletions src/Pyrus/Developer/PackageFile/Commands/PEAR2Skeleton.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
*/
class PEAR2Skeleton
{
/**
* @var array $args
*/
protected $args;

/**
* @var array $info
*/
Expand Down Expand Up @@ -51,15 +46,14 @@ class PEAR2Skeleton
/**
* __construct
*
* @param array $args
* @param array $info
* @param string $format
*
* @return $this
* @throws \Pyrus\Developer\Creator\Exception When the path of the package does
* not exist.
*/
public function __construct(array $args, array $info, $format = 'simple')
public function __construct(array $info, $format = 'simple')
{
if (file_exists($info['path'])) {
throw new \Pyrus\Developer\Creator\Exception(
Expand All @@ -73,7 +67,6 @@ public function __construct(array $args, array $info, $format = 'simple')
);
}

$this->args = $args;
$this->info = $info;

$this->templatePath = __DIR__ . '/templates';
Expand Down

0 comments on commit 5caf7f0

Please sign in to comment.