-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes Reserved Iterable name to IterableType (#3)
- Loading branch information
1 parent
771f8eb
commit c05d9c2
Showing
7 changed files
with
42 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,6 @@ | |
} | ||
}, | ||
"require": { | ||
"lstrojny/phpunit-function-mocker": "0.2.*" | ||
"lstrojny/phpunit-function-mocker": "0.4.*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
* @author Eduardo Trujillo <[email protected]> | ||
* @package SellerLabs\Nucleus\Data | ||
*/ | ||
abstract class Collection extends Iterable | ||
abstract class Collection extends IterableType | ||
{ | ||
// | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,12 @@ | |
use SellerLabs\Nucleus\Meditation\Constraints\AbstractTypeConstraint; | ||
|
||
/** | ||
* Class Iterable. | ||
* Class IterableType. | ||
* | ||
* @author Eduardo Trujillo <[email protected]> | ||
* @package SellerLabs\Nucleus\Data | ||
*/ | ||
abstract class Iterable extends BaseObject implements | ||
abstract class IterableType extends BaseObject implements | ||
ArrayableInterface, | ||
FunctorInterface, | ||
FoldableInterface, | ||
|
@@ -82,14 +82,14 @@ public function last() | |
} | ||
|
||
/** | ||
* @param array|Iterable $searchKeyPath | ||
* @param array|IterableType $searchKeyPath | ||
* | ||
* @return Maybe | ||
*/ | ||
abstract public function lookupIn($searchKeyPath); | ||
|
||
/** | ||
* @param array|Iterable $searchKeyPath | ||
* @param array|IterableType $searchKeyPath | ||
* | ||
* @return mixed | ||
*/ | ||
|
@@ -103,14 +103,14 @@ abstract public function toArray(); | |
/** | ||
* @param callable $callable | ||
* | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
abstract public function fmap(callable $callable); | ||
|
||
/** | ||
* @param callable $callable | ||
* | ||
* @return static|Iterable | ||
* @return static|IterableType | ||
*/ | ||
public function map(callable $callable) | ||
{ | ||
|
@@ -120,14 +120,14 @@ public function map(callable $callable) | |
/** | ||
* @param callable $callable | ||
* | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
abstract public function filter(callable $callable); | ||
|
||
/** | ||
* @param callable $callable | ||
* | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
public function filterNot(callable $callable) | ||
{ | ||
|
@@ -139,22 +139,22 @@ function ($value, $key, $iterable) use ($callable) { | |
} | ||
|
||
/** | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
abstract public function reverse(); | ||
|
||
/** | ||
* @param callable $comparator | ||
* | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
abstract public function sort(callable $comparator = null); | ||
|
||
/** | ||
* @param callable $comparatorValueMapper | ||
* @param callable|null $comparator | ||
* | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
public function sortBy( | ||
callable $comparatorValueMapper, | ||
|
@@ -174,20 +174,20 @@ abstract public function each(callable $sideEffect); | |
* @param int $begin | ||
* @param int|null $end | ||
* | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
abstract public function slice($begin, $end = null); | ||
|
||
/** | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
public function tail() | ||
{ | ||
return $this->slice(1); | ||
} | ||
|
||
/** | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
public function init() | ||
{ | ||
|
@@ -197,7 +197,7 @@ public function init() | |
/** | ||
* @param int $amount | ||
* | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
public function take($amount) | ||
{ | ||
|
@@ -212,7 +212,7 @@ public function take($amount) | |
/** | ||
* @param int $amount | ||
* | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
public function takeLast($amount) | ||
{ | ||
|
@@ -222,14 +222,14 @@ public function takeLast($amount) | |
/** | ||
* @param callable $predicate | ||
* | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
abstract public function takeWhile(callable $predicate); | ||
|
||
/** | ||
* @param callable $predicate | ||
* | ||
* @return Iterable | ||
* @return IterableType | ||
*/ | ||
public function takeUntil(callable $predicate) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters