diff --git a/app/availableplugins/ApiConnector/src/Controller/ApiSourceEndpointsController.php b/app/availableplugins/ApiConnector/src/Controller/ApiSourceEndpointsController.php index 33813bc2d..6d4a8fe21 100644 --- a/app/availableplugins/ApiConnector/src/Controller/ApiSourceEndpointsController.php +++ b/app/availableplugins/ApiConnector/src/Controller/ApiSourceEndpointsController.php @@ -53,7 +53,7 @@ public function beforeRender(\Cake\Event\EventInterface $event) { if(!empty($vv_obj->api_source_id)) { $apiSource = $this->ApiSourceEndpoints->ApiSources->get( $vv_obj->api_source_id, - ['contain' => 'ExternalIdentitySources'] + contain: 'ExternalIdentitySources' ); $this->set( diff --git a/app/availableplugins/ApiConnector/src/Model/Table/ApiSourcesTable.php b/app/availableplugins/ApiConnector/src/Model/Table/ApiSourcesTable.php index 99b6a8878..7b59ca2a6 100644 --- a/app/availableplugins/ApiConnector/src/Model/Table/ApiSourcesTable.php +++ b/app/availableplugins/ApiConnector/src/Model/Table/ApiSourcesTable.php @@ -186,11 +186,8 @@ protected function mapApiToRegistry(string $model, array $attributes): array { */ public function remove(int $id, string $sorLabel, string $sorId): bool { - // We call this remove() so as not to interfere with the default table::delete(). - $apiSource = $this->get($id, ['contain' => ['ExternalIdentitySources']]); - // Pull our configuration - $apiSource = $this->get($id, ['contain' => ['ExternalIdentitySources']]); + $apiSource = $this->get($id, contain: ['ExternalIdentitySources']); // Like upsert(), we don't really need $sorLabel, but we check it for // consistency with upsert() (which also doesn't really need it). @@ -413,7 +410,7 @@ public function upsert( $ret = []; // Pull our configuration - $apiSource = $this->get($id, ['contain' => ['ExternalIdentitySources']]); + $apiSource = $this->get($id, contain: ['ExternalIdentitySources']); // Strictly speaking we don't need $sorLabel since we know which configuration // to use from the ApiSource ID, and $sorLabel might not be unique across COs diff --git a/app/availableplugins/SqlConnector/src/Model/Table/SqlProvisionersTable.php b/app/availableplugins/SqlConnector/src/Model/Table/SqlProvisionersTable.php index 04167cddd..bf1f64e33 100644 --- a/app/availableplugins/SqlConnector/src/Model/Table/SqlProvisionersTable.php +++ b/app/availableplugins/SqlConnector/src/Model/Table/SqlProvisionersTable.php @@ -556,7 +556,7 @@ protected function syncEntity( */ public function syncReferenceData(int $id, string $dataSource='targetdb') { - $spcfg = $this->get($id, ['contain' => ['ProvisioningTargets']]); + $spcfg = $this->get($id, contain: ['ProvisioningTargets']); $this->Servers->SqlServers->connect($spcfg->server_id, $dataSource); diff --git a/app/plugins/CoreAssigner/src/Lib/Jobs/SqlAssignerJob.php b/app/plugins/CoreAssigner/src/Lib/Jobs/SqlAssignerJob.php index a1be967e2..85abe18bc 100644 --- a/app/plugins/CoreAssigner/src/Lib/Jobs/SqlAssignerJob.php +++ b/app/plugins/CoreAssigner/src/Lib/Jobs/SqlAssignerJob.php @@ -288,7 +288,7 @@ public function run( $this->ia = $this->IdentifierAssignments->get( $parameters['identifier_assignment_id'], - ['contain' => ['SqlAssigners', 'IdentifierTypes']] + contain: ['SqlAssigners', 'IdentifierTypes'] ); if($this->ia->plugin != 'CoreAssigner.SqlAssigners') { diff --git a/app/plugins/CoreJob/src/Lib/Jobs/SyncJob.php b/app/plugins/CoreJob/src/Lib/Jobs/SyncJob.php index 34e2df7fb..64a5b8179 100644 --- a/app/plugins/CoreJob/src/Lib/Jobs/SyncJob.php +++ b/app/plugins/CoreJob/src/Lib/Jobs/SyncJob.php @@ -284,7 +284,7 @@ protected function getRunContext( $this->runContext->eis = $this->runContext->EISTable->get( $eisId, - ['contain' => $this->runContext->EISTable->getPluginRelations()] + contain: $this->runContext->EISTable->getPluginRelations() ); } diff --git a/app/plugins/CoreServer/src/Model/Table/SqlServersTable.php b/app/plugins/CoreServer/src/Model/Table/SqlServersTable.php index d958d4bfc..a5ad9c46f 100644 --- a/app/plugins/CoreServer/src/Model/Table/SqlServersTable.php +++ b/app/plugins/CoreServer/src/Model/Table/SqlServersTable.php @@ -127,7 +127,7 @@ public function connect(int $serverId, string $name): bool { // which is basically what the SQL Provisioner does. // Pull our configuration via the parent Server object. - $server = $this->Servers->get($serverId, ['contain' => ['SqlServers']]); + $server = $this->Servers->get($serverId, contain: ['SqlServers']); $dbmap = [ RdbmsTypeEnum::MariaDB => 'Mysql', diff --git a/app/src/Controller/AuthenticatorsController.php b/app/src/Controller/AuthenticatorsController.php index c6e7650d2..3175fc4f6 100644 --- a/app/src/Controller/AuthenticatorsController.php +++ b/app/src/Controller/AuthenticatorsController.php @@ -96,7 +96,7 @@ public function manage() { $cfg = $this->Authenticators->get( (int)$this->getRequest()->getQuery('authenticator_id'), - ['contain' => $this->Authenticators->getPluginRelations()] + contain: $this->Authenticators->getPluginRelations() ); // We need to know what type of Authenticator we're managing to construct the redirect. diff --git a/app/src/Controller/ExternalIdentitiesController.php b/app/src/Controller/ExternalIdentitiesController.php index 25adc8c4b..0cb0e1bc5 100644 --- a/app/src/Controller/ExternalIdentitiesController.php +++ b/app/src/Controller/ExternalIdentitiesController.php @@ -135,5 +135,5 @@ public function relink(string $id) { $this->set('vv_title', __d('operation', 'relink.a', [__d('controller', 'ExternalIdentities', [1])])); - $this->set('vv_external_identity', $this->ExternalIdentities->get((int)$id, ['contain' => 'Names'])); + $this->set('vv_external_identity', $this->ExternalIdentities->get((int)$id, contain: 'Names')); }} \ No newline at end of file diff --git a/app/src/Controller/PetitionsController.php b/app/src/Controller/PetitionsController.php index 6950925eb..b6f4a3fb1 100644 --- a/app/src/Controller/PetitionsController.php +++ b/app/src/Controller/PetitionsController.php @@ -225,7 +225,7 @@ public function finalize(string $id) { // configuration (eg: EnvSource's duplicate redirect URL) since in theory any plugin // can trigger this. - $petition = $this->Petitions->get((int)$id, ['contain' => ['EnrollmentFlows']]); + $petition = $this->Petitions->get((int)$id, contain: ['EnrollmentFlows']); // Redirect to configured URL or default location if(!empty($petition->enrollment_flow->redirect_on_duplicate)) { diff --git a/app/src/Controller/SingleAuthenticatorController.php b/app/src/Controller/SingleAuthenticatorController.php index 8634fc1ef..d2b1d9748 100644 --- a/app/src/Controller/SingleAuthenticatorController.php +++ b/app/src/Controller/SingleAuthenticatorController.php @@ -70,7 +70,7 @@ public function manage() { $Authenticators = TableRegistry::getTableLocator()->get('Authenticators'); - $authcfg = $Authenticators->get($cfg->authenticator_id, ['contain' => $authModelsName]); + $authcfg = $Authenticators->get($cfg->authenticator_id, contain: $authModelsName); $status = $Authenticators->AuthenticatorStatuses->getForPerson( $authcfg, diff --git a/app/src/Model/Table/AuthenticatorsTable.php b/app/src/Model/Table/AuthenticatorsTable.php index 843ee697e..ed167f2af 100644 --- a/app/src/Model/Table/AuthenticatorsTable.php +++ b/app/src/Model/Table/AuthenticatorsTable.php @@ -179,7 +179,7 @@ public function lock(int $id, int $personId) { */ protected function processLock(int $id, int $personId, string $action) { - $cfg = $this->get($id, ['contain' => $this->getPluginRelations()]); + $cfg = $this->get($id, contain: $this->getPluginRelations()); // Make sure our configuration is active if($cfg->status != SuspendableStatusEnum::Active) { @@ -241,7 +241,7 @@ protected function processLock(int $id, int $personId, string $action) { */ public function reset(int $id, int $personId) { - $cfg = $this->get($id, ['contain' => $this->getPluginRelations()]); + $cfg = $this->get($id, contain: $this->getPluginRelations()); // Make sure our configuration is active if($cfg->status != SuspendableStatusEnum::Active) { diff --git a/app/src/Model/Table/ExternalIdentitiesTable.php b/app/src/Model/Table/ExternalIdentitiesTable.php index d21208ffb..e91e00926 100644 --- a/app/src/Model/Table/ExternalIdentitiesTable.php +++ b/app/src/Model/Table/ExternalIdentitiesTable.php @@ -269,7 +269,7 @@ public function adopt(int $id): int { ] ]; - $externalIdentity = $this->get($id, ['contain' => $related]); + $externalIdentity = $this->get($id, contain: $related); // For each of the top level related models, walk to the Pipelined record on the Person // and unset the source_ key. @@ -515,7 +515,7 @@ public function recalculateStatus(int $id): ?string { // Start by pulling the roles for this External Identity, along with the EI record - $externalIdentity = $this->get($id, ['contain' => 'ExternalIdentityRoles']); + $externalIdentity = $this->get($id, contain: 'ExternalIdentityRoles'); if(!empty($externalIdentity->external_identity_roles)) { foreach($externalIdentity->external_identity_roles as $role) { diff --git a/app/src/Model/Table/GroupMembersTable.php b/app/src/Model/Table/GroupMembersTable.php index a9c03d114..6dbc9a499 100644 --- a/app/src/Model/Table/GroupMembersTable.php +++ b/app/src/Model/Table/GroupMembersTable.php @@ -314,7 +314,7 @@ public function ruleIsGroupMember($entity, $options) { if($this->isMember($entity->group_id, $entity->person_id, true, false)) { // Pull the Person and Group name for the error message. - $person = $this->People->get($entity->person_id, ['contain' => ['PrimaryName']]); + $person = $this->People->get($entity->person_id, contain: ['PrimaryName']); $group = $this->Groups->get($entity->group_id); return __d('error', 'exists.GroupMember', [$person->primary_name->full_name, $group->name]); diff --git a/app/src/Model/Table/IdentifierAssignmentsTable.php b/app/src/Model/Table/IdentifierAssignmentsTable.php index 3bbc58110..29257a1aa 100644 --- a/app/src/Model/Table/IdentifierAssignmentsTable.php +++ b/app/src/Model/Table/IdentifierAssignmentsTable.php @@ -219,7 +219,7 @@ public function assign( // this should be less brittle if we add support for another model // alongside Identifiers and EmailAddresses.) - $entity = $EntityTable->get($entityId, ['contain' => $contains]); + $entity = $EntityTable->get($entityId, contain: $contains); // Check if there is already an identifier of this type diff --git a/app/src/Model/Table/NotificationsTable.php b/app/src/Model/Table/NotificationsTable.php index 177181ae1..26685b220 100644 --- a/app/src/Model/Table/NotificationsTable.php +++ b/app/src/Model/Table/NotificationsTable.php @@ -425,7 +425,7 @@ public function register( if($subjectPersonId) { // Retrieve and attach the Subject Person $messageTemplate->setContextSubjectPerson( - $this->SubjectPeople->get($subjectPersonId, ['contain' => 'PrimaryName']) + $this->SubjectPeople->get($subjectPersonId, contain: 'PrimaryName') ); } diff --git a/app/src/Model/Table/PetitionsTable.php b/app/src/Model/Table/PetitionsTable.php index 7bf9c2ad1..4ee4ecac6 100644 --- a/app/src/Model/Table/PetitionsTable.php +++ b/app/src/Model/Table/PetitionsTable.php @@ -528,12 +528,12 @@ public function getEnrolleeName(int $id): ?string { // First see if there is an Enrollee Person associated with the Petition, which would // be the case for (eg) account linking. If so, use their Primary Name. - $petition = $this->get($id, ['contain' => [ + $petition = $this->get($id, contain: [ 'EnrolleePeople' => 'PrimaryName', 'PetitionStepResults' => [ 'EnrollmentFlowSteps' => $this->PetitionStepResults->EnrollmentFlowSteps->getPluginRelations() ] - ]]); + ]); if(!empty($petition->enrollee_person->primary_name)) { return $petition->enrollee_person->primary_name->full_name; diff --git a/app/src/Model/Table/PipelinesTable.php b/app/src/Model/Table/PipelinesTable.php index 3836a2e9f..f9c2afa54 100644 --- a/app/src/Model/Table/PipelinesTable.php +++ b/app/src/Model/Table/PipelinesTable.php @@ -1248,15 +1248,15 @@ public function relink( $eis = $this->ExternalIdentitySources->get( $eisRecord->external_identity_source_id, - ['contain' => 'Pipelines'] + contain: 'Pipelines' ); $ei = $this->Cos->People->ExternalIdentities->get( $eisRecord->external_identity_id, - ['contain' => [ + contain: [ 'ExternalIdentityRoles' => 'PersonRoles', 'People' - ]] + ] ); // To start the relinking, tell syncPerson to update the source Person with a @@ -1527,7 +1527,7 @@ protected function searchByAttribute( // syncExternalIdentity will pull whatever Person attributes it actually needs. // AR-Pipeline-2 Pipeline Person Matching ignores the existing Person status. - $person = $SearchTable->People->get($personId, ['contain' => ['Names']]); + $person = $SearchTable->People->get($personId, contain: ['Names']); // We can't record history yet since we don't have an External Identity // (we'll do that in execute()), but we can at least log @@ -1647,7 +1647,7 @@ protected function syncExternalIdentity( $externalIdentity = $this->Cos->People->ExternalIdentities->get( $eisRecord->external_identity_id, - ['contain' => [ + contain: [ 'Addresses', 'AdHocAttributes', 'EmailAddresses', @@ -1661,7 +1661,7 @@ protected function syncExternalIdentity( 'Addresses', 'TelephoneNumbers' ] - ]] + ] ); // Map the current backend record...