@@ -22,8 +22,8 @@ |
||
22 | 22 | private $valueMapper; |
23 | 23 | |
24 | 24 | /** |
25 | - * @param \Closure|BinaryFunctionInterface $keyMapper |
|
26 | - * @param \Closure|BinaryFunctionInterface $valueMapper |
|
25 | + * @param callable $keyMapper |
|
26 | + * @param \PeekAndPoke\Component\Psi\Functions\Unary\Mapper\IdentityMapper $valueMapper |
|
27 | 27 | */ |
28 | 28 | public function __construct($keyMapper, $valueMapper) |
29 | 29 | { |
@@ -38,13 +38,13 @@ |
||
38 | 38 | */ |
39 | 39 | public function apply(\Iterator $set) |
40 | 40 | { |
41 | - $result = []; |
|
41 | + $result = [ ]; |
|
42 | 42 | |
43 | 43 | $keyMapper = $this->keyMapper; |
44 | 44 | $valueMapper = $this->valueMapper; |
45 | 45 | |
46 | 46 | foreach ($set as $key => $item) { |
47 | - $result[$keyMapper($item, $key)] = $valueMapper($item, $key); |
|
47 | + $result[ $keyMapper($item, $key) ] = $valueMapper($item, $key); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return $result; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File was created 07.05.2015 09:11 |
|
4 | - * |
|
5 | - * @author Karsten J. Gerber <[email protected]> |
|
6 | - */ |
|
3 | + * File was created 07.05.2015 09:11 |
|
4 | + * |
|
5 | + * @author Karsten J. Gerber <[email protected]> |
|
6 | + */ |
|
7 | 7 | namespace PeekAndPoke\Component\Psi\Operation\Terminal; |
8 | 8 | |
9 | 9 | use PeekAndPoke\Component\Psi\Interfaces\Operation\TerminalOperationInterface; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File was created 29.05.2015 21:26 |
|
4 | - * |
|
5 | - * @author Karsten J. Gerber <[email protected]> |
|
6 | - */ |
|
3 | + * File was created 29.05.2015 21:26 |
|
4 | + * |
|
5 | + * @author Karsten J. Gerber <[email protected]> |
|
6 | + */ |
|
7 | 7 | namespace PeekAndPoke\Component\Psi\Functions\Unary; |
8 | 8 | |
9 | 9 | use PeekAndPoke\Component\Psi\Interfaces\Functions\ValueHolderInterface; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File was created 29.05.2015 21:38 |
|
4 | - * |
|
5 | - * @author Karsten J. Gerber <[email protected]> |
|
6 | - */ |
|
3 | + * File was created 29.05.2015 21:38 |
|
4 | + * |
|
5 | + * @author Karsten J. Gerber <[email protected]> |
|
6 | + */ |
|
7 | 7 | namespace PeekAndPoke\Component\Psi\Functions\Unary; |
8 | 8 | |
9 | 9 | use PeekAndPoke\Component\Psi\Interfaces\Functions\UnaryFunctionInterface; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File was created 27.08.2015 08:44 |
|
4 | - * |
|
5 | - * @author Karsten J. Gerber <[email protected]> |
|
6 | - */ |
|
3 | + * File was created 27.08.2015 08:44 |
|
4 | + * |
|
5 | + * @author Karsten J. Gerber <[email protected]> |
|
6 | + */ |
|
7 | 7 | namespace PeekAndPoke\Component\Psi\Functions\Unary\Mapper; |
8 | 8 | |
9 | 9 | use PeekAndPoke\Component\Psi\Interfaces\Functions\UnaryFunctionInterface; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File was created 02.10.2015 11:35 |
|
4 | - * |
|
5 | - * @author Karsten J. Gerber <[email protected]> |
|
6 | - */ |
|
3 | + * File was created 02.10.2015 11:35 |
|
4 | + * |
|
5 | + * @author Karsten J. Gerber <[email protected]> |
|
6 | + */ |
|
7 | 7 | namespace PeekAndPoke\Component\Psi\Functions\Unary\Mapper; |
8 | 8 | |
9 | 9 | use PeekAndPoke\Component\Psi\Functions\Unary\AbstractParameterisedUnaryFunction; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public static function isValidDateString($str) |
34 | 34 | { |
35 | - if (!is_string($str)) { |
|
35 | + if ( ! is_string($str)) { |
|
36 | 36 | return false; |
37 | 37 | } |
38 | 38 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | $stamp = strtotime($str); |
44 | 44 | |
45 | - if (!is_numeric($stamp)) { |
|
45 | + if ( ! is_numeric($stamp)) { |
|
46 | 46 | return false; |
47 | 47 | } |
48 | 48 |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File was created 01.10.2015 18:02 |
|
4 | - * |
|
5 | - * @author Karsten J. Gerber <[email protected]> |
|
6 | - */ |
|
3 | + * File was created 01.10.2015 18:02 |
|
4 | + * |
|
5 | + * @author Karsten J. Gerber <[email protected]> |
|
6 | + */ |
|
7 | 7 | namespace PeekAndPoke\Component\Psi\Functions\Unary\TypeCheck; |
8 | 8 | |
9 | 9 | use PeekAndPoke\Component\Psi\Functions\Unary\AbstractUnaryFunction; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | { |
26 | 26 | $val = $this->getValue(); |
27 | 27 | |
28 | - if (!$val instanceof LocalDate || !$input instanceof LocalDate) { |
|
28 | + if ( ! $val instanceof LocalDate || ! $input instanceof LocalDate) { |
|
29 | 29 | return false; |
30 | 30 | } |
31 | 31 |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File was created 01.10.2015 18:02 |
|
4 | - * |
|
5 | - * @author Karsten J. Gerber <[email protected]> |
|
6 | - */ |
|
3 | + * File was created 01.10.2015 18:02 |
|
4 | + * |
|
5 | + * @author Karsten J. Gerber <[email protected]> |
|
6 | + */ |
|
7 | 7 | namespace PeekAndPoke\Component\Psi\Functions\Unary\TypeCheck; |
8 | 8 | |
9 | 9 | use PeekAndPoke\Component\Psi\Functions\Unary\AbstractUnaryFunction; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File was created 29.05.2015 21:25 |
|
4 | - * |
|
5 | - * @author Karsten J. Gerber <[email protected]> |
|
6 | - */ |
|
3 | + * File was created 29.05.2015 21:25 |
|
4 | + * |
|
5 | + * @author Karsten J. Gerber <[email protected]> |
|
6 | + */ |
|
7 | 7 | namespace PeekAndPoke\Component\Psi\Functions\Unary\Matcher; |
8 | 8 | |
9 | 9 | use PeekAndPoke\Component\Psi\Functions\Unary\AbstractParameterisedUnaryFunction; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File was created 01.10.2015 18:02 |
|
4 | - * |
|
5 | - * @author Karsten J. Gerber <[email protected]> |
|
6 | - */ |
|
3 | + * File was created 01.10.2015 18:02 |
|
4 | + * |
|
5 | + * @author Karsten J. Gerber <[email protected]> |
|
6 | + */ |
|
7 | 7 | namespace PeekAndPoke\Component\Psi\Functions\Unary\TypeCheck; |
8 | 8 | |
9 | 9 | use PeekAndPoke\Component\Psi\Functions\Unary\AbstractUnaryFunction; |