Skip to content

Commit

Permalink
* ArrayDumper doesn't extend BaseDumper anymore (hence no conflict o…
Browse files Browse the repository at this point in the history
…n the interface)

 * move keys from BaseDumper back to ArrayDumper
 * interface now declares dump() to always return void
  • Loading branch information
till committed Jun 26, 2012
1 parent d244f87 commit a1d287c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
27 changes: 24 additions & 3 deletions src/Composer/Package/Dumper/ArrayDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,38 @@

namespace Composer\Package\Dumper;

use Composer\Package\Dumper\BaseDumper;
use Composer\Package\Dumper\DumperInterface;
use Composer\Package\BasePackage;
use Composer\Package\PackageInterface;

/**
* @author Konstantin Kudryashiv <ever.zet@gmail.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class ArrayDumper extends BaseDumper
class ArrayDumper
{
/**
* @var array
*/
protected static $keys = array(
'binaries' => 'bin',
'scripts',
'type',
'extra',
'installationSource' => 'installation-source',
'license',
'authors',
'description',
'homepage',
'keywords',
'autoload',
'repositories',
'includePaths' => 'include-path',
'support',
);

/**
* @return array
*/
public function dump(PackageInterface $package)
{
$data = array();
Expand Down
20 changes: 0 additions & 20 deletions src/Composer/Package/Dumper/BaseDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,6 @@ abstract class BaseDumper implements DumperInterface
*/
protected $format = '';

/**
* @var array
*/
protected static $keys = array(
'binaries' => 'bin',
'scripts',
'type',
'extra',
'installationSource' => 'installation-source',
'license',
'authors',
'description',
'homepage',
'keywords',
'autoload',
'repositories',
'includePaths' => 'include-path',
'support',
);

/**
* Path to where to dump the export to.
* @var mixed|null
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/Package/Dumper/DumperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface DumperInterface
*
* @param PackageInterface $package
*
* @return mixed
* @return void
*/
public function dump(PackageInterface $package);
}

0 comments on commit a1d287c

Please sign in to comment.