mirror of
https://github.com/friendica/friendica
synced 2024-12-22 23:20:16 +00:00
Rename Interface
This commit is contained in:
parent
8894b482dc
commit
86f80af432
7 changed files with 14 additions and 14 deletions
|
@ -22,7 +22,7 @@
|
|||
namespace Friendica\Console;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\KeyValueStorage\Capabilities\ICanManageKeyValuePairs;
|
||||
use Friendica\Core\KeyValueStorage\Capabilities\IManageKeyValuePairs;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Update;
|
||||
|
||||
|
@ -38,7 +38,7 @@ class PostUpdate extends \Asika\SimpleConsole\Console
|
|||
*/
|
||||
private $appMode;
|
||||
/**
|
||||
* @var ICanManageKeyValuePairs
|
||||
* @var IManageKeyValuePairs
|
||||
*/
|
||||
private $keyValue;
|
||||
/**
|
||||
|
@ -60,7 +60,7 @@ HELP;
|
|||
return $help;
|
||||
}
|
||||
|
||||
public function __construct(App\Mode $appMode, ICanManageKeyValuePairs $keyValue, L10n $l10n, array $argv = null)
|
||||
public function __construct(App\Mode $appMode, IManageKeyValuePairs $keyValue, L10n $l10n, array $argv = null)
|
||||
{
|
||||
parent::__construct($argv);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ use Friendica\Core\KeyValueStorage\Exceptions\KeyValueStoragePersistenceExceptio
|
|||
/**
|
||||
* Interface for Friendica specific Key-Value pair storage
|
||||
*/
|
||||
interface ICanManageKeyValuePairs extends \ArrayAccess
|
||||
interface IManageKeyValuePairs extends \ArrayAccess
|
||||
{
|
||||
/**
|
||||
* Get a particular value from the KeyValue Storage
|
|
@ -21,12 +21,12 @@
|
|||
|
||||
namespace Friendica\Core\KeyValueStorage\Type;
|
||||
|
||||
use Friendica\Core\KeyValueStorage\Capabilities\ICanManageKeyValuePairs;
|
||||
use Friendica\Core\KeyValueStorage\Capabilities\IManageKeyValuePairs;
|
||||
|
||||
/**
|
||||
* An abstract helper class for Key-Value storage classes
|
||||
*/
|
||||
abstract class AbstractKeyValueStorage implements ICanManageKeyValuePairs
|
||||
abstract class AbstractKeyValueStorage implements IManageKeyValuePairs
|
||||
{
|
||||
/** {@inheritDoc} */
|
||||
public function get(string $key)
|
||||
|
|
|
@ -181,9 +181,9 @@ abstract class DI
|
|||
return self::$dice->create(Core\Config\Capability\IManageConfigValues::class);
|
||||
}
|
||||
|
||||
public static function keyValue(): Core\KeyValueStorage\Capabilities\ICanManageKeyValuePairs
|
||||
public static function keyValue(): Core\KeyValueStorage\Capabilities\IManageKeyValuePairs
|
||||
{
|
||||
return self::$dice->create(Core\KeyValueStorage\Capabilities\ICanManageKeyValuePairs::class);
|
||||
return self::$dice->create(Core\KeyValueStorage\Capabilities\IManageKeyValuePairs::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -245,7 +245,7 @@ return [
|
|||
['getBackend', [], Dice::CHAIN_CALL],
|
||||
],
|
||||
],
|
||||
\Friendica\Core\KeyValueStorage\Capabilities\ICanManageKeyValuePairs::class => [
|
||||
\Friendica\Core\KeyValueStorage\Capabilities\IManageKeyValuePairs::class => [
|
||||
'instanceOf' => \Friendica\Core\KeyValueStorage\Type\DBKeyValueStorage::class,
|
||||
],
|
||||
Network\HTTPClient\Capability\ICanSendHttpRequests::class => [
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
namespace Friendica\Test\src\Core\KeyValueStorage;
|
||||
|
||||
use Friendica\Core\Config\ValueObject\Cache;
|
||||
use Friendica\Core\KeyValueStorage\Capabilities\ICanManageKeyValuePairs;
|
||||
use Friendica\Core\KeyValueStorage\Capabilities\IManageKeyValuePairs;
|
||||
use Friendica\Core\KeyValueStorage\Type\DBKeyValueStorage;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\Definition\DbaDefinition;
|
||||
|
@ -53,7 +53,7 @@ class DBKeyValueStorageTest extends KeyValueStorageTest
|
|||
$this->tearDownDb();
|
||||
}
|
||||
|
||||
public function getInstance(): ICanManageKeyValuePairs
|
||||
public function getInstance(): IManageKeyValuePairs
|
||||
{
|
||||
$cache = new Cache();
|
||||
$cache->set('database', 'disable_pdo', true);
|
||||
|
|
|
@ -21,18 +21,18 @@
|
|||
|
||||
namespace Friendica\Test\src\Core\KeyValueStorage;
|
||||
|
||||
use Friendica\Core\KeyValueStorage\Capabilities\ICanManageKeyValuePairs;
|
||||
use Friendica\Core\KeyValueStorage\Capabilities\IManageKeyValuePairs;
|
||||
use Friendica\Test\MockedTest;
|
||||
|
||||
abstract class KeyValueStorageTest extends MockedTest
|
||||
{
|
||||
abstract public function getInstance(): ICanManageKeyValuePairs;
|
||||
abstract public function getInstance(): IManageKeyValuePairs;
|
||||
|
||||
public function testInstance()
|
||||
{
|
||||
$instance = $this->getInstance();
|
||||
|
||||
self::assertInstanceOf(ICanManageKeyValuePairs::class, $instance);
|
||||
self::assertInstanceOf(IManageKeyValuePairs::class, $instance);
|
||||
}
|
||||
|
||||
public function dataTests(): array
|
||||
|
|
Loading…
Reference in a new issue