for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace __\Sequence;
use __;
class PhpLodashWrapper
{
/**
* @var mixed $value
*/
private $value;
* BottomlineWrapper constructor.
*
* @param mixed $value the value that is going to be chained
public function __construct($value)
$this->value = $value;
}
* Dynamically calls php-lodash functions, prepend the list of parameters with the current collection list
* @param string $functionName must be a valid php-lodash function
* @param array $params
* @return $this
* @throws \Exception
public function __call($functionName, $params)
if (is_callable('__', $functionName)) {
$functionName
string
boolean
$syntax_only
is_callable()
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
ignore-type
if (is_callable('__', /** @scrutinizer ignore-type */ $functionName)) {
$params = $params == null ? [] : $params;
$params == null
true
$params = __::prepend($params, $this->value);
$this->value = call_user_func_array(['__', $functionName], $params);
return $this;
} else {
throw new \Exception("Invalid function {$functionName}");
* @return mixed
public function value()
return $this->value;