diff --git a/appinfo/routes.php b/appinfo/routes.php index 3c2efddb5..9993f8d0e 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -19,7 +19,6 @@ ['name' => 'PublicPage#showAuthenticate', 'url' => '/s/{token}/authenticate/{redirect}', 'verb' => 'GET'], ['name' => 'PublicPage#authenticate', 'url' => '/s/{token}/authenticate/{redirect}', 'verb' => 'POST'], - // utils ['name' => 'utils#getOptionsValues', 'url' => '/getOptionsValues', 'verb' => 'GET'], ['name' => 'utils#saveOptionValue', 'url' => '/saveOptionValue', 'verb' => 'POST'], diff --git a/lib/BackgroundJob/AddPhotoJob.php b/lib/BackgroundJob/AddPhotoJob.php index 8f124608d..53d42cdeb 100644 --- a/lib/BackgroundJob/AddPhotoJob.php +++ b/lib/BackgroundJob/AddPhotoJob.php @@ -17,7 +17,6 @@ use OCP\BackgroundJob\QueuedJob; use OCP\Files\IRootFolder; use OCP\ICache; - use OCP\ICacheFactory; class AddPhotoJob extends QueuedJob { diff --git a/lib/BackgroundJob/UpdatePhotoByFileJob.php b/lib/BackgroundJob/UpdatePhotoByFileJob.php index 42dffbbd8..8edf71fb6 100644 --- a/lib/BackgroundJob/UpdatePhotoByFileJob.php +++ b/lib/BackgroundJob/UpdatePhotoByFileJob.php @@ -17,7 +17,6 @@ use OCP\BackgroundJob\QueuedJob; use OCP\Files\IRootFolder; use OCP\ICache; - use OCP\ICacheFactory; class UpdatePhotoByFileJob extends QueuedJob { diff --git a/lib/BackgroundJob/UserInstallScanJob.php b/lib/BackgroundJob/UserInstallScanJob.php index daf12e60e..474a8c5b4 100644 --- a/lib/BackgroundJob/UserInstallScanJob.php +++ b/lib/BackgroundJob/UserInstallScanJob.php @@ -17,7 +17,6 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\IJobList; use OCP\BackgroundJob\QueuedJob; - use OCP\IConfig; use OCP\IUserManager; use Psr\Log\LoggerInterface; diff --git a/lib/Command/RescanPhotos.php b/lib/Command/RescanPhotos.php index fe2595292..7849b2dd2 100644 --- a/lib/Command/RescanPhotos.php +++ b/lib/Command/RescanPhotos.php @@ -21,7 +21,6 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; - use Symfony\Component\Console\Output\OutputInterface; class RescanPhotos extends Command { diff --git a/lib/Command/RescanTracks.php b/lib/Command/RescanTracks.php index da65fc05b..1826f9e71 100644 --- a/lib/Command/RescanTracks.php +++ b/lib/Command/RescanTracks.php @@ -20,7 +20,6 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; - use Symfony\Component\Console\Output\OutputInterface; class RescanTracks extends Command { diff --git a/lib/Controller/ContactsController.php b/lib/Controller/ContactsController.php index c068c3120..72612f2cf 100644 --- a/lib/Controller/ContactsController.php +++ b/lib/Controller/ContactsController.php @@ -640,7 +640,6 @@ private function setAddressCoordinates(float $lat, float $lng, string $adr, stri } } - /** * get contacts with coordinates * diff --git a/lib/Controller/MyMapsController.php b/lib/Controller/MyMapsController.php index 3391e088e..9e2ab472a 100644 --- a/lib/Controller/MyMapsController.php +++ b/lib/Controller/MyMapsController.php @@ -20,7 +20,6 @@ class MyMapsController extends Controller { - public function __construct( string $AppName, IRequest $request, diff --git a/lib/Controller/PhotosController.php b/lib/Controller/PhotosController.php index 8a2035567..b45163a04 100644 --- a/lib/Controller/PhotosController.php +++ b/lib/Controller/PhotosController.php @@ -81,7 +81,6 @@ public function getNonLocalizedPhotos(?int $myMapId = null, ?string $timezone = return new DataResponse($result); } - /** * @param $paths * @param $lats diff --git a/lib/Controller/PublicContactsController.php b/lib/Controller/PublicContactsController.php index 0fb4f0036..748c9f5e7 100644 --- a/lib/Controller/PublicContactsController.php +++ b/lib/Controller/PublicContactsController.php @@ -212,7 +212,6 @@ private function N2FN(string $n): ?string { } } - /** * @throws NotFoundException * @throws NotPermittedException diff --git a/lib/Controller/PublicFavoritesApiController.php b/lib/Controller/PublicFavoritesApiController.php index 814ae1673..7832fba69 100644 --- a/lib/Controller/PublicFavoritesApiController.php +++ b/lib/Controller/PublicFavoritesApiController.php @@ -22,7 +22,6 @@ * */ - namespace OCA\Maps\Controller; use OCA\Maps\DB\FavoriteShareMapper; diff --git a/lib/Controller/PublicPhotosController.php b/lib/Controller/PublicPhotosController.php index 3d43d2cf4..eccce80f0 100644 --- a/lib/Controller/PublicPhotosController.php +++ b/lib/Controller/PublicPhotosController.php @@ -24,7 +24,6 @@ use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OCP\IAppConfig; - use OCP\IRequest; use OCP\ISession; use OCP\IURLGenerator; diff --git a/lib/Controller/PublicTracksController.php b/lib/Controller/PublicTracksController.php index f49038401..9b945b1c1 100644 --- a/lib/Controller/PublicTracksController.php +++ b/lib/Controller/PublicTracksController.php @@ -30,7 +30,6 @@ use OCP\Share; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager as ShareManager; - use function OCA\Maps\Helper\remove_utf8_bom; class PublicTracksController extends PublicPageController { diff --git a/lib/Controller/PublicUtilsController.php b/lib/Controller/PublicUtilsController.php index 20f6f3ea8..81fcd8024 100644 --- a/lib/Controller/PublicUtilsController.php +++ b/lib/Controller/PublicUtilsController.php @@ -177,7 +177,6 @@ public function getOptionsValues(): DataResponse { // Share map by sharing the folder $ov['isShareable'] = ($permissions & (1 << 4)) && $folder->isShareable(); - // get routing-specific admin settings values $settingsKeys = [ 'osrmCarURL', @@ -198,7 +197,6 @@ public function getOptionsValues(): DataResponse { return new DataResponse(['values' => $ov]); } - /** * Get content of mapbox traffic style */ diff --git a/lib/Controller/TracksController.php b/lib/Controller/TracksController.php index 92e7b1152..a2de6886a 100644 --- a/lib/Controller/TracksController.php +++ b/lib/Controller/TracksController.php @@ -20,7 +20,6 @@ use OCP\Files\IRootFolder; use OCP\IL10N; use OCP\IRequest; - use function OCA\Maps\Helper\remove_utf8_bom; class TracksController extends Controller { diff --git a/lib/Controller/UtilsController.php b/lib/Controller/UtilsController.php index f0c7b321e..5d17a334e 100644 --- a/lib/Controller/UtilsController.php +++ b/lib/Controller/UtilsController.php @@ -16,12 +16,8 @@ use OCP\App\IAppManager; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\ContentSecurityPolicy; - use OCP\AppFramework\Http\DataResponse; - - use OCP\Files\IRootFolder; - use OCP\Files\NotFoundException; use OCP\IConfig; use OCP\IRequest; @@ -29,7 +25,6 @@ class UtilsController extends Controller { - private $config; private $root; diff --git a/lib/DB/DeviceShareMapper.php b/lib/DB/DeviceShareMapper.php index f998c6ec9..70b352eff 100644 --- a/lib/DB/DeviceShareMapper.php +++ b/lib/DB/DeviceShareMapper.php @@ -102,7 +102,6 @@ public function create($deviceId, $timestampFrom, $timestampTo): Entity { return $this->insert($newShare); } - /** * @param $deviceId * @return DeviceShare[] diff --git a/lib/Helper/ExifGeoData.php b/lib/Helper/ExifGeoData.php index 8e1cde0e2..781ec6fb2 100644 --- a/lib/Helper/ExifGeoData.php +++ b/lib/Helper/ExifGeoData.php @@ -59,7 +59,6 @@ class ExifGeoData extends \stdClass implements \JsonSerializable { */ private const COORDINATE_MODULO = 60; - /** * Regex to extract date components from exif parameter */ @@ -245,7 +244,6 @@ private function string2time(string $timestamp): ?int { return $result; } - /** * @param $geo */ @@ -275,7 +273,6 @@ private function string2float(string $value): ?float { $result = floatval($value); } return $result; - } public function isZeroIsland(): bool { diff --git a/lib/Service/AddressService.php b/lib/Service/AddressService.php index ae8192337..3454e79ac 100644 --- a/lib/Service/AddressService.php +++ b/lib/Service/AddressService.php @@ -198,7 +198,6 @@ private function lookupAddressExternal(string $adr): array { $query_adr = 'q=' . urlencode(implode(', ', $splitted_adr)); } - $result_json = @file_get_contents( 'https://nominatim.openstreetmap.org/search?format=jsonv2&' . $query_adr, false, diff --git a/lib/Service/FavoritesService.php b/lib/Service/FavoritesService.php index 1a09a53fa..8a2d6ed9f 100644 --- a/lib/Service/FavoritesService.php +++ b/lib/Service/FavoritesService.php @@ -380,7 +380,6 @@ public function getFavoritesFromJSON($file): array { $currentFavorite['extensions'][$key] = $v; } - } if (!array_key_exists('category', $currentFavorite)) { $currentFavorite['category'] = $this->l10n->t('Personal'); @@ -667,7 +666,6 @@ public function importFavoritesFromKml(string $userId, $fp, string $name): int|a $this->kmlInsidePlacemark = false; $this->kmlCurrentCategory = ''; - $xml_parser = xml_parser_create(); xml_set_object($xml_parser, $this); xml_set_element_handler($xml_parser, $this->kmlStartElement(...), $this->kmlEndElement(...)); @@ -867,7 +865,6 @@ public function importFavoritesFromGeoJSON(string $userId, File $file): array { $this->currentFavoritesList = []; $this->importUserId = $userId; - // Decode file content from JSON $data = json_decode((string)$file->getContent(), true, 512); @@ -905,7 +902,6 @@ public function importFavoritesFromGeoJSON(string $userId, File $file): array { $this->currentFavorite['comment'] = $value['properties']['Location']['Address']; } - // Store this favorite array_push($this->currentFavoritesList, $this->currentFavorite); $this->nbImported++; diff --git a/lib/Service/GeophotoService.php b/lib/Service/GeophotoService.php index fff8513e6..9b70663d6 100644 --- a/lib/Service/GeophotoService.php +++ b/lib/Service/GeophotoService.php @@ -65,7 +65,6 @@ public function clearCache(string $userId = ''): bool { $this->backgroundJobCache->clear('recentlyAdded:' . $userId); $this->backgroundJobCache->clear('recentlyUpdated:' . $userId); return true; - } catch (\Exception) { return false; } @@ -291,7 +290,6 @@ private function getLocationGuesses(int $dateTaken): array { } } return $locations; - } /* diff --git a/lib/Service/PhotofilesService.php b/lib/Service/PhotofilesService.php index b4dbca875..d2fff1c0d 100644 --- a/lib/Service/PhotofilesService.php +++ b/lib/Service/PhotofilesService.php @@ -179,7 +179,6 @@ public function deleteByFileIdUserId($fileId, $userId): void { } } - public function deleteByFolder(Node $folder): void { $photos = $this->gatherPhotoFiles($folder, true); foreach ($photos as $photo) { @@ -360,7 +359,6 @@ public function addPhotoNow($photo, $userId): void { } } - private function insertPhoto($photo, $userId, \OCA\Maps\Helper\ExifGeoData $exif): void { $photoEntity = new Geophoto(); $photoEntity->setFileId($photo->getId()); diff --git a/lib/Service/TracksService.php b/lib/Service/TracksService.php index 86295492d..d02bef19c 100644 --- a/lib/Service/TracksService.php +++ b/lib/Service/TracksService.php @@ -237,7 +237,6 @@ private function dbRowToTrack(array $row, $folder, $userFolder, bool $defaultMap ]; } - /** * @return mixed[] */ diff --git a/tests/Unit/Controller/ContactsControllerTest.php b/tests/Unit/Controller/ContactsControllerTest.php index 52c47014c..3cc650695 100644 --- a/tests/Unit/Controller/ContactsControllerTest.php +++ b/tests/Unit/Controller/ContactsControllerTest.php @@ -13,7 +13,6 @@ namespace OCA\Maps\Controller; use OCA\DAV\CardDAV\CardDavBackend; - use OCA\DAV\CardDAV\ContactsManager; use OCA\Maps\AppInfo\Application; use OCA\Maps\Service\AddressService; @@ -106,7 +105,6 @@ protected function setUp(): void { $this->root = $c->get(IRootFolder::class); $this->mapFolder = $this->createMapFolder(); - $this->contactsController = new ContactsController( $this->appName, $this->request, diff --git a/tests/Unit/Controller/FavoritesControllerTest.php b/tests/Unit/Controller/FavoritesControllerTest.php index 9c2c80a60..e65b697da 100644 --- a/tests/Unit/Controller/FavoritesControllerTest.php +++ b/tests/Unit/Controller/FavoritesControllerTest.php @@ -341,8 +341,6 @@ public function testImportExportFavorites(): void { $this->assertEquals('Nothing to export', $data); } - - public function testEditFavorites(): void { // valid edition $resp = $this->favoritesController->addFavorite('a', 3.1, 4.1, 'cat1', null, null); diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index ee5e552fc..39758b67f 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "kubawerlos/php-cs-fixer-custom-fixers", - "version": "v3.34.0", + "version": "v3.37.2", "source": { "type": "git", "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", - "reference": "230dd015f9fa253850430250caf65f5af1cc1e89" + "reference": "678df979ce743466b42ddb6eea46b3f4c9a7bade" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/230dd015f9fa253850430250caf65f5af1cc1e89", - "reference": "230dd015f9fa253850430250caf65f5af1cc1e89", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/678df979ce743466b42ddb6eea46b3f4c9a7bade", + "reference": "678df979ce743466b42ddb6eea46b3f4c9a7bade", "shasum": "" }, "require": { @@ -28,7 +28,7 @@ "php": "^7.4 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.6.24 || ^10.5.51 || ^11.5.32" + "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.55" }, "type": "library", "autoload": { @@ -49,7 +49,7 @@ "description": "A set of custom fixers for PHP CS Fixer", "support": { "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", - "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.34.0" + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.37.2" }, "funding": [ { @@ -57,20 +57,20 @@ "type": "github" } ], - "time": "2025-09-21T10:46:10+00:00" + "time": "2026-05-12T16:22:19+00:00" }, { "name": "nextcloud/coding-standard", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011" + "reference": "80547a93236fbb9c783e05f0f0899043851b0dba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/8e06808c1423e9208d63d1bd205b9a38bd400011", - "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/80547a93236fbb9c783e05f0f0899043851b0dba", + "reference": "80547a93236fbb9c783e05f0f0899043851b0dba", "shasum": "" }, "require": { @@ -100,22 +100,22 @@ ], "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.4.0" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.5.0" }, - "time": "2025-06-19T12:27:27+00:00" + "time": "2026-05-19T18:30:09+00:00" }, { "name": "php-cs-fixer/shim", - "version": "v3.87.2", + "version": "v3.95.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "257258b810cabf78b55bd7367c911e7cc8089b8b" + "reference": "319bd80c8db64ab5f7b79a19178299045bdb9957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/257258b810cabf78b55bd7367c911e7cc8089b8b", - "reference": "257258b810cabf78b55bd7367c911e7cc8089b8b", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/319bd80c8db64ab5f7b79a19178299045bdb9957", + "reference": "319bd80c8db64ab5f7b79a19178299045bdb9957", "shasum": "" }, "require": { @@ -152,9 +152,9 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.87.2" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.95.2" }, - "time": "2025-09-10T09:52:07+00:00" + "time": "2026-05-15T09:21:09+00:00" } ], "aliases": [], @@ -167,5 +167,5 @@ "platform-overrides": { "php": "8.1" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" }