From 3adb41995b1e1bdd4ad5d8e0471592582f1f5bd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 21 Jun 2025 01:09:22 +0000 Subject: [PATCH] Chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixer Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.3.2 to 1.4.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v1.3.2...v1.4.0) --- updated-dependencies: - dependency-name: nextcloud/coding-standard dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: Christian Hartmann --- lib/Activity/ActivityManager.php | 2 +- lib/Controller/ApiController.php | 6 +-- lib/Db/FormMapper.php | 2 +- lib/FormsMigrator.php | 6 +-- .../Version020300Date20210406114130.php | 2 +- .../Version020300Date20210406133704.php | 6 +-- .../Version030000Date20220414203511.php | 2 +- .../Version030000Date20220705192811.php | 2 +- .../Version030000Date20220707130109.php | 2 +- .../Version030000Date20220831195000.php | 2 +- .../Version030100Date20221231100426.php | 2 +- .../Version030100Date20230123182700.php | 2 +- .../Version040200Date20240402200139.php | 2 +- .../Version040200Date20240402224725.php | 2 +- .../Version050000Date20241005173955.php | 2 +- lib/Service/ConfigService.php | 2 +- lib/Service/FormsService.php | 22 +++++----- lib/Service/SubmissionService.php | 22 +++++----- tests/Unit/Activity/ActivityManagerTest.php | 4 +- tests/Unit/Activity/ProviderTest.php | 2 +- tests/Unit/Controller/ApiControllerTest.php | 40 ++++++++--------- .../Unit/Controller/ConfigControllerTest.php | 6 +-- tests/Unit/Controller/PageControllerTest.php | 6 +-- tests/Unit/Service/CirclesServiceTest.php | 6 +-- tests/Unit/Service/ConfigServiceTest.php | 2 +- vendor-bin/cs-fixer/composer.lock | 43 +++++++++++-------- 26 files changed, 103 insertions(+), 94 deletions(-) diff --git a/lib/Activity/ActivityManager.php b/lib/Activity/ActivityManager.php index 5d88237ac..81d6fb5d2 100644 --- a/lib/Activity/ActivityManager.php +++ b/lib/Activity/ActivityManager.php @@ -16,7 +16,7 @@ use OCP\Share\IShare; class ActivityManager { - + public function __construct( protected string $appName, private ?string $userId, diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index e0cbc228a..dc0208340 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -310,9 +310,9 @@ public function updateForm(int $formId, array $keyValuePairs): DataResponse { // Don't allow to change params id, hash, ownerId, created, lastUpdated, fileId if ( - key_exists('id', $keyValuePairs) || key_exists('hash', $keyValuePairs) || - key_exists('ownerId', $keyValuePairs) || key_exists('created', $keyValuePairs) || - isset($keyValuePairs['fileId']) || key_exists('lastUpdated', $keyValuePairs) + key_exists('id', $keyValuePairs) || key_exists('hash', $keyValuePairs) + || key_exists('ownerId', $keyValuePairs) || key_exists('created', $keyValuePairs) + || isset($keyValuePairs['fileId']) || key_exists('lastUpdated', $keyValuePairs) ) { $this->logger->info('Not allowed to update id, hash, ownerId, created, fileId or lastUpdated'); throw new OCSForbiddenException('Not allowed to update id, hash, ownerId, created, fileId or lastUpdated'); diff --git a/lib/Db/FormMapper.php b/lib/Db/FormMapper.php index c0e3b5dde..9187b9835 100644 --- a/lib/Db/FormMapper.php +++ b/lib/Db/FormMapper.php @@ -34,7 +34,7 @@ public function __construct( parent::__construct($db, 'forms_v2_forms', Form::class); } - + /** * @param Entity $entity * @psalm-param Form $entity diff --git a/lib/FormsMigrator.php b/lib/FormsMigrator.php index 9ea85f18a..3dca54c37 100644 --- a/lib/FormsMigrator.php +++ b/lib/FormsMigrator.php @@ -94,8 +94,8 @@ public function export(IUser $user, IExportDestination $exportDestination, Outpu // Mark userIds with instance. foreach ($formData['submissions'] as $sKey => $submission) { // Anonymous submission or already migrated, just keep it. - if (substr($submission['userId'], 0, 10) === 'anon-user-' || - substr($submission['userId'], 0, 8) === 'unknown~') { + if (substr($submission['userId'], 0, 10) === 'anon-user-' + || substr($submission['userId'], 0, 8) === 'unknown~') { continue; } @@ -148,7 +148,7 @@ public function import(IUser $user, IImportSource $importSource, OutputInterface $form->setSubmitMultiple($formData['submitMultiple']); $form->setAllowEditSubmissions($formData['allowEditSubmissions']); $form->setShowExpiration($formData['showExpiration']); - + $this->formMapper->insert($form); $questionIdMap = []; diff --git a/lib/Migration/Version020300Date20210406114130.php b/lib/Migration/Version020300Date20210406114130.php index 2529afd6a..68d2fbb06 100644 --- a/lib/Migration/Version020300Date20210406114130.php +++ b/lib/Migration/Version020300Date20210406114130.php @@ -46,7 +46,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt return $schema; } - + return null; } diff --git a/lib/Migration/Version020300Date20210406133704.php b/lib/Migration/Version020300Date20210406133704.php index 43cf3a2be..0e7197620 100644 --- a/lib/Migration/Version020300Date20210406133704.php +++ b/lib/Migration/Version020300Date20210406133704.php @@ -24,12 +24,12 @@ class Version020300Date20210406133704 extends SimpleMigrationStep { public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - + $table = $schema->getTable('forms_v2_questions'); - + if ($table->hasColumn('mandatory') && $table->hasColumn('is_required')) { $table->dropColumn('mandatory'); - + return $schema; } diff --git a/lib/Migration/Version030000Date20220414203511.php b/lib/Migration/Version030000Date20220414203511.php index a6b6868b2..af844beed 100644 --- a/lib/Migration/Version030000Date20220414203511.php +++ b/lib/Migration/Version030000Date20220414203511.php @@ -34,7 +34,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt return $schema; } - + return null; } } diff --git a/lib/Migration/Version030000Date20220705192811.php b/lib/Migration/Version030000Date20220705192811.php index c87666202..5a9f81f07 100644 --- a/lib/Migration/Version030000Date20220705192811.php +++ b/lib/Migration/Version030000Date20220705192811.php @@ -45,7 +45,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt return $schema; } - + return null; } diff --git a/lib/Migration/Version030000Date20220707130109.php b/lib/Migration/Version030000Date20220707130109.php index 770521850..1a348bd5d 100644 --- a/lib/Migration/Version030000Date20220707130109.php +++ b/lib/Migration/Version030000Date20220707130109.php @@ -25,7 +25,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $schema = $schemaClosure(); $table = $schema->getTable('forms_v2_forms'); - + if ($table->hasColumn('submit_once') && $table->hasColumn('submit_multiple')) { $table->dropColumn('submit_once'); return $schema; diff --git a/lib/Migration/Version030000Date20220831195000.php b/lib/Migration/Version030000Date20220831195000.php index 7eead3b90..600656f19 100644 --- a/lib/Migration/Version030000Date20220831195000.php +++ b/lib/Migration/Version030000Date20220831195000.php @@ -32,7 +32,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt return $schema; } - + return null; } } diff --git a/lib/Migration/Version030100Date20221231100426.php b/lib/Migration/Version030100Date20221231100426.php index e6aca92dc..caf745e19 100644 --- a/lib/Migration/Version030100Date20221231100426.php +++ b/lib/Migration/Version030100Date20221231100426.php @@ -38,7 +38,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt return $schema; } - + return null; } } diff --git a/lib/Migration/Version030100Date20230123182700.php b/lib/Migration/Version030100Date20230123182700.php index 8ab711f6c..74059bf8d 100644 --- a/lib/Migration/Version030100Date20230123182700.php +++ b/lib/Migration/Version030100Date20230123182700.php @@ -34,7 +34,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt return $schema; } - + return null; } } diff --git a/lib/Migration/Version040200Date20240402200139.php b/lib/Migration/Version040200Date20240402200139.php index d28033ad9..fc85d9d18 100644 --- a/lib/Migration/Version040200Date20240402200139.php +++ b/lib/Migration/Version040200Date20240402200139.php @@ -70,7 +70,7 @@ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $qbUpdate->update('forms_v2_forms') ->set('access_enum', $qbUpdate->createParameter('access_enum')) ->where($qbUpdate->expr()->eq('id', $qbUpdate->createParameter('id'))); - + // Fetch Forms... $cursor = $qbFetch->executeQuery(); diff --git a/lib/Migration/Version040200Date20240402224725.php b/lib/Migration/Version040200Date20240402224725.php index ff836dad5..4dcf171f3 100644 --- a/lib/Migration/Version040200Date20240402224725.php +++ b/lib/Migration/Version040200Date20240402224725.php @@ -30,7 +30,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $schema = $schemaClosure(); $table = $schema->getTable('forms_v2_forms'); - + if ($table->hasColumn('access_json') && $table->hasColumn('access_enum')) { $table->dropColumn('access_json'); return $schema; diff --git a/lib/Migration/Version050000Date20241005173955.php b/lib/Migration/Version050000Date20241005173955.php index 5133b760c..e04970cfa 100644 --- a/lib/Migration/Version050000Date20241005173955.php +++ b/lib/Migration/Version050000Date20241005173955.php @@ -22,7 +22,7 @@ public function __construct( protected IDBConnection $db, ) { } - + /** * @param IOutput $output * @param Closure(): ISchemaWrapper $schemaClosure diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 46b7ad69d..593315c9e 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -18,7 +18,7 @@ class ConfigService { private ?IUser $currentUser; - + public function __construct( protected string $appName, private IConfig $config, diff --git a/lib/Service/FormsService.php b/lib/Service/FormsService.php index 7cb339ce9..f25837ad2 100644 --- a/lib/Service/FormsService.php +++ b/lib/Service/FormsService.php @@ -354,7 +354,7 @@ public function canDeleteResults(Form $form): bool { if ($this->isFormArchived($form)) { return false; } - + // Allow deleting results if the current user has the "results_delete" permission if (in_array(Constants::PERMISSION_RESULTS_DELETE, $this->getPermissions($form))) { return true; @@ -387,8 +387,8 @@ public function canSubmit(Form $form): bool { // Refuse access, if submitMultiple is not set and user already has taken part. if ( - !$form->getSubmitMultiple() && - $this->submissionMapper->hasFormSubmissionsByUser($form, $this->currentUser->getUID()) + !$form->getSubmitMultiple() + && $this->submissionMapper->hasFormSubmissionsByUser($form, $this->currentUser->getUID()) ) { return false; } @@ -480,10 +480,10 @@ private function isSharedFormShown(Form $form): bool { } // Shown if permitAll and showToAll are both set. - if ($form->getAccess()['permitAllUsers'] && - $form->getAccess()['showToAllUsers'] && - $this->configService->getAllowPermitAll() && - $this->configService->getAllowShowToAll()) { + if ($form->getAccess()['permitAllUsers'] + && $form->getAccess()['showToAllUsers'] + && $this->configService->getAllowPermitAll() + && $this->configService->getAllowShowToAll()) { return true; } @@ -585,9 +585,9 @@ public function notifyNewShares(Form $form, Share $share): void { 'Error while publishing new share activity', [$e] ); - + } - + } /** @@ -806,8 +806,8 @@ public function areExtraSettingsValid(array $extraSettings, string $questionType // Special handling of linear scale validation } elseif ($questionType === Constants::ANSWER_TYPE_LINEARSCALE) { // Ensure limits are sane - if (isset($extraSettings['optionsLowest']) && ($extraSettings['optionsLowest'] < 0 || $extraSettings['optionsLowest'] > 1) || - isset($extraSettings['optionsHighest']) && ($extraSettings['optionsHighest'] < 2 || $extraSettings['optionsHighest'] > 10)) { + if (isset($extraSettings['optionsLowest']) && ($extraSettings['optionsLowest'] < 0 || $extraSettings['optionsLowest'] > 1) + || isset($extraSettings['optionsHighest']) && ($extraSettings['optionsHighest'] < 2 || $extraSettings['optionsHighest'] > 10)) { return false; } } diff --git a/lib/Service/SubmissionService.php b/lib/Service/SubmissionService.php index 8b4e0aecc..d363f020a 100644 --- a/lib/Service/SubmissionService.php +++ b/lib/Service/SubmissionService.php @@ -276,8 +276,8 @@ public function getSubmissionsData(Form $form, string $fileFormat, ?File $file = function (array $carry, Answer $answer) use ($questionPerQuestionId) { $questionId = $answer->getQuestionId(); - if (isset($questionPerQuestionId[$questionId]) && - $questionPerQuestionId[$questionId]->getType() === Constants::ANSWER_TYPE_FILE) { + if (isset($questionPerQuestionId[$questionId]) + && $questionPerQuestionId[$questionId]->getType() === Constants::ANSWER_TYPE_FILE) { if (array_key_exists($questionId, $carry)) { $carry[$questionId]['label'] .= "; \n" . $answer->getText(); } else { @@ -373,17 +373,17 @@ public function validateSubmission(array $questions, array $answers, string $for $questionAnswered = array_key_exists($questionId, $answers); // Check if all required questions have an answer - if ($question['isRequired'] && - (!$questionAnswered || - !array_filter($answers[$questionId], static function (string|array $value): bool { + if ($question['isRequired'] + && (!$questionAnswered + || !array_filter($answers[$questionId], static function (string|array $value): bool { // file type if (is_array($value)) { return !empty($value['uploadedFileId']); } return $value !== ''; - }) || - (!empty($question['extraSettings']['allowOtherAnswer']) && !array_filter($answers[$questionId], fn ($value) => $value !== Constants::QUESTION_EXTRASETTINGS_OTHER_PREFIX))) + }) + || (!empty($question['extraSettings']['allowOtherAnswer']) && !array_filter($answers[$questionId], fn ($value) => $value !== Constants::QUESTION_EXTRASETTINGS_OTHER_PREFIX))) ) { throw new \InvalidArgumentException(sprintf('Question "%s" is required.', $question['text'])); } @@ -505,10 +505,10 @@ private function validateDateTime(array $answers, string $format, ?string $text $previousDate = $d; if ($extraSettings) { - if ((isset($extraSettings['dateMin']) && $d < (new DateTime())->setTimestamp($extraSettings['dateMin'])) || - (isset($extraSettings['dateMax']) && $d > (new DateTime())->setTimestamp($extraSettings['dateMax'])) || - (isset($extraSettings['timeMin']) && $d < DateTime::createFromFormat($format, $extraSettings['timeMin'])) || - (isset($extraSettings['timeMax']) && $d > DateTime::createFromFormat($format, $extraSettings['timeMax'])) + if ((isset($extraSettings['dateMin']) && $d < (new DateTime())->setTimestamp($extraSettings['dateMin'])) + || (isset($extraSettings['dateMax']) && $d > (new DateTime())->setTimestamp($extraSettings['dateMax'])) + || (isset($extraSettings['timeMin']) && $d < DateTime::createFromFormat($format, $extraSettings['timeMin'])) + || (isset($extraSettings['timeMax']) && $d > DateTime::createFromFormat($format, $extraSettings['timeMax'])) ) { throw new \InvalidArgumentException(sprintf('Date/time is not in the allowed range for question "%s".', $text)); } diff --git a/tests/Unit/Activity/ActivityManagerTest.php b/tests/Unit/Activity/ActivityManagerTest.php index e7714d1b1..21d61d5ff 100644 --- a/tests/Unit/Activity/ActivityManagerTest.php +++ b/tests/Unit/Activity/ActivityManagerTest.php @@ -79,7 +79,7 @@ public function testPublishNewGroupShare() { $form->setTitle('TestForm-Title'); $form->setHash('abcdefg12345'); $groupId = 'sharedGroup'; - + $group = $this->createMock(IGroup::class); $user = $this->createMock(IUser::class); @@ -154,7 +154,7 @@ public function testPublishNewCircleShare() { public function testPublishNewCircleShare_circlesDisabled() { $form = $this->createMock(Form::class); - + $this->circlesService->expects($this->once()) ->method('getCircleUsers') ->with('circle') diff --git a/tests/Unit/Activity/ProviderTest.php b/tests/Unit/Activity/ProviderTest.php index 399f9a523..f0bffe25f 100644 --- a/tests/Unit/Activity/ProviderTest.php +++ b/tests/Unit/Activity/ProviderTest.php @@ -73,7 +73,7 @@ public function setUp(): void { $this->l10nFactory = $this->createMock(IFactory::class); $this->validator = $this->createMock(IValidator::class); $this->circlesService = $this->createMock(CirclesService::class); - + $this->urlGenerator->expects($this->any()) ->method('linkToRouteAbsolute') ->with('forms.page.index') diff --git a/tests/Unit/Controller/ApiControllerTest.php b/tests/Unit/Controller/ApiControllerTest.php index f7e4addf5..9f4d1735c 100644 --- a/tests/Unit/Controller/ApiControllerTest.php +++ b/tests/Unit/Controller/ApiControllerTest.php @@ -1006,7 +1006,7 @@ public function testTransferOwner() { $this->assertEquals(new DataResponse('newOwner'), $this->apiController->updateForm(1, ['ownerId' => 'newOwner'])); $this->assertEquals('newOwner', $form->getOwnerId()); } - + public function testGetSubmission_invalidForm() { $exception = $this->createMock(MapperException::class); $this->formMapper->expects($this->once()) @@ -1016,56 +1016,56 @@ public function testGetSubmission_invalidForm() { $this->expectException(NoSuchFormException::class); $this->apiController->getSubmission(1, 42); } - + public function testGetSubmission_noPermissions() { $form = new Form(); $form->setId(1); $form->setOwnerId('currentUser'); - + $this->formMapper->expects($this->once()) ->method('findById') ->with(1) ->willReturn($form); - + $this->formsService->expects($this->once()) ->method('canSeeResults') ->with($form) ->willReturn(false); - + $this->expectException(NoSuchFormException::class); $this->apiController->getSubmission(1, 42); } - + public function testGetSubmission_notFound() { $form = new Form(); $form->setId(1); $form->setOwnerId('currentUser'); - + $this->formMapper->expects($this->once()) ->method('findById') ->with(1) ->willReturn($form); - + $this->formsService->expects($this->once()) ->method('canSeeResults') ->with($form) ->willReturn(true); - + $this->submissionService->expects($this->once()) // Changed from submissionMapper ->method('getSubmission') ->with(42) ->willReturn(null); // Service returns null when submission not found - + $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Submission doesn\'t exist'); $this->apiController->getSubmission(1, 42); } - + public function testGetSubmission_success() { $form = new Form(); $form->setId(1); $form->setOwnerId('currentUser'); - + // Data that submissionService->getSubmission() is expected to return $submissionDataFromService = [ 'id' => 42, @@ -1074,29 +1074,29 @@ public function testGetSubmission_success() { // Add any other fields that SubmissionService::getSubmission would return, e.g., timestamp 'timestamp' => 1234567890 ]; - + $this->formMapper->expects($this->once()) ->method('findById') ->with(1) ->willReturn($form); - + $this->formsService->expects($this->once()) ->method('canSeeResults') ->with($form) ->willReturn(true); - + $this->submissionService->expects($this->once()) // Changed from submissionMapper ->method('getSubmission') ->with(42) ->willReturn($submissionDataFromService); // Service returns an array - + $user = $this->createMock(IUser::class); $user->method('getDisplayName')->willReturn('jdoe'); $this->userManager->expects($this->once()) ->method('get') ->with('jdoe') ->willReturn($user); - + $expectedSubmissionInResponse = $submissionDataFromService; $expectedSubmissionInResponse['userDisplayName'] = 'jdoe'; $this->assertEquals(new DataResponse($expectedSubmissionInResponse), $this->apiController->getSubmission(1, 42)); @@ -1295,7 +1295,7 @@ public function testUpdateSubmission_formNotEditable() { $this->formsService->expects($this->once()) ->method('hasFormExpired') ->willReturn(false); - + $this->expectException(OCSBadRequestException::class); $this->expectExceptionMessage('Can only update if allowEditSubmissions is set'); $this->apiController->updateSubmission($formId, $submissionId, $answers); @@ -1315,7 +1315,7 @@ public function testUpdateSubmission_invalidAnswers() { ->method('findById') ->with($formId) ->willReturn($form); - + $this->formsService->expects($this->once()) ->method('hasUserAccess') ->willReturn(true); @@ -1397,7 +1397,7 @@ public function testUpdateSubmission_mismatchedFormId() { ->method('findById') ->with($formId) ->willReturn($form); - + $this->formsService->expects($this->once()) ->method('hasUserAccess') ->willReturn(true); diff --git a/tests/Unit/Controller/ConfigControllerTest.php b/tests/Unit/Controller/ConfigControllerTest.php index 25f3e59aa..47d18f037 100644 --- a/tests/Unit/Controller/ConfigControllerTest.php +++ b/tests/Unit/Controller/ConfigControllerTest.php @@ -60,7 +60,7 @@ public function testGetAppConfig() { 'allow' => 'someConfig', 'permit' => 'all' ]); - + $this->assertEquals(new DataResponse([ 'allow' => 'someConfig', 'permit' => 'all' @@ -99,7 +99,7 @@ public function dataUpdateAppConfig() { public function testUpdateAppConfig(string $configKey, $configValue, string $strConfig) { $this->logger->expects($this->once()) ->method('debug'); - + $this->config->expects($this->once()) ->method('setAppValue') ->with('forms', $configKey, $strConfig); @@ -110,7 +110,7 @@ public function testUpdateAppConfig(string $configKey, $configValue, string $str public function testUpdateAppConfig_unknownKey() { $this->logger->expects($this->once()) ->method('debug'); - + $this->config->expects($this->never()) ->method('setAppValue'); diff --git a/tests/Unit/Controller/PageControllerTest.php b/tests/Unit/Controller/PageControllerTest.php index a558bcb95..b0c8724ed 100644 --- a/tests/Unit/Controller/PageControllerTest.php +++ b/tests/Unit/Controller/PageControllerTest.php @@ -51,16 +51,16 @@ class PageControllerTest extends TestCase { /** @var IAccountManager|MockObject */ private $accountManager; - + /** @var IInitialState|MockObject */ private $initialState; /** @var IL10N|MockObject */ private $l10n; - + /** @var IURLGenerator|MockObject */ private $urlGenerator; - + /** @var IUserManager|MockObject */ private $userManager; diff --git a/tests/Unit/Service/CirclesServiceTest.php b/tests/Unit/Service/CirclesServiceTest.php index 1027808a0..772714acb 100644 --- a/tests/Unit/Service/CirclesServiceTest.php +++ b/tests/Unit/Service/CirclesServiceTest.php @@ -121,7 +121,7 @@ public function testGetCircleUsers_circlesDisabled() { ->onlyMethods(['getCircle']) ->setConstructorArgs([$this->appManager, $this->container, $this->logger]) ->getMock(); - + $circlesService->expects($this->never()) ->method('getCircle'); @@ -138,7 +138,7 @@ public function testGetCircleUsers_circleNotFound() { ->onlyMethods(['getCircle']) ->setConstructorArgs([$this->appManager, $this->container, $this->logger]) ->getMock(); - + $circlesService->expects($this->once()) ->method('getCircle') ->with('noCircle') @@ -173,7 +173,7 @@ public function testGetCircleUsers() { ->onlyMethods(['getCircle']) ->setConstructorArgs([$this->appManager, $this->container, $this->logger]) ->getMock(); - + $circlesService->expects($this->once()) ->method('getCircle') ->with('circle') diff --git a/tests/Unit/Service/ConfigServiceTest.php b/tests/Unit/Service/ConfigServiceTest.php index 8a0ec115d..a46a724fb 100644 --- a/tests/Unit/Service/ConfigServiceTest.php +++ b/tests/Unit/Service/ConfigServiceTest.php @@ -202,7 +202,7 @@ public function testCanCreateForms(array $config, bool $expected) { ->method('getUserGroupIds') ->with($this->currentUser) ->willReturn(['usersGroup']); - + $this->assertEquals($expected, $this->configService->canCreateForms()); } } diff --git a/vendor-bin/cs-fixer/composer.lock b/vendor-bin/cs-fixer/composer.lock index 883c2a8c0..867d570f8 100644 --- a/vendor-bin/cs-fixer/composer.lock +++ b/vendor-bin/cs-fixer/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "kubawerlos/php-cs-fixer-custom-fixers", - "version": "v3.24.0", + "version": "v3.27.0", "source": { "type": "git", "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", - "reference": "93222100a91399314c3726857e249e76c4a7d760" + "reference": "d860473d16b906c7945206177edc7d112357a706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/93222100a91399314c3726857e249e76c4a7d760", - "reference": "93222100a91399314c3726857e249e76c4a7d760", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/d860473d16b906c7945206177edc7d112357a706", + "reference": "d860473d16b906c7945206177edc7d112357a706", "shasum": "" }, "require": { @@ -48,27 +48,33 @@ "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.24.0" + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.27.0" }, - "time": "2025-03-22T16:51:39+00:00" + "funding": [ + { + "url": "https://github.com/kubawerlos", + "type": "github" + } + ], + "time": "2025-06-10T20:53:07+00:00" }, { "name": "nextcloud/coding-standard", - "version": "v1.3.2", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d" + "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d", - "reference": "9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/8e06808c1423e9208d63d1bd205b9a38bd400011", + "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011", "shasum": "" }, "require": { "kubawerlos/php-cs-fixer-custom-fixers": "^3.22", - "php": "^7.3|^8.0", + "php": "^8.0", "php-cs-fixer/shim": "^3.17" }, "type": "library", @@ -88,11 +94,14 @@ } ], "description": "Nextcloud coding standards for the php cs fixer", + "keywords": [ + "dev" + ], "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.3.2" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.4.0" }, - "time": "2024-10-14T16:49:05+00:00" + "time": "2025-06-19T12:27:27+00:00" }, { "name": "php-cs-fixer/shim", @@ -150,13 +159,13 @@ "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": {}, - "platform-dev": {}, + "platform": [], + "platform-dev": [], "platform-overrides": { "php": "8.1" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" }