The expression return $this->getValueByIndex(0) returns the type double which is incompatible with the return type mandated by Smoren\Sequence\Interfac...erface::getStartValue() of Smoren\Sequence\Interfaces\T.
In the issue above, the returned value is violating the contract defined by the
mentioned interface.
Let's take a look at an example:
interfaceHasName{/** @return string */publicfunctiongetName();}className{public$name;}classUserimplementsHasName{/** @return string|Name */publicfunctiongetName(){returnnewName('foo');// This is a violation of the ``HasName`` interface// which only allows a string value to be returned.}}
Loading history...
55
}
56
57
/**
58
* @param float $previousValue
59
* @return float
60
*/
61
2
public function getNextValue($previousValue): float
The expression return $previousValue + $this->step returns the type double which is incompatible with the return type mandated by Smoren\Sequence\Interfac...terface::getNextValue() of Smoren\Sequence\Interfaces\T.
In the issue above, the returned value is violating the contract defined by the
mentioned interface.
Let's take a look at an example:
interfaceHasName{/** @return string */publicfunctiongetName();}className{public$name;}classUserimplementsHasName{/** @return string|Name */publicfunctiongetName(){returnnewName('foo');// This is a violation of the ``HasName`` interface// which only allows a string value to be returned.}}
The expression return $this->_offsetGet($offset) returns the type double which is incompatible with the return type mandated by Smoren\Sequence\Interfac...eInterface::offsetGet() of Smoren\Sequence\Interfaces\T.
In the issue above, the returned value is violating the contract defined by the
mentioned interface.
Let's take a look at an example:
interfaceHasName{/** @return string */publicfunctiongetName();}className{public$name;}classUserimplementsHasName{/** @return string|Name */publicfunctiongetName(){returnnewName('foo');// This is a violation of the ``HasName`` interface// which only allows a string value to be returned.}}
Loading history...
73
}
74
75
/**
76
* {@inheritDoc}
77
*/
78
5
public function getIterator(): FloatSequenceIterator
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: