Showing 9 of 9 total issues
Profile
has 46 functions (exceeds 20 allowed). Consider refactoring. Open
class Profile implements ModelInterface
{
private $id;
private $title;
AbstractMedium
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AbstractMedium implements ModelInterface
{
protected $id;
protected $mimeType;
Cloud
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class Cloud implements CloudInterface
{
/**
* The client which is used to perform the requests to the REST api
*
File Cloud.php
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* This file is part of the XabbuhPandaClient package.
*
Method request
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function request($method, $path, array $params)
{
// sign the request parameters
$signer = PandaSigner::getInstance($this->cloudId, $this->account);
$params = $signer->signParams($method, $path, $params);
Function request
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function request($method, $path, array $params)
{
// sign the request parameters
$signer = PandaSigner::getInstance($this->cloudId, $this->account);
$params = $signer->signParams($method, $path, $params);
- 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 request
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function request($method, $path, array $params)
{
// sign the request parameters
$signer = PandaSigner::getInstance($this->cloudId, $this->account);
$params = $signer->signParams($method, $path, $params);
Function request
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function request($method, $path, array $params)
{
// sign the request parameters
$signer = PandaSigner::getInstance($this->cloudId, $this->account);
$params = $signer->signParams($method, $path, $params);
- 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
Function denormalize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function denormalize($data, $class, $format = null, array $context = array())
{
// prematurely return in case of an empty collection
if (is_array($data) && count($data) == 0) {
return array();
- 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"