Passed
Push — master ( 2da96f...f3a9cc )
by Matias
13:54
created

Requirements::memoriesIsInstalled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
namespace OCA\FaceRecognition\Helper;
3
4
use OCP\App\IAppManager;
5
6
use OCA\FaceRecognition\Helper\MemoryLimits;
7
8
use OCA\FaceRecognition\Service\SettingsService;
9
10
class Requirements
11
{
12 1
	public static function hasEnoughMemory(): bool {
13 1
		$memory = MemoryLimits::getSystemMemory();
14 1
		return ($memory > SettingsService::MINIMUM_SYSTEM_MEMORY_REQUIREMENTS);
15
	}
16
17 1
	public static function pdlibLoaded(): bool {
18 1
		return extension_loaded('pdlib');
19
	}
20
21
	public static function memoriesIsInstalled(): bool {
22
		$appManager = \OC::$server->get(IAppManager::class);
23
		return $appManager->isEnabledForUser('memories');
24
	}
25
26
}
27