Conditions | 12 |
Paths | 2048 |
Total Lines | 81 |
Code Lines | 57 |
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 namespace crocodicstudio\crudbooster\commands; |
||
114 | private function checkRequirements() |
||
115 | { |
||
116 | $this->info('System Requirements Checking:'); |
||
117 | $system_failed = 0; |
||
118 | $laravel = app(); |
||
119 | |||
120 | if ($laravel::VERSION >= 5.3) { |
||
121 | $this->info('Laravel Version (>= 5.3.*): [Good]'); |
||
122 | } else { |
||
123 | $this->info('Laravel Version (>= 5.3.*): [Bad]'); |
||
124 | $system_failed++; |
||
125 | } |
||
126 | |||
127 | if (version_compare(phpversion(), '5.6.0', '>=')) { |
||
128 | $this->info('PHP Version (>= 5.6.*): [Good]'); |
||
129 | } else { |
||
130 | $this->info('PHP Version (>= 5.6.*): [Bad] Yours: '.phpversion()); |
||
131 | $system_failed++; |
||
132 | } |
||
133 | |||
134 | if (extension_loaded('mbstring')) { |
||
135 | $this->info('Mbstring extension: [Good]'); |
||
136 | } else { |
||
137 | $this->info('Mbstring extension: [Bad]'); |
||
138 | $system_failed++; |
||
139 | } |
||
140 | |||
141 | if (extension_loaded('openssl')) { |
||
142 | $this->info('OpenSSL extension: [Good]'); |
||
143 | } else { |
||
144 | $this->info('OpenSSL extension: [Bad]'); |
||
145 | $system_failed++; |
||
146 | } |
||
147 | |||
148 | if (extension_loaded('pdo')) { |
||
149 | $this->info('PDO extension: [Good]'); |
||
150 | } else { |
||
151 | $this->info('PDO extension: [Bad]'); |
||
152 | $system_failed++; |
||
153 | } |
||
154 | |||
155 | if (extension_loaded('tokenizer')) { |
||
156 | $this->info('Tokenizer extension: [Good]'); |
||
157 | } else { |
||
158 | $this->info('Tokenizer extension: [Bad]'); |
||
159 | $system_failed++; |
||
160 | } |
||
161 | |||
162 | if (extension_loaded('xml')) { |
||
163 | $this->info('XML extension: [Good]'); |
||
164 | } else { |
||
165 | $this->info('XML extension: [Bad]'); |
||
166 | $system_failed++; |
||
167 | } |
||
168 | |||
169 | if (extension_loaded('gd')) { |
||
170 | $this->info('GD extension: [Good]'); |
||
171 | } else { |
||
172 | $this->info('GD extension: [Bad]'); |
||
173 | $system_failed++; |
||
174 | } |
||
175 | |||
176 | if (extension_loaded('fileinfo')) { |
||
177 | $this->info('PHP Fileinfo extension: [Good]'); |
||
178 | } else { |
||
179 | $this->info('PHP Fileinfo extension: [Bad]'); |
||
180 | $system_failed++; |
||
181 | } |
||
182 | |||
183 | if (is_writable(base_path('public'))) { |
||
184 | $this->info('public dir is writable: [Good]'); |
||
185 | } else { |
||
186 | $this->info('public dir is writable: [Bad]'); |
||
187 | $system_failed++; |
||
188 | } |
||
189 | |||
190 | if ($system_failed != 0) { |
||
191 | $this->info('Sorry unfortunately your system is not meet with our requirements !'); |
||
192 | $this->footer(false); |
||
193 | } |
||
194 | $this->info('--'); |
||
195 | } |
||
226 |
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