for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PhpGitHooks\Module\PhpCs\Contract\Command;
use Bruli\EventBusBundle\CommandBus\CommandInterface;
class PhpCsTool implements CommandInterface
{
/**
* @var array
*/
private $files;
* @var string
private $standard;
private $errorMessage;
private $enableFaces;
private $ignore;
* PhpCsToolCommand constructor.
*
* @param array $files
* @param string $standard
* @param string $errorMessage
* @param bool $enableFaces
* @param string $ignore
public function __construct(array $files, $standard, $errorMessage, $enableFaces, $ignore)
$this->files = $files;
$this->standard = $standard;
$this->errorMessage = $errorMessage;
$this->enableFaces = $enableFaces;
$enableFaces
string
boolean
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.
$answer = 42; $correct = false; $correct = (bool) $answer;
$this->ignore = $ignore;
}
* @return string
public function getErrorMessage()
return $this->errorMessage;
public function isEnableFaces()
return $this->enableFaces;
* @return array
public function getFiles()
return $this->files;
public function getStandard()
return $this->standard;
public function getIgnore()
return $this->ignore;
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.