| Conditions | 1 |
| Paths | 1 |
| Total Lines | 67 |
| Code Lines | 50 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 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 |
||
| 12 | public static function map() |
||
| 13 | { |
||
| 14 | return [ |
||
| 15 | 'tag' => ASN1::TYPE_SEQUENCE, |
||
| 16 | 'children' => [ |
||
| 17 | 'tbsCertificate' => [ |
||
| 18 | 'tag' => ASN1::TYPE_SEQUENCE, |
||
| 19 | 'children' => [ |
||
| 20 | 'version' => [ |
||
| 21 | 'name' => 0, |
||
| 22 | 'implicit' => false, |
||
| 23 | 'tag' => ASN1::TYPE_INTEGER, |
||
| 24 | 'map' => [1=>'v1','v2','v3'] |
||
| 25 | ], |
||
| 26 | 'serialNumber' => [ |
||
| 27 | 'tag' => ASN1::TYPE_INTEGER, |
||
| 28 | 'base' => 16 |
||
| 29 | ], |
||
| 30 | 'signature' => Common::AlgorithmIdentifier(), |
||
| 31 | 'issuer' => Common::RDNSequence(), |
||
| 32 | 'validity' => [ |
||
| 33 | 'tag' => ASN1::TYPE_SEQUENCE, |
||
| 34 | 'children' => [ |
||
| 35 | 'notBefore' => [ |
||
| 36 | 'tag' => ASN1::TYPE_CHOICE, |
||
| 37 | 'children' => [ |
||
| 38 | [ 'tag' => ASN1::TYPE_GENERALIZED_TIME ], |
||
| 39 | [ 'tag' => ASN1::TYPE_UTC_TIME ] |
||
| 40 | ] |
||
| 41 | ], |
||
| 42 | 'notAfter' => [ |
||
| 43 | 'tag' => ASN1::TYPE_CHOICE, |
||
| 44 | 'children' => [ |
||
| 45 | [ 'tag' => ASN1::TYPE_GENERALIZED_TIME ], |
||
| 46 | [ 'tag' => ASN1::TYPE_UTC_TIME ] |
||
| 47 | ] |
||
| 48 | ] |
||
| 49 | ] |
||
| 50 | ], |
||
| 51 | 'subject' => Common::RDNSequence(), |
||
| 52 | 'SubjectPublicKeyInfo' => [ |
||
| 53 | 'tag' => ASN1::TYPE_SEQUENCE, |
||
| 54 | 'children' => [ |
||
| 55 | 'algorithm' => Common::AlgorithmIdentifier(), |
||
| 56 | 'publicKey' => [ |
||
| 57 | 'tag' => ASN1::TYPE_BIT_STRING |
||
| 58 | ] |
||
| 59 | ] |
||
| 60 | ], |
||
| 61 | 'issuerUniqueID' => [ |
||
| 62 | 'tag' => ASN1::TYPE_BIT_STRING, |
||
| 63 | 'name' => 1, |
||
| 64 | 'implicit' => true, |
||
| 65 | 'optional' => true |
||
| 66 | ], |
||
| 67 | 'subjectUniqueID' => [ |
||
| 68 | 'tag' => ASN1::TYPE_BIT_STRING, |
||
| 69 | 'name' => 2, |
||
| 70 | 'implicit' => true, |
||
| 71 | 'optional' => true |
||
| 72 | ], |
||
| 73 | 'extensions' => Common::extensions() + [ 'name' => 3, 'implicit' => false ] |
||
| 74 | ] |
||
| 75 | ], |
||
| 76 | 'signatureAlgorithm' => Common::AlgorithmIdentifier(), |
||
| 77 | 'signatureValue' => [ |
||
| 78 | 'tag' => ASN1::TYPE_BIT_STRING, |
||
| 79 | ] |
||
| 84 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths