Showing 12 of 19 total issues
Method sendWithCurl
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function sendWithCurl($url, $payload)
{
$response = new \stdClass;
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, true);
Method infoFrom
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function infoFrom(array $server)
{
if (isset($server["TRAVIS"])) {
return $this->travisProperties($server);
}
Method send
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function send(Entity\JsonFile $json)
{
$response = new \stdClass;
$payload = (string)$json;
$options = array(
Function infoFrom
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
private function infoFrom(array $server)
{
if (isset($server["TRAVIS"])) {
return $this->travisProperties($server);
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method execute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$logger = new ConsoleLogger($output);
$updater = new Updater(null, false, Updater::STRATEGY_GITHUB);
Avoid too many return
statements within this method. Open
Open
return $this->gitlabCiProperties($server);
Avoid too many return
statements within this method. Open
Open
return array();
Avoid too many return
statements within this method. Open
Open
return $this->tddiumProperties($server);
Avoid too many return
statements within this method. Open
Open
return $this->buildkiteProperties($server);
Avoid too many return
statements within this method. Open
Open
return $this->werckerProperties($server);
Avoid too many return
statements within this method. Open
Open
return $this->codeshipProperties($server);
Function execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$logger = new ConsoleLogger($output);
$updater = new Updater(null, false, Updater::STRATEGY_GITHUB);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"