for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* File was created 07.05.2015 12:08
*
* @author Karsten J. Gerber <[email protected]>
*/
namespace PeekAndPoke\Component\Psi\Operation;
use PeekAndPoke\Component\Psi\Interfaces\Functions\BinaryFunctionInterface;
* AbstractBinaryFunctionOperation
abstract class AbstractBinaryFunctionOperation
{
/** @var \Closure|BinaryFunctionInterface */
protected $biFunction;
* @param \Closure|BinaryFunctionInterface $biFunction
public function __construct($biFunction)
if ($biFunction instanceof BinaryFunctionInterface) {
$this->biFunction = $biFunction;
} else {
// TODO: add a check that this is a \Closure and that is has the correct number of parameters
}