Conditions | 1 |
Paths | 1 |
Total Lines | 89 |
Lines | 89 |
Ratio | 100 % |
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 |
||
35 | View Code Duplication | public function dataForDeclension3(): array |
|
36 | { |
||
37 | return [ |
||
38 | 'ად' => [ |
||
39 | 'word' => 'მოჰამმად', |
||
40 | 'turned' => 'მოჰამმადს', |
||
41 | ], |
||
42 | 'ან' => [ |
||
43 | 'word' => 'მარქარიან', |
||
44 | 'turned' => 'მარქარიანს', |
||
45 | ], |
||
46 | 'დე' => [ |
||
47 | 'word' => 'მენაბდე', |
||
48 | 'turned' => 'მენაბდეს', |
||
49 | ], |
||
50 | 'დი' => [ |
||
51 | 'word' => 'მაჰდი', |
||
52 | 'turned' => 'მაჰდის', |
||
53 | ], |
||
54 | 'ვა' => [ |
||
55 | 'word' => 'სიჭინავა', |
||
56 | 'turned' => 'სიჭინავას', |
||
57 | ], |
||
58 | 'ვი' => [ |
||
59 | 'word' => 'ბარნოვი', |
||
60 | 'turned' => 'ბარნოვს', |
||
61 | ], |
||
62 | 'ია' => [ |
||
63 | 'word' => 'დანელია', |
||
64 | 'turned' => 'დანელიას', |
||
65 | ], |
||
66 | 'კა' => [ |
||
67 | 'word' => 'ოდინაკა', |
||
68 | 'turned' => 'ოდინაკას', |
||
69 | ], |
||
70 | 'კი' => [ |
||
71 | 'word' => 'კანდელაკი', |
||
72 | 'turned' => 'კანდელაკს', |
||
73 | ], |
||
74 | 'კო' => [ |
||
75 | 'word' => 'ბოიჩენკო', |
||
76 | 'turned' => 'ბოიჩენკოს', |
||
77 | ], |
||
78 | 'ლი' => [ |
||
79 | 'word' => 'ქევხიშვილი', |
||
80 | 'turned' => 'ქევხიშვილს', |
||
81 | ], |
||
82 | 'ნი' => [ |
||
83 | 'word' => 'გელბახიანი', |
||
84 | 'turned' => 'გელბახიანს', |
||
85 | ], |
||
86 | 'რი' => [ |
||
87 | 'word' => 'თაბაგარი', |
||
88 | 'turned' => 'თაბაგარს', |
||
89 | ], |
||
90 | 'სი' => [ |
||
91 | 'word' => 'მეღვინეთუხუცესი', |
||
92 | 'turned' => 'მეღვინეთუხუცესს', |
||
93 | ], |
||
94 | 'ტი' => [ |
||
95 | 'word' => 'ღლონტი', |
||
96 | 'turned' => 'ღლონტს', |
||
97 | ], |
||
98 | 'უა' => [ |
||
99 | 'word' => 'თოდუა', |
||
100 | 'turned' => 'თოდუას', |
||
101 | ], |
||
102 | 'ში' => [ |
||
103 | 'word' => 'ტუღუში', |
||
104 | 'turned' => 'ტუღუშს', |
||
105 | ], |
||
106 | 'ცი' => [ |
||
107 | 'word' => 'ახალკაცი', |
||
108 | 'turned' => 'ახალკაცს', |
||
109 | ], |
||
110 | 'ძე' => [ |
||
111 | 'word' => 'კიკაბიძე', |
||
112 | 'turned' => 'კიკაბიძეს', |
||
113 | ], |
||
114 | 'ხი' => [ |
||
115 | 'word' => 'მესხი', |
||
116 | 'turned' => 'მესხს', |
||
117 | ], |
||
118 | '*' => [ |
||
119 | 'word' => 'ბჰაილალბჰაი', |
||
120 | 'turned' => 'ბჰაილალბჰაის', |
||
121 | ], |
||
122 | ]; |
||
123 | } |
||
124 | |||
220 |