for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace eXpansion\Bundle\VoteManager\Services\VoteFactories;
use eXpansion\Bundle\VoteManager\Structures\AbstractVote;
use eXpansion\Bundle\VoteManager\Structures\NextMapVote;
use eXpansion\Framework\Core\Helpers\ChatNotification;
use eXpansion\Framework\Core\Storage\Data\Player;
use Maniaplanet\DedicatedServer\Connection;
/**
* Class RestartMap
*
* @author de Cramer Oliver<[email protected]>
* @copyright 2017 Smile
* @package eXpansion\Bundle\VoteManager\Services\VoteFactories
*/
class NextMap extends AbstractFactory
{
/** @var Connection */
protected $connection;
/** @var ChatNotification */
protected $chatNotification;
* NextMap constructor.
* @param int $duration
* @param float $ration
* @param string $class
$class
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.
* @param Connection $connection
* @param ChatNotification $chatNotification
public function __construct(
int $duration,
float $ration,
Connection $connection,
ChatNotification $chatNotification
) {
parent::__construct($duration, $ration);
$this->connection = $connection;
$this->chatNotification = $chatNotification;
}
* @inheritdoc
public function create(Player $player): AbstractVote
return new NextMapVote(
$player,
$this->getVoteCode(),
$this->duration,
$this->ration,
$this->connection,
$this->chatNotification
);
public function getVoteCode(): string
return 'Exp_NextMap';
public function getReplacementTypes()
return ['NextMap'];
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.