chore: fix the last psalm errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Родитель
c8af84e090
Коммит
b2331386b7
|
@ -96,17 +96,14 @@ class ExifGeoData extends \stdClass implements \JsonSerializable {
|
|||
protected $exif_data = null;
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
*
|
||||
* @return array|null
|
||||
* @throws PelInvalidArgumentException
|
||||
*/
|
||||
protected static function get_exif_data_array(string $path) : array {
|
||||
if (function_exists('exif_read_data')) {
|
||||
$data = @exif_read_data($path, null, true);
|
||||
if ($data && isset($data['EXIF']) && isset($data['EXIF'][self::LATITUDE]) && isset($data['EXIF'][self::LONGITUDE])) {
|
||||
if ($data && isset($data['EXIF']) && is_array($data['EXIF']) && isset($data['EXIF'][self::LATITUDE]) && isset($data['EXIF'][self::LONGITUDE])) {
|
||||
return $data['EXIF'];
|
||||
} elseif ($data && isset($data['GPS']) && isset($data['GPS'][self::LATITUDE]) && isset($data['GPS'][self::LONGITUDE])) {
|
||||
} elseif ($data && isset($data['GPS']) && is_array($data['GPS']) && isset($data['GPS'][self::LATITUDE]) && isset($data['GPS'][self::LONGITUDE])) {
|
||||
$d = $data['GPS'];
|
||||
if (!isset($d[self::TIMESTAMP]) && isset($data['EXIF'][self::TIMESTAMP])) {
|
||||
$d[self::TIMESTAMP] = $data['EXIF'][self::TIMESTAMP];
|
||||
|
|
|
@ -16,10 +16,10 @@ use OC\Files\Filesystem;
|
|||
use OCA\Maps\Service\PhotofilesService;
|
||||
use OCA\Maps\Service\TracksService;
|
||||
use OCP\Files\FileInfo;
|
||||
use OCP\Files\IHomeStorage;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\ILogger;
|
||||
use OCP\Lock\ILockingProvider;
|
||||
|
||||
use OCP\Share;
|
||||
use OCP\Util;
|
||||
|
||||
|
@ -179,12 +179,8 @@ class FileHooks {
|
|||
return $this->root->get($fullPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ugly Hack, find API way to check if file is added by user.
|
||||
*/
|
||||
private function isUserNode(\OCP\Files\Node $node) {
|
||||
//return strpos($node->getStorage()->getId(), "home::", 0) === 0;
|
||||
return $node->getStorage()->instanceOfStorage('\OC\Files\Storage\Home');
|
||||
private function isUserNode(\OCP\Files\Node $node): bool {
|
||||
return $node->getStorage()->instanceOfStorage(IHomeStorage::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче