for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MachineLearning\Domain\Model\Value;
use MachineLearning\Domain\Model\ValueInterface;
class VectorValue implements ValueInterface
{
/**
* @var float[]
*/
protected $value;
* @param float[]|array<integer,array> $value
public function __construct($value)
$this->value = $value;
$value
array<integer,double|array>
array<integer,double>
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..
}
* @return \float[]
public function getValue()
return $this->value;
* @inheritdoc
public function scalar(ValueInterface $value)
$result = 0;
$columns = count($this->value);
for ($i=0; $i<$columns; $i++) {
$result += $this->value[$i]*$value->getValue()[$i];
return $result;
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..