Conditions | 1 |
Paths | 1 |
Total Lines | 92 |
Code Lines | 90 |
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 |
||
21 | public function toOptionArray() |
||
22 | { |
||
23 | return [ |
||
24 | null => __('Select the store segment.'), |
||
25 | 'ANIMALS_AND_PET_SUPPLIES' => __('Animals and Pet Supplies'), |
||
26 | 'APPAREL_AND_ACCESSORIES' => __('Apparel and Accessories'), |
||
27 | 'CLOTHING' => __('Apparel and Accessories > Clothing'), |
||
28 | 'CLOTHING_ACCESSORIES' => __('Apparel and Accessories > Clothing Accessories'), |
||
29 | 'COSTUMES_AND_ACCESSORIES' => __('Apparel and Accessories > Costumes and Accessories'), |
||
30 | 'HANDBAGS_AND_WALLET_ACCESSORIES' => __('Apparel and Accessories > Handbags and Wallet Accessories'), |
||
31 | 'HANDBAGS_WALLETS_AND_CASES' => __('Apparel and Accessories > Handbags and Wallet Accessories'), |
||
32 | 'JEWELRY' => __('Apparel and Accessories > Jewelry'), |
||
33 | 'SHOE_ACCESSORIES' => __('Apparel and Accessories > Shoe Accessories'), |
||
34 | 'SHOES' => __('Apparel and Accessories > Shoes'), |
||
35 | 'OTHER_APPAREL' => __('Apparel and Accessories > Other'), |
||
36 | 'ARTS_AND_ENTERTAINMENT' => __('Arts and Entertainment'), |
||
37 | 'BABY_AND_TODDLER' => __('Baby and Toddler'), |
||
38 | 'BUSINESS_AND_INDUSTRIAL' => __('Business and Industrial'), |
||
39 | 'ADVERTISING_AND_MARKETING' => __('Business and Industrial > Advertising and Marketing'), |
||
40 | 'AGRICULTURE' => __('Business and Industrial > Agriculture'), |
||
41 | 'CONSTRUCTION' => __('Business and Industrial > Construction'), |
||
42 | 'FILM_AND_TELEVISION' => __('Business and Industrial > Film and Television'), |
||
43 | 'FINANCE_AND_INSURANCE' => __('Business and Industrial > Finance and Insurance'), |
||
44 | 'FOOD_SERVICE' => __('Business and Industrial > Food Service'), |
||
45 | 'FORESTRY_AND_LOGGING' => __('Business and Industrial > Forestry and Logging'), |
||
46 | 'HEAVY_MACHINERY' => __('Business and Industrial > Heavy Machinery'), |
||
47 | 'HOTEL_AND_HOSPITALITY' => __('Business and Industrial > Hotel and Hospitality'), |
||
48 | 'INDUSTRIAL_STORAGE' => __('Business and Industrial > Industrial Storage'), |
||
49 | 'LAW_ENFORCEMENT' => __('Business and Industrial > Law Enforcement'), |
||
50 | 'MANUFACTURING' => __('Business and Industrial > Manufacturing'), |
||
51 | 'MATERIAL_HANDLING' => __('Business and Industrial > Material Handling'), |
||
52 | 'MEDICAL' => __('Business and Industrial > Medical'), |
||
53 | 'MINING_AND_QUARRYING' => __('Business and Industrial > Mining and Quarrying'), |
||
54 | 'PIERCING_AND_TATTOOING' => __('Business and Industrial > Piercing and Tattooing'), |
||
55 | 'RETAIL' => __('Business and Industrial > Retail'), |
||
56 | 'SCIENCE_AND_LABORATORY' => __('Business and Industrial > Science and Laboratory'), |
||
57 | 'SIGNAGE' => __('Business and Industrial > Signage'), |
||
58 | 'WORK_SAFETY_PROTECTIVE_GEAR' => __('Business and Industrial > Work Safety Protective Gear'), |
||
59 | 'OTHER_BUSINESSES' => __('Business and Industrial > Other Businesses'), |
||
60 | 'CAMERA_AND_OPTIC_ACCESSORIES' => __('Camera and Optic Accessories'), |
||
61 | 'CAMERAS' => __('Camera and Optic Accessories > Cameras'), |
||
62 | 'CAMERA_ACESSORIES' => __('Camera and Optic Accessories > Camera Acessories'), |
||
63 | 'PHOTOGRAPHY' => __('Camera and Optic Accessories > Photography'), |
||
64 | 'OTHERS_CAMERAS_ACCESSORIES' => __('Camera and Optic Accessories > Others Cameras Accessories'), |
||
65 | 'ELECTRONICS' => __('Electronics'), |
||
66 | '3D_PRINTERS' => __('Electronics > 3d Printers'), |
||
67 | 'AUDIO' => __('Electronics > Audio'), |
||
68 | 'CIRCUIT_BOARDS_AND_COMPONENTS' => __('Electronics > Circuit Boards and Components'), |
||
69 | 'COMMUNICATIONS' => __('Electronics > Communications'), |
||
70 | 'COMPONENTS' => __('Electronics > Components'), |
||
71 | 'COMPUTERS' => __('Electronics > Computers'), |
||
72 | 'ELECTRONICS_ACCESSORIES' => __('Electronics > Electronics Accessories'), |
||
73 | 'GPS_NAVIGATION_SYSTEMS' => __('Electronics > Gps Navigation Systems'), |
||
74 | 'GPS_ACCESSORIES' => __('Electronics > Gps Accessories'), |
||
75 | 'NETWORKING' => __('Electronics > Networking'), |
||
76 | 'PRINT_COPY_SCAN_AND_FAX' => __('Electronics > Print Copy Scan and Fax'), |
||
77 | 'PRINTER_COPIER_AND_FAX_MACHINE_ACCESSORIES' => __('Electronics > Printer Copier and Fax Machine Accessories'), |
||
78 | 'VIDEO' => __('Electronics > Video'), |
||
79 | 'VIDEO_GAME_CONSOLES' => __('Electronics > Video Game Consoles'), |
||
80 | 'VIDEO_GAME_CONSOLE_ACCESSORIES' => __('Electronics > Video Game Console Accessories'), |
||
81 | 'OTHER_ELECTRONICS' => __('Electronics > Other Electronics'), |
||
82 | 'FOOD_BEVERAGES_AND_TOBACCO' => __('Food Beverages and Tobacco'), |
||
83 | 'FURNITURE' => __('Furniture'), |
||
84 | 'TOOL_ACCESSORIES' => __('Tool Accessories'), |
||
85 | 'HEALTH_AND_BEAUTY' => __('Health and Beauty'), |
||
86 | 'PERFUME_AND_COLOGNE' => __('Health and Beauty > Perfume and Cologne'), |
||
87 | 'MAKEUP' => __('Health and Beauty > Makeup'), |
||
88 | 'BATH_AND_BODY' => __('Health and Beauty > Bath and Body'), |
||
89 | 'COSMETIC_TOOLS' => __('Health and Beauty > Cosmetic Tools'), |
||
90 | 'LUGGAGE_AND_BAGS' => __('Luggage and Bags'), |
||
91 | 'ADULT' => __('Adult'), |
||
92 | 'WEAPONS_AND_AMMUNITION' => __('Weapons and Ammunition'), |
||
93 | 'OFFICE_SUPPLIES' => __('Office Supplies'), |
||
94 | 'RELIGIOUS_AND_CEREMONIAL' => __('Religious and Ceremonial'), |
||
95 | 'SOFTWARE' => __('Software'), |
||
96 | 'COMPUTER_SOFTWARE' => __('Software > Computer Software'), |
||
97 | 'DIGITAL_GOODS_AND_CURRENCY' => __('Software > Digital Goods and Currency'), |
||
98 | 'DIGITAL_SERVICES' => __('Software > Digital Services'), |
||
99 | 'VIDEO_GAME_SOFTWARE' => __('Software > Video Game Software'), |
||
100 | 'OTHER_SOFTWARES' => __('Software > Other Softwares'), |
||
101 | 'SPORTING_GOODS' => __('Sporting Goods'), |
||
102 | 'TOYS_AND_GAMES' => __('Toys and Games'), |
||
103 | 'VEHICLES_AND_PARTS' => __('Vehicles and Parts'), |
||
104 | 'BOOKS' => __('Books'), |
||
105 | 'DVDS_AND_VIDEOS' => __('Dvds and Videos'), |
||
106 | 'MAGAZINES_AND_NEWSPAPERS' => __('Magazines and Newspapers'), |
||
107 | 'MUSIC' => __('Music'), |
||
108 | 'CDS_AND_LPS' => __('Music > Cds and Lps'), |
||
109 | 'MUSICAL_INSTRUMENTS' => __('Music > Musical Instruments'), |
||
110 | 'DIGITAL_MUSIC' => __('Music > Digital Music'), |
||
111 | 'OTHER_MUSIC_ITEMS' => __('Music > Other Music Items'), |
||
112 | 'OTHER_CATEGORIES' => __('Music > Other Categories'), |
||
113 | ]; |
||
116 |
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