Showing 8 of 8 total issues
Result
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class Result implements ResultInterface
{
/**
* The actual data we fetched. To get the data you can use.
Function getMultimediaObjects
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function getMultimediaObjects($objectType = '')
{
if (empty($this->multimediaObjects)) {
if ($this->productHasMultimediaObject()) {
$productMultimediaObjects = $this->getProductData()->ProductMultimediaObject->MultimediaObject;
- 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 getImages
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getImages()
{
if (empty($this->images)) {
if ($this->productHasImageGallery()) {
$productPictures = $this->getProductData()->ProductGallery->ProductPicture;
- 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 getMultimediaObjects
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getMultimediaObjects($objectType = '')
{
if (empty($this->multimediaObjects)) {
if ($this->productHasMultimediaObject()) {
$productMultimediaObjects = $this->getProductData()->ProductMultimediaObject->MultimediaObject;
Function getReasonsToBuy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getReasonsToBuy()
{
if (empty($this->reasonsToBuy)) {
if ($this->productHasReasonsToBuy()) {
$productReasonsToBuy = $this->getProductData()->ReasonsToBuy->ReasonToBuy;
- 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 getSpecByIdentifier
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getSpecByIdentifier($identifier)
{
if ($this->productHasProductFeature()) {
$productFeature = $this->getProductData()->ProductFeature;
- 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 getSpecByName
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getSpecByName($specificationName)
{
if ($this->productHasProductFeature()) {
$productFeature = $this->getProductData()->ProductFeature;
- 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 fetchBaseData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function fetchBaseData(MockHandler $handler = null)
{
foreach ($this->getUrls() as $url) {
$icecatRequest = new Client(['handler' => $handler]);
$icecatRequestResult = $icecatRequest->request(
- 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"