for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Service\Subsets;
use Service\Criterias\Criteria;
abstract class Builder implements Subset {
protected $criteriaList = [];
public $cascade = null;
public function __construct()
{
$this->criteriaList = collect();
collect()
object<Illuminate\Support\Collection>
array
$criteriaList
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
}
public function pushCriteria(Criteria $criteria)
$this->criteriaList->push($criteria);
push
$this->criteriaList
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.
public function render()
$formatedSubset = [];
foreach ($this->criteriaList as $criteria) {
$formatedSubset = array_merge($formatedSubset, $criteria->render());
$subset = lcfirst(class_basename(get_class($this)));
if ($subset === 'series' && (! $this->cascade || starts_with($this->cascade, 'series.'))) {
return [$subset => [$formatedSubset]];
return [$subset => $formatedSubset];
public function setCascade($cascade)
$this->cascade = $cascade;
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..