| Conditions | 7 |
| Paths | 7 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 77 | private function hasEnabled ( $type ) |
||
| 78 | { |
||
| 79 | switch ( $type ) |
||
| 80 | { |
||
| 81 | case 'curl': |
||
| 82 | return function_exists ( 'fopen' ) && function_exists ( 'curl_exec' ); |
||
| 83 | break; |
||
| 84 | case 'file_content': |
||
| 85 | return function_exists ( 'file_get_contents' ) && function_exists ( 'stream_get_contents' ); |
||
| 86 | break; |
||
| 87 | case 'steam_content': |
||
| 88 | return function_exists ( 'fopen' ) && function_exists ( 'stream_get_contents' ); |
||
| 89 | break; |
||
| 90 | } |
||
| 91 | |||
| 92 | throw new \Exception("\033[0;31mError: enable in php.ini 'file_get_contents' and 'stream_get_contents' or 'fopen' and 'curl'. \033[0m\n"); |
||
| 93 | } |
||
| 94 | |||
| 95 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..