for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* File was created 06.05.2015 22:14
*
* @author Karsten J. Gerber <[email protected]>
*/
namespace PeekAndPoke\Component\Psi\Operation\FullSet;
use PeekAndPoke\Component\Psi\FullSetOperation;
* ReverseOperation
class ReverseOperation implements FullSetOperation
{
* {@inheritdoc}
public function apply(\Iterator $set)
$data = iterator_to_array($set);
$reversed = array_reverse($data);
return new \ArrayIterator($reversed);
}