diff --git a/lib/Command/Base.php b/lib/Command/Base.php index 1be5ad9a3f..ce04f4781c 100644 --- a/lib/Command/Base.php +++ b/lib/Command/Base.php @@ -25,7 +25,7 @@ namespace OCA\Libresign\Command; use OC\Core\Command\Base as CommandBase; -use OCA\Libresign\Service\InstallService; +use OCA\Libresign\Service\Install\InstallService; use Psr\Log\LoggerInterface; class Base extends CommandBase { diff --git a/lib/Command/Configure/Check.php b/lib/Command/Configure/Check.php index 05229f6c53..d94be25d66 100644 --- a/lib/Command/Configure/Check.php +++ b/lib/Command/Configure/Check.php @@ -25,7 +25,7 @@ namespace OCA\Libresign\Command\Configure; use OC\Core\Command\Base; -use OCA\Libresign\Service\ConfigureCheckService; +use OCA\Libresign\Service\Install\ConfigureCheckService; use OCP\IConfig; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Helper\TableCell; diff --git a/lib/Command/Developer/Reset.php b/lib/Command/Developer/Reset.php index 06658985f3..2e402dc094 100644 --- a/lib/Command/Developer/Reset.php +++ b/lib/Command/Developer/Reset.php @@ -2,7 +2,9 @@ declare(strict_types=1); /** - * @copyright Copyright (c) 2020 Joas Schilling <coding@schilljs.com> + * @copyright Copyright (c) 2023 Vitor Mattos <vitor@php.rio> + * + * @author Vitor Mattos <vitor@php.rio> * * @license GNU AGPL version 3 or any later version * diff --git a/lib/Controller/AdminController.php b/lib/Controller/AdminController.php index 0e58f7735b..c1f4a723d4 100644 --- a/lib/Controller/AdminController.php +++ b/lib/Controller/AdminController.php @@ -28,8 +28,8 @@ use OCA\Libresign\Exception\LibresignException; use OCA\Libresign\Handler\CertificateEngine\Handler as CertificateEngineHandler; use OCA\Libresign\Helper\ConfigureCheckHelper; -use OCA\Libresign\Service\ConfigureCheckService; -use OCA\Libresign\Service\InstallService; +use OCA\Libresign\Service\Install\ConfigureCheckService; +use OCA\Libresign\Service\Install\InstallService; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\NoCSRFRequired; diff --git a/lib/Handler/CertificateEngine/CfsslHandler.php b/lib/Handler/CertificateEngine/CfsslHandler.php index 2e3c0d4f3d..73d94b7663 100644 --- a/lib/Handler/CertificateEngine/CfsslHandler.php +++ b/lib/Handler/CertificateEngine/CfsslHandler.php @@ -32,7 +32,7 @@ use OCA\Libresign\Exception\LibresignException; use OCA\Libresign\Handler\CfsslServerHandler; use OCA\Libresign\Helper\ConfigureCheckHelper; -use OCA\Libresign\Service\InstallService; +use OCA\Libresign\Service\Install\InstallService; use OCP\AppFramework\Services\IAppConfig; use OCP\Files\AppData\IAppDataFactory; use OCP\IConfig; diff --git a/lib/Migration/Version8000Date20230730032402.php b/lib/Migration/Version8000Date20230730032402.php index 904e6f874f..eeaa558112 100644 --- a/lib/Migration/Version8000Date20230730032402.php +++ b/lib/Migration/Version8000Date20230730032402.php @@ -26,7 +26,7 @@ namespace OCA\Libresign\Migration; use Closure; -use OCA\Libresign\Service\InstallService; +use OCA\Libresign\Service\Install\InstallService; use OCP\AppFramework\Services\IAppConfig; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/lib/Service/ConfigureCheckService.php b/lib/Service/Install/ConfigureCheckService.php similarity index 99% rename from lib/Service/ConfigureCheckService.php rename to lib/Service/Install/ConfigureCheckService.php index 5aa8de8cff..ccc79b20c0 100644 --- a/lib/Service/ConfigureCheckService.php +++ b/lib/Service/Install/ConfigureCheckService.php @@ -22,7 +22,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -namespace OCA\Libresign\Service; +namespace OCA\Libresign\Service\Install; use OC\SystemConfig; use OCA\Libresign\Handler\CertificateEngine\Handler as CertificateEngine; diff --git a/lib/Service/InstallService.php b/lib/Service/Install/InstallService.php similarity index 99% rename from lib/Service/InstallService.php rename to lib/Service/Install/InstallService.php index e193a8775a..f64794df03 100644 --- a/lib/Service/InstallService.php +++ b/lib/Service/Install/InstallService.php @@ -22,7 +22,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -namespace OCA\Libresign\Service; +namespace OCA\Libresign\Service\Install; use InvalidArgumentException; use OC; diff --git a/tests/Unit/Service/InstallServiceTest.php b/tests/Unit/Service/InstallServiceTest.php index c54e42290f..3cd569931a 100644 --- a/tests/Unit/Service/InstallServiceTest.php +++ b/tests/Unit/Service/InstallServiceTest.php @@ -24,7 +24,7 @@ namespace OCA\Libresign\Tests\Unit\Service; use OCA\Libresign\Handler\CertificateEngine\Handler as CertificateEngineHandler; -use OCA\Libresign\Service\InstallService; +use OCA\Libresign\Service\Install\InstallService; use OCP\AppFramework\Services\IAppConfig; use OCP\Files\AppData\IAppDataFactory; use OCP\Files\IRootFolder; diff --git a/tests/Unit/TestCase.php b/tests/Unit/TestCase.php index 4061042f31..476bdb7f7d 100644 --- a/tests/Unit/TestCase.php +++ b/tests/Unit/TestCase.php @@ -180,8 +180,8 @@ public function deleteUserIfExists($username): void { } private function getBinariesFromCache(): void { - /** @var \OCA\Libresign\Service\InstallService */ - $install = \OC::$server->get(\OCA\Libresign\Service\InstallService::class); + /** @var \OCA\Libresign\Service\Install\InstallService */ + $install = \OC::$server->get(\OCA\Libresign\Service\Install\InstallService::class); $appPath = $install->getFullPath(); $cachePath = preg_replace('/\/.*\/appdata_[a-z0-9]*/', \OC::$server->getTempManager()->getTempBaseDir(), $appPath); if (!file_exists($cachePath)) { @@ -194,8 +194,8 @@ private function getBinariesFromCache(): void { } private function backupBinaries(): void { - /** @var \OCA\Libresign\Service\InstallService */ - $install = \OC::$server->get(\OCA\Libresign\Service\InstallService::class); + /** @var \OCA\Libresign\Service\Install\InstallService */ + $install = \OC::$server->get(\OCA\Libresign\Service\Install\InstallService::class); $appPath = $install->getFullPath(); if (!is_readable($appPath)) { return; diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml index c90cca0208..53f8ad31dc 100644 --- a/tests/psalm-baseline.xml +++ b/tests/psalm-baseline.xml @@ -90,7 +90,7 @@ <code>private</code> </UndefinedClass> </file> - <file src="lib/Service/InstallService.php"> + <file src="lib/Service/Install/InstallService.php"> <UndefinedClass occurrences="1"> <code>Process</code> </UndefinedClass>