| Total Complexity | 7 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 58.33% |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class Requirements |
||
| 9 | { |
||
| 10 | public static function hasEnoughMemory() { |
||
| 11 | $memory = MemoryLimits::getSystemMemory(); |
||
| 12 | return ($memory > SettingsService::MINIMUM_SYSTEM_MEMORY_REQUIREMENTS); |
||
| 13 | } |
||
| 14 | |||
| 15 | public static function pdlibLoaded() { |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Determines if FaceRecognition can work with a givem image type. This is determined as |
||
| 21 | * intersection of types that are supported in Nextcloud and types that are supported in DLIB. |
||
| 22 | * |
||
| 23 | * Dlib support can be found here: |
||
| 24 | * https://github.com/davisking/dlib/blob/9b82f4b0f65a2152b4a4243c15709e5cb83f7044/dlib/image_loader/load_image.h#L21 |
||
| 25 | * |
||
| 26 | * Note that Dlib supports these if it is compiled with them only! (with libjpeg, libpng...) |
||
| 27 | * |
||
| 28 | * Based on that and the fact that Nextcloud is superset of these, these are supported image types. |
||
| 29 | * |
||
| 30 | * @param string $mimeType MIME type to check if it supported |
||
| 31 | * @return true if MIME type is supported, false otherwise |
||
| 32 | */ |
||
| 33 | 8 | public static function isImageTypeSupported(string $mimeType): bool { |
|
| 45 |