| Conditions | 19 | 
| Paths | 19 | 
| Total Lines | 81 | 
| Code Lines | 65 | 
| Lines | 39 | 
| Ratio | 48.15 % | 
| 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  | 
            ||
| 113 | public function getFieldValue($fieldtype = "", $options = "", $value = 0)  | 
            ||
| 114 |     { | 
            ||
| 115 | global $myts, $moddir;  | 
            ||
| 116 |         switch ($fieldtype) { | 
            ||
| 117 | case "dhtml":  | 
            ||
| 118 | return $myts->displayTarea($value);  | 
            ||
| 119 | break;  | 
            ||
| 120 | //case "gmap":  | 
            ||
| 121 | // $gmapHandler = new efqGmapHandler();  | 
            ||
| 122 | // $gmap = new efqGmap();  | 
            ||
| 123 | // $gmap->setPointsJS($gmapHandler->getPointsJS($gmap));  | 
            ||
| 124 | // $gmap->generateMap();  | 
            ||
| 125 | // $ret = $gmap->showMap();  | 
            ||
| 126 | // unset($gmap);  | 
            ||
| 127 | // unset($gmapHandler);  | 
            ||
| 128 | //return $myts->makeTboxData4Show($value);  | 
            ||
| 129 | //break;  | 
            ||
| 130 | case "radio":  | 
            ||
| 131 | return $myts->makeTboxData4Show($value);  | 
            ||
| 132 | break;  | 
            ||
| 133 | View Code Duplication | case "rating":  | 
            |
| 134 | $xoops_url = XOOPS_URL;  | 
            ||
| 135 |                 switch ($value) { | 
            ||
| 136 | case 1:  | 
            ||
| 137 | $src = "$xoops_url/modules/$moddir/assets/images/rating_1.gif";  | 
            ||
| 138 | break;  | 
            ||
| 139 | case 2:  | 
            ||
| 140 | $src = "$xoops_url/modules/$moddir/assets/images/rating_2.gif";  | 
            ||
| 141 | break;  | 
            ||
| 142 | case 3:  | 
            ||
| 143 | $src = "$xoops_url/modules/$moddir/assets/images/rating_3.gif";  | 
            ||
| 144 | break;  | 
            ||
| 145 | case 4:  | 
            ||
| 146 | $src = "$xoops_url/modules/$moddir/assets/images/rating_4.gif";  | 
            ||
| 147 | break;  | 
            ||
| 148 | case 5:  | 
            ||
| 149 | $src = "$xoops_url/modules/$moddir/assets/images/rating_5.gif";  | 
            ||
| 150 | break;  | 
            ||
| 151 | case 6:  | 
            ||
| 152 | $src = "$xoops_url/modules/$moddir/assets/images/rating_6.gif";  | 
            ||
| 153 | break;  | 
            ||
| 154 | case 7:  | 
            ||
| 155 | $src = "$xoops_url/modules/$moddir/assets/images/rating_7.gif";  | 
            ||
| 156 | break;  | 
            ||
| 157 | case 8:  | 
            ||
| 158 | $src = "$xoops_url/modules/$moddir/assets/images/rating_8.gif";  | 
            ||
| 159 | break;  | 
            ||
| 160 | case 9:  | 
            ||
| 161 | $src = "$xoops_url/modules/$moddir/assets/images/rating_9.gif";  | 
            ||
| 162 | break;  | 
            ||
| 163 | case 10:  | 
            ||
| 164 | $src = "$xoops_url/modules/$moddir/assets/images/rating_10.gif";  | 
            ||
| 165 | break;  | 
            ||
| 166 | default:  | 
            ||
| 167 | $src = "";  | 
            ||
| 168 | }  | 
            ||
| 169 | $rating = "<img src=\"$src\" />";  | 
            ||
| 170 | |||
| 171 | return $rating;  | 
            ||
| 172 | break;  | 
            ||
| 173 | case "select":  | 
            ||
| 174 | return $myts->makeTboxData4Show($value);  | 
            ||
| 175 | break;  | 
            ||
| 176 | case "textbox":  | 
            ||
| 177 | return $myts->makeTboxData4Show($value);  | 
            ||
| 178 | break;  | 
            ||
| 179 | case "url":  | 
            ||
| 180 |                 $link = explode('|', $value); | 
            ||
| 181 | |||
| 182 | return '<a href="' . $myts->makeTboxData4Show($link[0]) . '" title="' . $myts->makeTboxData4Show($link[1]) . '">' . $myts->makeTboxData4Show($link[0]) . '</a>';  | 
            ||
| 183 | break;  | 
            ||
| 184 | case "yesno":  | 
            ||
| 185 |                 if ($value == '1') { | 
            ||
| 186 | return _YES;  | 
            ||
| 187 |                 } else { | 
            ||
| 188 | return _NO;  | 
            ||
| 189 | }  | 
            ||
| 190 | break;  | 
            ||
| 191 | default:  | 
            ||
| 192 | return $myts->makeTboxData4Show($value);  | 
            ||
| 193 | break;  | 
            ||
| 194 | }  | 
            ||
| 197 | 
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