diff --git a/modules/common/src/Storage/AbstractDatabaseTable.php b/modules/common/src/Storage/AbstractDatabaseTable.php index e9268fc59c..f7bd4e5b25 100644 --- a/modules/common/src/Storage/AbstractDatabaseTable.php +++ b/modules/common/src/Storage/AbstractDatabaseTable.php @@ -20,11 +20,6 @@ abstract class AbstractDatabaseTable implements DatabaseTableInterface { */ const EVENT_TABLE_CREATE = 'dkan_common_table_create'; - /** - * Real table name. - */ - protected string $tableName; - /** * A schema. Should be a drupal schema array. * @@ -45,7 +40,7 @@ abstract class AbstractDatabaseTable implements DatabaseTableInterface { * Transform the string data given into what should be use by the insert * query. */ - abstract protected function prepareData(string $data, string $id = NULL): array; + abstract protected function prepareData(string $data, ?string $id = NULL): array; /** * Get the primary key used in the table. @@ -110,7 +105,7 @@ public function retrieveAll(): array { /** * Store data. */ - public function store($data, string $id = NULL): string { + public function store($data, ?string $id = NULL): string { $this->setTable(); $existing = (isset($id)) ? $this->retrieve($id) : NULL; diff --git a/modules/datastore/src/Storage/DatabaseTable.php b/modules/datastore/src/Storage/DatabaseTable.php index ee8a57597f..6e7a93c639 100755 --- a/modules/datastore/src/Storage/DatabaseTable.php +++ b/modules/datastore/src/Storage/DatabaseTable.php @@ -49,7 +49,6 @@ public function __construct( if ($this->tableExist($this->getTableName())) { $this->setSchemaFromTable(); - $this->tableName = $this->getTableName(); } } diff --git a/modules/datastore/src/Storage/DatabaseTableFactory.php b/modules/datastore/src/Storage/DatabaseTableFactory.php index a98f88e152..9ade6a0e24 100644 --- a/modules/datastore/src/Storage/DatabaseTableFactory.php +++ b/modules/datastore/src/Storage/DatabaseTableFactory.php @@ -28,7 +28,7 @@ class DatabaseTableFactory implements FactoryInterface { */ public function __construct( Connection $connection, - LoggerInterface $loggerChannel + LoggerInterface $loggerChannel, ) { $this->connection = $connection; $this->logger = $loggerChannel;