Failed Conditions
Pull Request — master (#4127)
by Owen
39:04 queued 27:50
created

Currency::format()   B

Complexity

Conditions 10
Paths 2

Size

Total Lines 20
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 17
CRAP Score 10

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 20
rs 7.6666
c 0
b 0
f 0
ccs 17
cts 17
cp 1
cc 10
nc 2
nop 0
crap 10

How to fix   Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
namespace PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard;
4
5
class Currency extends CurrencyBase
6
{
7
    protected ?bool $overrideSpacing = false;
8
9
    protected ?CurrencyNegative $overrideNegative = null;
10
}
11