Showing 141 of 176 total issues
Function createConfirmRequest
has a Cognitive Complexity of 118 (exceeds 5 allowed). Consider refactoring. Open
private function createConfirmRequest(
$validation,
Shipment $shipment,
ShipmentRequestLabelSpecification $labelSpec = null,
ShipmentRequestReceiptSpecification $receiptSpec = null
- 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 __construct
has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($response = null)
{
$this->Shipper = new Shipper();
$this->ReferenceNumber = new ReferenceNumber();
$this->Service = new Service();
- 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 createConfirmRequest
has 248 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function createConfirmRequest(
$validation,
Shipment $shipment,
ShipmentRequestLabelSpecification $labelSpec = null,
ShipmentRequestReceiptSpecification $receiptSpec = null
File Shipping.php
has 514 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Ups;
use DOMDocument;
Function __construct
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($attributes = null)
{
if (null !== $attributes) {
if (isset($attributes->AddressLine1)) {
$this->setAddressLine1($attributes->AddressLine1);
- 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
Shipment
has 53 functions (exceeds 20 allowed). Consider refactoring. Open
class Shipment
{
/**
* @var PaymentInformation
*/
Function __construct
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(\stdClass $response = null)
{
$this->AddressExtendedInformation = [];
if (null !== $response) {
- 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
HazMat
has 51 functions (exceeds 20 allowed). Consider refactoring. Open
class HazMat implements NodeInterface
{
/**
* @var string
Address
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
class Address implements NodeInterface
{
/** @deprecated */
public $AddressLine1;
/** @deprecated */
Function __construct
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($response = null)
{
$this->Service = new Service();
$this->BillingWeight = new BillingWeight();
$this->TransportationCharges = new Charges();
- 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 __construct
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($response = null)
{
$this->ShipmentReferenceNumber = new ShipmentReferenceNumber();
$this->PackageReferenceNumber = new PackageReferenceNumber();
$this->Service = new Service();
- 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 __construct
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($response = null)
{
$this->ShipmentReferenceNumber = new ShipmentReferenceNumber();
$this->PackageReferenceNumber = new PackageReferenceNumber();
$this->ActivityLocation = new ActivityLocation();
- 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 __construct
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(\stdClass $response = null)
{
$this->PackageReferenceNumber = [];
$this->ShipmentReferenceNumber = [];
$this->Resolution = new Resolution();
- 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 __construct
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($response = null)
{
$this->PackageReferenceNumber = new PackageReferenceNumber();
$this->ShipmentReferenceNumber = new ShipmentReferenceNumber();
$this->ActivityLocation = new ActivityLocation();
- 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
File Address.php
has 395 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Ups\Entity;
use DOMDocument;
Method __construct
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($response = null)
{
$this->Shipper = new Shipper();
$this->ReferenceNumber = new ReferenceNumber();
$this->Service = new Service();
Function __construct
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($attributes = null)
{
$this->setPackagingType(
new PackagingType(
isset($attributes->PackagingType) ? $attributes->PackagingType : null
- 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
InternationalForms
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class InternationalForms implements NodeInterface
{
/**
* @var array
*/
ShipmentServiceOptions
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class ShipmentServiceOptions implements NodeInterface
{
/**
* @var
*/
Function toNode
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function toNode(DOMDocument $document = null)
{
if (null === $document) {
$document = new DOMDocument();
}
- 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"