Skip to content

Commit

Permalink
Update db configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nguereza-tony committed Nov 21, 2023
1 parent 78b1eb8 commit 2dd196c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/Config/AppDatabaseConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
/**
* @class AppDatabaseConfig
* @package Platine\Framework\Config
* @template TEntity as Configuration
* @template TDbConfigurationEntity as \Platine\Framework\Config\Model\Configuration
* @implements ArrayAccess<string, mixed>
*/
class AppDatabaseConfig implements ArrayAccess
{
/**
* The configuration loader to use
* @var DatabaseConfigLoaderInterface<TEntity>
* @var DatabaseConfigLoaderInterface<TDbConfigurationEntity>
*/
protected DatabaseConfigLoaderInterface $loader;

Expand All @@ -79,7 +79,7 @@ class AppDatabaseConfig implements ArrayAccess

/**
* Create new configuration instance
* @param DatabaseConfigLoaderInterface<TEntity> $loader the loader to use
* @param DatabaseConfigLoaderInterface<TDbConfigurationEntity> $loader the loader to use
* @param string $env the name of the environment
*/
public function __construct(DatabaseConfigLoaderInterface $loader, string $env = '')
Expand Down Expand Up @@ -183,7 +183,7 @@ public function setEnvironment(string $env): self

/**
* Return the configuration current loader
* @return DatabaseConfigLoaderInterface<TEntity>
* @return DatabaseConfigLoaderInterface<TDbConfigurationEntity>
*/
public function getLoader(): DatabaseConfigLoaderInterface
{
Expand All @@ -193,7 +193,7 @@ public function getLoader(): DatabaseConfigLoaderInterface
/**
* Set the configuration loader
*
* @param DatabaseConfigLoaderInterface<TEntity> $loader
* @param DatabaseConfigLoaderInterface<TDbConfigurationEntity> $loader
* @return $this
*/
public function setLoader(DatabaseConfigLoaderInterface $loader): self
Expand All @@ -205,7 +205,7 @@ public function setLoader(DatabaseConfigLoaderInterface $loader): self

/**
* Return all the configuration
* @return TEntity[]
* @return TDbConfigurationEntity[]
*/
public function all(): array
{
Expand Down
4 changes: 2 additions & 2 deletions src/Config/ConfigurationRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
/**
* @class ConfigurationRepositoryInterface
* @package Platine\Framework\Config
* @template TEntity as \Platine\Orm\Entity
* @extends RepositoryInterface<TEntity>
* @template TDbConfigurationEntity as \Platine\Orm\Entity
* @extends RepositoryInterface<TDbConfigurationEntity>
*/
interface ConfigurationRepositoryInterface extends RepositoryInterface
{
Expand Down
8 changes: 4 additions & 4 deletions src/Config/DatabaseConfigLoaderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@
/**
* @class DatabaseConfigLoaderInterface
* @package Platine\Framework\Config
* @template TEntity as Entity
* @template TDbConfigurationEntity as Entity
*/
interface DatabaseConfigLoaderInterface extends LoaderInterface
{
/**
* Load the configuration from database
* @param array<string, mixed> $where
* @return TEntity|null
* @return TDbConfigurationEntity|null
*/
public function loadConfig(array $where = []): ?Entity;

Expand All @@ -73,14 +73,14 @@ public function insertConfig(array $data);

/**
* Update the configuration
* @param TEntity $entity
* @param TDbConfigurationEntity $entity
* @return bool
*/
public function updateConfig(Entity $entity): bool;

/**
* Return all the configuration
* @return TEntity[]
* @return TDbConfigurationEntity[]
*/
public function all(): array;
}

0 comments on commit 2dd196c

Please sign in to comment.