| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 66 | 
| Code Lines | 51 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 48 | 
| CRAP Score | 1 | 
| 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  | 
            ||
| 30 | 330 | public static function createMetadata() : MetadataCollection  | 
            |
| 31 |     { | 
            ||
| 32 | 330 | return new MetadataCollection(  | 
            |
| 33 | 330 | new AnnotationMetadata(  | 
            |
| 34 | 330 | Attribute::class,  | 
            |
| 35 | 330 | AnnotationTarget::annotation(),  | 
            |
| 36 | 330 | false,  | 
            |
| 37 | 330 | new PropertyMetadata(  | 
            |
| 38 | 330 | 'name',  | 
            |
| 39 | 330 | ['type' => 'string'],  | 
            |
| 40 | 330 | true,  | 
            |
| 41 | 330 | true  | 
            |
| 42 | ),  | 
            ||
| 43 | 330 | new PropertyMetadata(  | 
            |
| 44 | 330 | 'type',  | 
            |
| 45 | 330 | ['type' => 'string'],  | 
            |
| 46 | 330 | true  | 
            |
| 47 | ),  | 
            ||
| 48 | 330 | new PropertyMetadata(  | 
            |
| 49 | 330 | 'required',  | 
            |
| 50 | 330 | ['type' => 'boolean']  | 
            |
| 51 | )  | 
            ||
| 52 | ),  | 
            ||
| 53 | 330 | new AnnotationMetadata(  | 
            |
| 54 | 330 | Attributes::class,  | 
            |
| 55 | 330 | AnnotationTarget::class(),  | 
            |
| 56 | 330 | false,  | 
            |
| 57 | 330 | new PropertyMetadata(  | 
            |
| 58 | 330 | 'value',  | 
            |
| 59 | [  | 
            ||
| 60 | 330 | 'type' => 'array',  | 
            |
| 61 | 'array_type' =>'Doctrine\Annotations\Annotation\Attribute',  | 
            ||
| 62 | 'value' =>'array<Doctrine\Annotations\Annotation\Attribute>',  | 
            ||
| 63 | ],  | 
            ||
| 64 | 330 | true,  | 
            |
| 65 | 330 | true  | 
            |
| 66 | )  | 
            ||
| 67 | ),  | 
            ||
| 68 | 330 | new AnnotationMetadata(  | 
            |
| 69 | 330 | Enum::class,  | 
            |
| 70 | 330 | AnnotationTarget::property(),  | 
            |
| 71 | 330 | true,  | 
            |
| 72 | 330 | new PropertyMetadata(  | 
            |
| 73 | 330 | 'value',  | 
            |
| 74 | 330 | ['type' => 'array'],  | 
            |
| 75 | 330 | true,  | 
            |
| 76 | 330 | true  | 
            |
| 77 | ),  | 
            ||
| 78 | 330 | new PropertyMetadata(  | 
            |
| 79 | 330 | 'literal',  | 
            |
| 80 | 330 | ['type' => 'array']  | 
            |
| 81 | )  | 
            ||
| 82 | ),  | 
            ||
| 83 | 330 | new AnnotationMetadata(  | 
            |
| 84 | 330 | Target::class,  | 
            |
| 85 | 330 | AnnotationTarget::class(),  | 
            |
| 86 | 330 | true,  | 
            |
| 87 | 330 | new PropertyMetadata(  | 
            |
| 88 | 330 | 'value',  | 
            |
| 89 | [  | 
            ||
| 90 | 330 | 'type' =>'array',  | 
            |
| 91 | 'array_type'=>'string',  | 
            ||
| 92 | 'value' =>'array<string>',  | 
            ||
| 93 | ],  | 
            ||
| 94 | 330 | false,  | 
            |
| 95 | 330 | true  | 
            |
| 96 | )  | 
            ||
| 101 |