| Conditions | 1 |
| Paths | 1 |
| Total Lines | 400 |
| Code Lines | 193 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| 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 |
||
| 726 | public function getMaterialIdList(): array |
||
| 727 | { |
||
| 728 | return [ |
||
| 729 | [ |
||
| 730 | 'name' => '相似推荐', |
||
| 731 | 'list' => [ |
||
| 732 | [ |
||
| 733 | 'name' => '相似推荐', |
||
| 734 | 'material_id' => 13256 |
||
| 735 | ] |
||
| 736 | ] |
||
| 737 | ], |
||
| 738 | [ |
||
| 739 | 'name' => '官方推荐', |
||
| 740 | 'list' => [ |
||
| 741 | [ |
||
| 742 | 'name' => '聚划算满减满折', |
||
| 743 | 'material_id' => 32366 |
||
| 744 | ], |
||
| 745 | [ |
||
| 746 | 'name' => '猫超满减满折', |
||
| 747 | 'material_id' => 27160 |
||
| 748 | ] |
||
| 749 | ] |
||
| 750 | ], |
||
| 751 | [ |
||
| 752 | 'name' => '猜你喜欢', |
||
| 753 | 'list' => [ |
||
| 754 | [ |
||
| 755 | 'name' => '含全部商品', |
||
| 756 | 'material_id' => 6708 |
||
| 757 | ], |
||
| 758 | [ |
||
| 759 | 'name' => '营销商品库商品(此为具备“私域用户管理-会员运营管理功能”的媒体专用)', |
||
| 760 | 'material_id' => 28017 |
||
| 761 | ] |
||
| 762 | ] |
||
| 763 | ], |
||
| 764 | [ |
||
| 765 | 'name' => '好券直播', |
||
| 766 | 'list' => [ |
||
| 767 | [ |
||
| 768 | 'name' => '综合', |
||
| 769 | 'material_id' => 3756 |
||
| 770 | ], |
||
| 771 | [ |
||
| 772 | 'name' => '女装', |
||
| 773 | 'material_id' => 3767 |
||
| 774 | ], |
||
| 775 | [ |
||
| 776 | 'name' => '家居家装', |
||
| 777 | 'material_id' => 3758 |
||
| 778 | ], |
||
| 779 | [ |
||
| 780 | 'name' => '数码家电', |
||
| 781 | 'material_id' => 3759 |
||
| 782 | ], |
||
| 783 | [ |
||
| 784 | 'name' => '鞋包配饰', |
||
| 785 | 'material_id' => 3762 |
||
| 786 | ], |
||
| 787 | [ |
||
| 788 | 'name' => '美妆个护', |
||
| 789 | 'material_id' => 3763 |
||
| 790 | ], |
||
| 791 | [ |
||
| 792 | 'name' => '男装', |
||
| 793 | 'material_id' => 3764 |
||
| 794 | ], |
||
| 795 | [ |
||
| 796 | 'name' => '内衣', |
||
| 797 | 'material_id' => 3765 |
||
| 798 | ], |
||
| 799 | [ |
||
| 800 | 'name' => '母婴', |
||
| 801 | 'material_id' => 3760 |
||
| 802 | ], |
||
| 803 | [ |
||
| 804 | 'name' => '食品', |
||
| 805 | 'material_id' => 3761 |
||
| 806 | ], |
||
| 807 | [ |
||
| 808 | 'name' => '运动户外', |
||
| 809 | 'material_id' => 3766 |
||
| 810 | ] |
||
| 811 | ] |
||
| 812 | ], |
||
| 813 | [ |
||
| 814 | 'name' => '实时热销榜', |
||
| 815 | 'list' => [ |
||
| 816 | [ |
||
| 817 | 'name' => '综合', |
||
| 818 | 'material_id' => 28026 |
||
| 819 | ], |
||
| 820 | [ |
||
| 821 | 'name' => '大服饰', |
||
| 822 | 'material_id' => 28029 |
||
| 823 | ], |
||
| 824 | [ |
||
| 825 | 'name' => '大快消', |
||
| 826 | 'material_id' => 28027 |
||
| 827 | ], |
||
| 828 | [ |
||
| 829 | 'name' => '电器美家', |
||
| 830 | 'material_id' => 28028 |
||
| 831 | ] |
||
| 832 | ] |
||
| 833 | ], |
||
| 834 | [ |
||
| 835 | 'name' => '本地化生活', |
||
| 836 | 'list' => [ |
||
| 837 | [ |
||
| 838 | 'name' => '今日爆款(综合类目)', |
||
| 839 | 'material_id' => 30443 |
||
| 840 | ], |
||
| 841 | [ |
||
| 842 | 'name' => '淘票票(电影代金券)', |
||
| 843 | 'material_id' => 19812 |
||
| 844 | ], |
||
| 845 | [ |
||
| 846 | 'name' => '大麦网(演出/演唱会/剧目/会展)', |
||
| 847 | 'material_id' => 25378 |
||
| 848 | ], |
||
| 849 | [ |
||
| 850 | 'name' => '优酷会员(视频年卡)', |
||
| 851 | 'material_id' => 28636 |
||
| 852 | ], |
||
| 853 | [ |
||
| 854 | 'name' => '有声内容(喜马拉雅年卡,儿童节目等)', |
||
| 855 | 'material_id' => 29105 |
||
| 856 | ], |
||
| 857 | [ |
||
| 858 | 'name' => '阿里健康(hpv疫苗预约)', |
||
| 859 | 'material_id' => 25885 |
||
| 860 | ], |
||
| 861 | [ |
||
| 862 | 'name' => '阿里健康(体检)', |
||
| 863 | 'material_id' => 25886 |
||
| 864 | ], |
||
| 865 | [ |
||
| 866 | 'name' => '阿里健康(口腔)', |
||
| 867 | 'material_id' => 25888 |
||
| 868 | ], |
||
| 869 | [ |
||
| 870 | 'name' => '阿里健康(基因检测)', |
||
| 871 | 'material_id' => 25890 |
||
| 872 | ], |
||
| 873 | [ |
||
| 874 | 'name' => '飞猪(签证)', |
||
| 875 | 'material_id' => 26077 |
||
| 876 | ], |
||
| 877 | [ |
||
| 878 | 'name' => '飞猪(酒店)', |
||
| 879 | 'material_id' => 27913 |
||
| 880 | ], |
||
| 881 | [ |
||
| 882 | 'name' => '飞猪(自助餐)', |
||
| 883 | 'material_id' => 27914 |
||
| 884 | ], |
||
| 885 | [ |
||
| 886 | 'name' => '飞猪(门票)', |
||
| 887 | 'material_id' => 19811 |
||
| 888 | ], |
||
| 889 | [ |
||
| 890 | 'name' => '口碑(肯德基/必胜客/麦当劳)', |
||
| 891 | 'material_id' => 19810 |
||
| 892 | ], |
||
| 893 | [ |
||
| 894 | 'name' => '口碑(生活服务)', |
||
| 895 | 'material_id' => 28888 |
||
| 896 | ], |
||
| 897 | [ |
||
| 898 | 'name' => '天猫无忧购(家政服务)', |
||
| 899 | 'material_id' => 19814 |
||
| 900 | ], |
||
| 901 | [ |
||
| 902 | 'name' => '汽车定金(汽车定金)', |
||
| 903 | 'material_id' => 28397 |
||
| 904 | ], |
||
| 905 | ] |
||
| 906 | ], |
||
| 907 | [ |
||
| 908 | 'name' => '大额券', |
||
| 909 | 'list' => [ |
||
| 910 | [ |
||
| 911 | 'name' => '综合', |
||
| 912 | 'material_id' => 27446 |
||
| 913 | ], |
||
| 914 | [ |
||
| 915 | 'name' => '女装', |
||
| 916 | 'material_id' => 27448 |
||
| 917 | ], |
||
| 918 | [ |
||
| 919 | 'name' => '食品', |
||
| 920 | 'material_id' => 27451 |
||
| 921 | ], |
||
| 922 | [ |
||
| 923 | 'name' => '美妆个护', |
||
| 924 | 'material_id' => 27453 |
||
| 925 | ], |
||
| 926 | [ |
||
| 927 | 'name' => '家居家装', |
||
| 928 | 'material_id' => 27798 |
||
| 929 | ], |
||
| 930 | [ |
||
| 931 | 'name' => '母婴', |
||
| 932 | 'material_id' => 27454 |
||
| 933 | ] |
||
| 934 | ] |
||
| 935 | ], |
||
| 936 | [ |
||
| 937 | 'name' => '高佣榜', |
||
| 938 | 'list' => [ |
||
| 939 | [ |
||
| 940 | 'name' => '综合', |
||
| 941 | 'material_id' => 13366 |
||
| 942 | ], |
||
| 943 | [ |
||
| 944 | 'name' => '女装', |
||
| 945 | 'material_id' => 13367 |
||
| 946 | ], |
||
| 947 | [ |
||
| 948 | 'name' => '家居家装', |
||
| 949 | 'material_id' => 13368 |
||
| 950 | ], |
||
| 951 | [ |
||
| 952 | 'name' => '数码家电', |
||
| 953 | 'material_id' => 13369 |
||
| 954 | ], |
||
| 955 | [ |
||
| 956 | 'name' => '鞋包配饰', |
||
| 957 | 'material_id' => 13370 |
||
| 958 | ], |
||
| 959 | [ |
||
| 960 | 'name' => '美妆个护', |
||
| 961 | 'material_id' => 13371 |
||
| 962 | ], |
||
| 963 | [ |
||
| 964 | 'name' => '男装', |
||
| 965 | 'material_id' => 13372 |
||
| 966 | ], |
||
| 967 | [ |
||
| 968 | 'name' => '内衣', |
||
| 969 | 'material_id' => 13373 |
||
| 970 | ], |
||
| 971 | [ |
||
| 972 | 'name' => '母婴', |
||
| 973 | 'material_id' => 13374 |
||
| 974 | ], |
||
| 975 | [ |
||
| 976 | 'name' => '食品', |
||
| 977 | 'material_id' => 13375 |
||
| 978 | ], |
||
| 979 | [ |
||
| 980 | 'name' => '运动户外', |
||
| 981 | 'material_id' => 13376 |
||
| 982 | ] |
||
| 983 | ] |
||
| 984 | ], |
||
| 985 | [ |
||
| 986 | 'name' => '品牌券', |
||
| 987 | 'list' => [ |
||
| 988 | [ |
||
| 989 | 'name' => '综合', |
||
| 990 | 'material_id' => 3786 |
||
| 991 | ], |
||
| 992 | [ |
||
| 993 | 'name' => '女装', |
||
| 994 | 'material_id' => 3788 |
||
| 995 | ], |
||
| 996 | [ |
||
| 997 | 'name' => '家居家装', |
||
| 998 | 'material_id' => 3792 |
||
| 999 | ], |
||
| 1000 | [ |
||
| 1001 | 'name' => '数码家电', |
||
| 1002 | 'material_id' => 3793 |
||
| 1003 | ], |
||
| 1004 | [ |
||
| 1005 | 'name' => '鞋包配饰', |
||
| 1006 | 'material_id' => 3796 |
||
| 1007 | ], |
||
| 1008 | [ |
||
| 1009 | 'name' => '美妆个护', |
||
| 1010 | 'material_id' => 3794 |
||
| 1011 | ], |
||
| 1012 | [ |
||
| 1013 | 'name' => '男装', |
||
| 1014 | 'material_id' => 3790 |
||
| 1015 | ], |
||
| 1016 | [ |
||
| 1017 | 'name' => '内衣', |
||
| 1018 | 'material_id' => 3787 |
||
| 1019 | ], |
||
| 1020 | [ |
||
| 1021 | 'name' => '母婴', |
||
| 1022 | 'material_id' => 3789 |
||
| 1023 | ], |
||
| 1024 | [ |
||
| 1025 | 'name' => '食品', |
||
| 1026 | 'material_id' => 3791 |
||
| 1027 | ], |
||
| 1028 | [ |
||
| 1029 | 'name' => '运动户外', |
||
| 1030 | 'material_id' => 3795 |
||
| 1031 | ], |
||
| 1032 | ] |
||
| 1033 | ], |
||
| 1034 | [ |
||
| 1035 | 'name' => '猫超优质爆款', |
||
| 1036 | 'list' => [ |
||
| 1037 | [ |
||
| 1038 | 'name' => '猫超1元购凑单', |
||
| 1039 | 'material_id' => 27162 |
||
| 1040 | ], |
||
| 1041 | [ |
||
| 1042 | 'name' => '猫超第二件0元', |
||
| 1043 | 'material_id' => 27161 |
||
| 1044 | ], |
||
| 1045 | [ |
||
| 1046 | 'name' => '猫超单件满减包邮', |
||
| 1047 | 'material_id' => 27160 |
||
| 1048 | ], |
||
| 1049 | ] |
||
| 1050 | ], |
||
| 1051 | [ |
||
| 1052 | 'name' => '聚划算单品爆款', |
||
| 1053 | 'list' => [ |
||
| 1054 | [ |
||
| 1055 | 'name' => '开团热卖中', |
||
| 1056 | 'material_id' => 31371 |
||
| 1057 | ], |
||
| 1058 | [ |
||
| 1059 | 'name' => '预热', |
||
| 1060 | 'material_id' => 31370 |
||
| 1061 | ], |
||
| 1062 | ] |
||
| 1063 | ], |
||
| 1064 | [ |
||
| 1065 | 'name' => '天天特卖', |
||
| 1066 | 'list' => [ |
||
| 1067 | [ |
||
| 1068 | 'name' => '开团热卖中', |
||
| 1069 | 'material_id' => 31362 |
||
| 1070 | ], |
||
| 1071 | ] |
||
| 1072 | ], |
||
| 1073 | [ |
||
| 1074 | 'name' => '母婴主题', |
||
| 1075 | 'list' => [ |
||
| 1076 | [ |
||
| 1077 | 'name' => '备孕', |
||
| 1078 | 'material_id' => 4040 |
||
| 1079 | ], |
||
| 1080 | [ |
||
| 1081 | 'name' => '0至6个月', |
||
| 1082 | 'material_id' => 4041 |
||
| 1083 | ], |
||
| 1084 | [ |
||
| 1085 | 'name' => '4至6岁', |
||
| 1086 | 'material_id' => 4044 |
||
| 1087 | ], |
||
| 1088 | [ |
||
| 1089 | 'name' => '7至12个月', |
||
| 1090 | 'material_id' => 4042 |
||
| 1091 | ], |
||
| 1092 | [ |
||
| 1093 | 'name' => '1至3岁', |
||
| 1094 | 'material_id' => 4043 |
||
| 1095 | ], |
||
| 1096 | [ |
||
| 1097 | 'name' => '7至12岁', |
||
| 1098 | 'material_id' => 4045 |
||
| 1099 | ], |
||
| 1100 | ] |
||
| 1101 | ], |
||
| 1102 | [ |
||
| 1103 | 'name' => '有好货', |
||
| 1104 | 'list' => [ |
||
| 1105 | [ |
||
| 1106 | 'name' => '有好货', |
||
| 1107 | 'material_id' => 4092 |
||
| 1108 | ], |
||
| 1109 | ] |
||
| 1110 | ], |
||
| 1111 | [ |
||
| 1112 | 'name' => '潮流范', |
||
| 1113 | 'list' => [ |
||
| 1114 | [ |
||
| 1115 | 'name' => '潮流范', |
||
| 1116 | 'material_id' => 4093 |
||
| 1117 | ], |
||
| 1118 | ] |
||
| 1119 | ], |
||
| 1120 | [ |
||
| 1121 | 'name' => '特惠', |
||
| 1122 | 'list' => [ |
||
| 1123 | [ |
||
| 1124 | 'name' => '特惠', |
||
| 1125 | 'material_id' => 4094 |
||
| 1126 | ], |
||
| 1132 |
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