for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Symfony package.
*
* (c) Arnaud LEMAIRE <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Fp\Reducer;
class First implements Reducer
{
use Mixin\Stateless;
use Mixin\WithCallback;
public function step($result, $current)
if ($this->callback->__invoke($current)) {
__invoke
$this->callback
callable
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.
return new Reduced($this->next_reducer->step($result, $current));
}
return $result;
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.