Skip to content

Commit

Permalink
Renaming.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Sep 23, 2019
1 parent 3dd5d4a commit d1777a8
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions src/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use drupol\collection\Contract\Base as BaseInterface;
use drupol\collection\Contract\Operation;
use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;
use drupol\collection\Iterator\ClosureIterator;
use drupol\collection\Transformation\Run;
use drupol\collection\Transformation\Transform;
Expand Down Expand Up @@ -97,7 +97,7 @@ public function run(Operation ...$operations)
/**
* {@inheritdoc}
*/
public function transform(Transformer ...$transformers)
public function transform(Transformation ...$transformers)
{
return (new Transform(...$transformers))->on($this);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Contract/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Interface Operation.
*/
interface Operation extends Transformer
interface Operation extends Transformation
{
/**
* @param iterable $collection
Expand Down
4 changes: 2 additions & 2 deletions src/Contract/Transformable.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
interface Transformable
{
/**
* @param \drupol\collection\Contract\Transformer ...$transformers
* @param \drupol\collection\Contract\Transformation ...$transformers
*
* @return bool|int|mixed|string
*/
public function transform(Transformer ...$transformers);
public function transform(Transformation ...$transformers);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace drupol\collection\Contract;

/**
* Interface Transformer.
* Interface Transformation.
*/
interface Transformer
interface Transformation
{
/**
* @param iterable $collection
Expand Down
4 changes: 2 additions & 2 deletions src/Transformation/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace drupol\collection\Transformation;

use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;

/**
* Class All.
*/
final class All implements Transformer
final class All implements Transformation
{
/**
* {@inheritdoc}
Expand Down
4 changes: 2 additions & 2 deletions src/Transformation/Contains.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace drupol\collection\Transformation;

use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;

/**
* Class Contains.
*/
final class Contains implements Transformer
final class Contains implements Transformation
{
/**
* @var mixed
Expand Down
4 changes: 2 additions & 2 deletions src/Transformation/Count.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

namespace drupol\collection\Transformation;

use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;
use drupol\collection\Iterator\ClosureIterator;

/**
* Class Count.
*
* Be careful, this will only work with finite collection sets.
*/
final class Count implements Transformer
final class Count implements Transformation
{
/**
* {@inheritdoc}
Expand Down
4 changes: 2 additions & 2 deletions src/Transformation/First.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace drupol\collection\Transformation;

use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;

/**
* Class First.
*/
final class First implements Transformer
final class First implements Transformation
{
/**
* @var null|callable
Expand Down
4 changes: 2 additions & 2 deletions src/Transformation/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace drupol\collection\Transformation;

use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;

/**
* Class Get.
*/
final class Get implements Transformer
final class Get implements Transformation
{
/**
* @var mixed
Expand Down
4 changes: 2 additions & 2 deletions src/Transformation/Implode.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace drupol\collection\Transformation;

use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;

/**
* Class Implode.
*/
final class Implode implements Transformer
final class Implode implements Transformation
{
/**
* @var string
Expand Down
4 changes: 2 additions & 2 deletions src/Transformation/Last.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

namespace drupol\collection\Transformation;

use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;
use drupol\collection\Iterator\ClosureIterator;

/**
* Class Last.
*
* Be careful, this will only work with finite collection sets.
*/
final class Last implements Transformer
final class Last implements Transformation
{
/**
* {@inheritdoc}
Expand Down
4 changes: 2 additions & 2 deletions src/Transformation/Reduce.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace drupol\collection\Transformation;

use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;

/**
* Class Reduce.
*/
final class Reduce implements Transformer
final class Reduce implements Transformation
{
/**
* @var callable
Expand Down
4 changes: 2 additions & 2 deletions src/Transformation/Run.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
namespace drupol\collection\Transformation;

use drupol\collection\Contract\Operation as OperationInterface;
use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;
use drupol\collection\Iterator\ClosureIterator;

/**
* Class Run.
*/
final class Run implements Transformer
final class Run implements Transformation
{
/**
* @var \drupol\collection\Contract\Operation[]
Expand Down
14 changes: 7 additions & 7 deletions src/Transformation/Transform.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@

namespace drupol\collection\Transformation;

use drupol\collection\Contract\Transformer;
use drupol\collection\Contract\Transformation;

/**
* Class Transform.
*/
final class Transform implements Transformer
final class Transform implements Transformation
{
/**
* @var \drupol\collection\Contract\Transformer[]
* @var \drupol\collection\Contract\Transformation[]
*/
private $transformers;

/**
* Run constructor.
*
* @param \drupol\collection\Contract\Transformer ...$transformers
* @param \drupol\collection\Contract\Transformation ...$transformers
*/
public function __construct(Transformer ...$transformers)
public function __construct(Transformation ...$transformers)
{
$this->transformers = $transformers;
}
Expand All @@ -39,12 +39,12 @@ public function on(iterable $collection)
*
* @param iterable $collection
* The collection.
* @param \drupol\collection\Contract\Transformer $transformer
* @param \drupol\collection\Contract\Transformation $transformer
*
* @return mixed
* The operation result.
*/
private function doRun(iterable $collection, Transformer $transformer)
private function doRun(iterable $collection, Transformation $transformer)
{
return $transformer->on($collection);
}
Expand Down

0 comments on commit d1777a8

Please sign in to comment.