Conditions | 1 |
Paths | 1 |
Total Lines | 57 |
Code Lines | 44 |
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 |
||
19 | function getACFLayout() |
||
20 | { |
||
21 | return [ |
||
22 | 'name' => 'blockVideoOembed', |
||
23 | 'label' => 'Block: Video Oembed', |
||
24 | 'sub_fields' => [ |
||
25 | [ |
||
26 | 'label' => __('General', 'flynt'), |
||
27 | 'name' => 'generalTab', |
||
28 | 'type' => 'tab', |
||
29 | 'placement' => 'top', |
||
30 | 'endpoint' => 0 |
||
31 | ], |
||
32 | [ |
||
33 | 'label' => __('Poster Image', 'flynt'), |
||
34 | 'name' => 'posterImage', |
||
35 | 'type' => 'image', |
||
36 | 'preview_size' => 'medium', |
||
37 | 'mime_types' => 'jpg,jpeg,png', |
||
38 | 'instructions' => __('Recommended Size: Min-Width 1920px; Min-Height: 1080px; Image-Format: JPG, PNG. Aspect Ratio 16/9.', 'flynt'), |
||
39 | 'required' => 1 |
||
40 | ], |
||
41 | [ |
||
42 | 'label' => __('Video', 'flynt'), |
||
43 | 'name' => 'oembed', |
||
44 | 'type' => 'oembed', |
||
45 | 'required' => 1 |
||
46 | ], |
||
47 | [ |
||
48 | 'label' => __('Options', 'flynt'), |
||
49 | 'name' => 'optionsTab', |
||
50 | 'type' => 'tab', |
||
51 | 'placement' => 'top', |
||
52 | 'endpoint' => 0 |
||
53 | ], |
||
54 | [ |
||
55 | 'label' => '', |
||
56 | 'name' => 'options', |
||
57 | 'type' => 'group', |
||
58 | 'layout' => 'row', |
||
59 | 'sub_fields' => [ |
||
60 | FieldVariables\getTheme(), |
||
61 | [ |
||
62 | 'label' => __('Size', 'flynt'), |
||
63 | 'name' => 'size', |
||
64 | 'type' => 'radio', |
||
65 | 'other_choice' => 0, |
||
66 | 'save_other_choice' => 0, |
||
67 | 'layout' => 'horizontal', |
||
68 | 'choices' => [ |
||
69 | 'sizeSmall' => __('Small', 'flynt'), |
||
70 | 'sizeMedium' => __('Medium', 'flynt'), |
||
71 | 'sizeLarge' => __('Large (Default)', 'flynt'), |
||
72 | 'sizeHuge' => __('Huge', 'flynt'), |
||
73 | 'sizeFull' => __('Full', 'flynt'), |
||
74 | ], |
||
75 | 'default_value' => 'sizeLarge', |
||
76 | ], |
||
82 |
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