Showing 29 of 40 total issues
Method setCreditCard
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function setCreditCard($expirationMonth, $expirationYear, $number, $cvc, Holder $holder, $store = true)
Function generateListPath
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public function generateListPath(Pagination $pagination = null, Filters $filters = null, $params = [])
{
$queryParams = [];
if (!is_null($pagination)) {
- 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 setTransfers
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$amount,
$bankNumber,
$agencyNumber,
$agencyCheckNumber,
$accountNumber,
Method before_request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function before_request(&$url, &$headers, &$data, &$type, &$options)
Method addReceiver
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addReceiver($moipAccount, $type, $fixed = null, $percentual = null, $feePayor = false)
Method addItem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addItem($product, $quantity, $detail, $price, $category = 'OTHER_CATEGORIES')
Method before_request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function before_request(&$url, &$headers, &$data, &$type, &$options)
Method setCreditCard
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function setCreditCard($expirationMonth, $expirationYear, $number, $cvc, Holder $holder = null)
Method setDeviceFingerprint
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function setDeviceFingerprint($ip, $latitude, $longitude, $userAgent, $fingerprint)