| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 81 | 
| Code Lines | 56 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
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:
If many parameters/temporary variables are present:
| 1 | <?php  | 
            ||
| 28 | public function dataOptions(): array  | 
            ||
| 29 |     { | 
            ||
| 30 | return [  | 
            ||
| 31 | [  | 
            ||
| 32 | new Boolean(),  | 
            ||
| 33 | [  | 
            ||
| 34 | 'trueValue' => '1',  | 
            ||
| 35 | 'falseValue' => '0',  | 
            ||
| 36 | 'strict' => false,  | 
            ||
| 37 | 'nonScalarMessage' => [  | 
            ||
| 38 |                         'template' => 'Value must be either "{true}" or "{false}".', | 
            ||
| 39 | 'parameters' => [  | 
            ||
| 40 | 'true' => '1',  | 
            ||
| 41 | 'false' => '0',  | 
            ||
| 42 | ],  | 
            ||
| 43 | ],  | 
            ||
| 44 | 'scalarMessage' => [  | 
            ||
| 45 |                         'template' => 'Value must be either "{true}" or "{false}".', | 
            ||
| 46 | 'parameters' => [  | 
            ||
| 47 | 'true' => '1',  | 
            ||
| 48 | 'false' => '0',  | 
            ||
| 49 | ],  | 
            ||
| 50 | ],  | 
            ||
| 51 | 'skipOnEmpty' => false,  | 
            ||
| 52 | 'skipOnError' => false,  | 
            ||
| 53 | ],  | 
            ||
| 54 | ],  | 
            ||
| 55 | [  | 
            ||
| 56 | new Boolean(trueValue: true, falseValue: false, strict: true),  | 
            ||
| 57 | [  | 
            ||
| 58 | 'trueValue' => true,  | 
            ||
| 59 | 'falseValue' => false,  | 
            ||
| 60 | 'strict' => true,  | 
            ||
| 61 | 'nonScalarMessage' => [  | 
            ||
| 62 |                         'template' => 'Value must be either "{true}" or "{false}".', | 
            ||
| 63 | 'parameters' => [  | 
            ||
| 64 | 'true' => 'true',  | 
            ||
| 65 | 'false' => 'false',  | 
            ||
| 66 | ],  | 
            ||
| 67 | ],  | 
            ||
| 68 | 'scalarMessage' => [  | 
            ||
| 69 |                         'template' => 'Value must be either "{true}" or "{false}".', | 
            ||
| 70 | 'parameters' => [  | 
            ||
| 71 | 'true' => 'true',  | 
            ||
| 72 | 'false' => 'false',  | 
            ||
| 73 | ],  | 
            ||
| 74 | ],  | 
            ||
| 75 | 'skipOnEmpty' => false,  | 
            ||
| 76 | 'skipOnError' => false,  | 
            ||
| 77 | ],  | 
            ||
| 78 | ],  | 
            ||
| 79 | [  | 
            ||
| 80 | new Boolean(  | 
            ||
| 81 | trueValue: 'YES',  | 
            ||
| 82 | falseValue: 'NO',  | 
            ||
| 83 | strict: true,  | 
            ||
| 84 | nonScalarMessage: 'Custom message 1.',  | 
            ||
| 85 | scalarMessage: 'Custom message 2.',  | 
            ||
| 86 | skipOnEmpty: true,  | 
            ||
| 87 | skipOnError: true  | 
            ||
| 88 | ),  | 
            ||
| 89 | [  | 
            ||
| 90 | 'trueValue' => 'YES',  | 
            ||
| 91 | 'falseValue' => 'NO',  | 
            ||
| 92 | 'strict' => true,  | 
            ||
| 93 | 'nonScalarMessage' => [  | 
            ||
| 94 | 'template' => 'Custom message 1.',  | 
            ||
| 95 | 'parameters' => [  | 
            ||
| 96 | 'true' => 'YES',  | 
            ||
| 97 | 'false' => 'NO',  | 
            ||
| 98 | ],  | 
            ||
| 99 | ],  | 
            ||
| 100 | 'scalarMessage' => [  | 
            ||
| 101 | 'template' => 'Custom message 2.',  | 
            ||
| 102 | 'parameters' => [  | 
            ||
| 103 | 'true' => 'YES',  | 
            ||
| 104 | 'false' => 'NO',  | 
            ||
| 105 | ],  | 
            ||
| 106 | ],  | 
            ||
| 107 | 'skipOnEmpty' => true,  | 
            ||
| 108 | 'skipOnError' => true,  | 
            ||
| 109 | ],  | 
            ||
| 233 |