From 54e5876059df7ce61328ccb833b5155b35de6f1f Mon Sep 17 00:00:00 2001 From: Mark Lister Date: Sat, 22 Apr 2023 23:02:52 +1200 Subject: [PATCH] Refining property types instead of generic Table --- src/Adapter/DbAcl.php | 11 +++++++---- src/Model/Table/PermissionsTable.php | 6 ++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Adapter/DbAcl.php b/src/Adapter/DbAcl.php index 379f498e..d4953829 100644 --- a/src/Adapter/DbAcl.php +++ b/src/Adapter/DbAcl.php @@ -19,7 +19,10 @@ use Cake\Controller\Component; use Cake\Core\App; use Cake\ORM\TableRegistry; -use Cake\ORM\Table; +use Acl\Model\Table\PermissionsTable; +use Acl\Model\Table\ArosTable; +use Acl\Model\Table\AcosTable; + /** * DbAcl implements an ACL control system in the database. ARO's and ACO's are @@ -41,9 +44,9 @@ */ class DbAcl implements AclInterface { - private Table $Permission; - private Table $Aro; - private Table $Aco; + private PermissionsTable $Permission; + private ArosTable $Aro; + private AcosTable $Aco; /** * Constructor diff --git a/src/Model/Table/PermissionsTable.php b/src/Model/Table/PermissionsTable.php index 3e8bbc6b..238cffb1 100644 --- a/src/Model/Table/PermissionsTable.php +++ b/src/Model/Table/PermissionsTable.php @@ -20,6 +20,8 @@ use Cake\Core\Exception\Exception; use Cake\ORM\Table; use Cake\Utility\Hash; +use Acl\Model\Table\ArosTable; +use Acl\Model\Table\AcosTable; /** * Permissions linking AROs with ACOs @@ -27,8 +29,8 @@ */ class PermissionsTable extends AclNodesTable { - private Table $Aro; - private Table $Aco; + private ArosTable $Aro; + private AcosTable $Aco; /** * {@inheritDoc}