Skip to content

Commit 5380993

Browse files
authored
Merge pull request #534 from ConductionNL/fix/phpcs-docblocks
fix(phpcs): clear all 19 errors — phpcs exits 0
2 parents 1a1632a + 2466541 commit 5380993

9 files changed

Lines changed: 35 additions & 13 deletions

lib/Controller/ContactpersonenController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ class ContactpersonenController extends Controller {
139139
* @param ContainerInterface $container Container for DI
140140
* @param ISecureRandom $secureRandom Secure random generator
141141
* @param LoggerInterface $logger Logger instance
142+
* @param ObjectServiceInterface $objectService OpenRegister object access (ADR-022/ADR-084 —
143+
* the published contract, not the concrete service)
144+
* @param OrganisationService $organisationService Resolves the organisation a contactpersoon belongs to
142145
*
143146
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
144147
*/
@@ -1001,7 +1004,7 @@ private function verifyCrossTenantScope(\OCP\IUser $currentUser, string $usernam
10011004
* @spec openspec/changes/method-decomposition/tasks.md#task-5
10021005
*/
10031006
private function resolveContactOrganisation(object $objectService, string $username): ?string {
1004-
// development's side on both counts: this method TAKES $objectService as a
1007+
// Development's side on both counts: this method TAKES $objectService as a
10051008
// parameter (my dangling-reference pass wrongly made it a property read),
10061009
// and the schema slug was renamed contactpersoon -> contactPerson there.
10071010
$results = $objectService->searchObjectsPaginated(

lib/Controller/OrganisationMembersController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ class OrganisationMembersController extends Controller {
7777
* @param IUserSession $userSession The user session (auth guard).
7878
* @param IGroupManager $groupManager Group membership (beheerder guard).
7979
* @param IUserManager $userManager User lookup (existing-user-only guard).
80-
* `OrganisationService` without a hard compile-time
81-
* dependency on another app's class.
8280
* @param LoggerInterface $logger Logger.
81+
* @param OrganisationService $organisationService Resolves and updates organisation membership.
8382
*/
8483
public function __construct(
8584
IRequest $request,

lib/Controller/ReviewController.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,20 @@ public function submit(array $review = [], string $subjectType = '', string $sub
123123
* OpenRegister's enforcement of the predicate. So an arbitrary
124124
* `subjectId` can only ever select from already-approved reviews.
125125
* @spec openspec/specs/catalog-ratings/spec.md#requirement-module-and-dienst-detail-pages-must-display-an-aggregate-rating-computed-only-from-approved-reviews
126+
*
127+
* Rate limit: a read of already-published aggregate review scores — no
128+
* credential, and the data is public by design, so a volume ceiling only.
129+
* Much looser than IntakeController's 5/3600: that one accepts a SUBMISSION,
130+
* this one answers a page render, and a catalogue page listing many subjects
131+
* will legitimately call it repeatedly.
132+
*
133+
* (This note lived between the attributes and the signature, where PHPCS
134+
* reads any comment as the function's doc comment and requires docblock
135+
* syntax. It belongs up here regardless — nothing should sit between an
136+
* attribute list and the thing it annotates.)
126137
*/
127138
#[PublicPage]
128139
#[NoCSRFRequired]
129-
// A read of already-published aggregate review scores — no credential, and
130-
// the data is public by design, so a volume ceiling only. Much looser than
131-
// IntakeController's 5/3600: that one accepts a SUBMISSION, this one
132-
// answers a page render, and a catalogue page listing many subjects will
133-
// legitimately call it repeatedly.
134140
#[AnonRateLimit(limit: 120, period: 60)]
135141
public function aggregate(string $subjectType = '', string $subjectId = ''): JSONResponse {
136142
$result = $this->aggregate->getAggregate(subjectType: $subjectType, subjectId: $subjectId);

lib/EventListener/UserProfileUpdatedEventListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ class UserProfileUpdatedEventListener implements IEventListener {
5757
* Constructor for UserProfileUpdatedEventListener.
5858
*
5959
* @param ContainerInterface $container DI container for lazy service resolution.
60+
* @param ObjectServiceInterface $objectService OpenRegister object access (ADR-084 contract).
61+
* @param SchemaMapper $schemaMapper Resolves the contactpersoon schema.
62+
* @param RegisterMapper $registerMapper Resolves the register the schema lives in.
63+
* @param MetadataHydrationHandler $metadataHydrationHandler Hydrates `@self` metadata on read.
6064
*/
6165
public function __construct(
6266
private readonly ContainerInterface $container,

lib/Repair/InitializeSettings.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ public function run(IOutput $output): void {
111111
$this->config->setValueInt(Application::APP_ID, 'eol_warning_window_days', 180);
112112
}
113113

114-
// @spec openspec/changes/portfolio-rationalization-time/specs/portfolio-rationalization-time/spec.md#requirement-report-aggregation-queries-are-bounded
114+
// @spec openspec/changes/portfolio-rationalization-time/specs
115+
// /portfolio-rationalization-time/spec.md
116+
// #requirement-report-aggregation-queries-are-bounded
115117
// Seed the portfolio-report page-size ceiling default only when
116118
// unset, so an operator's chosen bound survives upgrades.
117119
if ($this->config->hasKey(Application::APP_ID, 'portfolio_report_page_size_ceiling') === false) {

lib/Repair/RenameDutchCatalogColumns.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ class RenameDutchCatalogColumns implements IRepairStep {
289289
*
290290
* @param IDBConnection $db Database connection.
291291
* @param LoggerInterface $logger Logger.
292+
* @param RenameDutchCatalogDecisions $decisions The per-column rename decisions this step
293+
* applies; injectable so a test can steer them.
292294
*/
293295
public function __construct(
294296
private readonly IDBConnection $db,

lib/Service/Federation/FederationMerger.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,13 @@ class FederationMerger {
6363
* @param array<int,array<string,mixed>> $localMirrors The locally-stored mirrors of THIS peer.
6464
* @param string $syncedAt The ISO-8601 sync moment.
6565
*
66-
* @return array{create:array<int,array<string,mixed>>, update:array<int,array<string,mixed>>, withdraw:array<int,array<string,mixed>>}
67-
* The reconciliation plan. Each create/update item is a full
68-
* mirror data bag (with `_source`); each withdraw item is the
69-
* existing local mirror data bag, marked withdrawn + stale.
66+
* The reconciliation plan. Each create/update item is a full mirror data bag
67+
* (with `_source`); each withdraw item is the existing local mirror data bag,
68+
* marked withdrawn + stale.
69+
*
70+
* @return array{create:array<int,array<string,mixed>>,
71+
* update:array<int,array<string,mixed>>,
72+
* withdraw:array<int,array<string,mixed>>}
7073
*
7174
* @spec openspec/specs/federated-catalog-sync/spec.md
7275
*

lib/Service/GebruikSyncService.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class GebruikSyncService {
8282
* @param LoggerInterface $logger Logger for debugging and error reporting
8383
* @param SettingsService $settingsService Service for retrieving configuration settings
8484
* @param ContainerInterface $container DI container for lazy service resolution
85+
* @param ObjectServiceInterface $objectService OpenRegister object access (ADR-084 contract)
8586
*/
8687
public function __construct(
8788
LoggerInterface $logger,

lib/Service/OrganizationSyncService.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ class OrganizationSyncService {
120120
* @param IDBConnection $db The database connection.
121121
* @param ContactPersonHandler $contactpersonHandler The contact person handler.
122122
* @param ContainerInterface $container The DI container.
123+
* @param ObjectServiceInterface $objectService OpenRegister object access (ADR-084 contract).
124+
* @param OrganisationMapper $organisationMapper Resolves the acting organisation for sync writes.
123125
*/
124126
public function __construct(
125127
OrganisatieService $organisationService,

0 commit comments

Comments
 (0)