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 instanceOf SpeedPointInterface):
$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();