for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* (c) 2018 Douglas Reith.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Reith\ToyRobot\Infrastructure\Persistence;
use Reith\ToyRobot\Domain\Robot\RobotRepositoryInterface;
use Reith\ToyRobot\Domain\Robot\RobotFinderInterface;
use Reith\ToyRobot\Domain\Robot\Robot;
class RobotRepository implements RobotRepositoryInterface, RobotFinderInterface
{
private $store;
* @param RobotStoreInterface $file
$file
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
public function __construct(RobotStoreInterface $store)
$this->store = $store;
}
* @return Robot|null
public function load(): ?Robot
return $this->store->getRobot();
* @param Robot $robot
public function save(Robot $robot): void
$this->store->saveRobot($robot);
* Implemented for the RobotFinderInterface.
* @return Robot[]
public function find(): array
return [$this->load()];
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.