for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace FilmTools\SpeedPoint;
abstract class SpeedPointDecoratorAbstract implements SpeedPointProviderInterface, SpeedPointInterface
{
/**
* @var SpeedPointInterface
*/
public $speedpoint;
* @param SpeedPointProviderInterface|SpeedPointInterface $speedpoint
public function __construct( $speedpoint)
if ($speedpoint instanceOf SpeedPointProviderInterface):
$this->speedpoint = $speedpoint->getSpeedPoint();
elseif ($speedpoint_provider instanceOf SpeedPointInterface):
$speedpoint_provider
$speedpoint
This check looks for variables that are accessed but have not been defined. It raises an issue if it finds another variable that has a similar name.
The variable may have been renamed without also renaming all references.
$this->speedpoint = $speedpoint;
else:
throw new \InvalidArgumentException("SpeedPointInterface or SpeedPointProviderInterface expected");
endif;
}
* Returns the Decorator instance.
*
* @inheritDoc
* @return SpeedPointDecoratorAbstract
public function getSpeedPoint() : SpeedPointInterface
return $this;
public function valid() : bool
return $this->speedpoint->valid();
public function getType() : ?string
return $this->speedpoint->getType();
public function getValue() : ?float
return $this->speedpoint->getValue();
public function getSpeedLoss() : ?float
return $this->speedpoint->getSpeedLoss();
public function getEICorrection() : ?float
return $this->speedpoint->getEICorrection();
This check looks for variables that are accessed but have not been defined. It raises an issue if it finds another variable that has a similar name.
The variable may have been renamed without also renaming all references.