1
0
Fork 0

Rename Interface

This commit is contained in:
Philipp Holzer 2022-12-29 22:37:12 +01:00
parent 8894b482dc
commit 86f80af432
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
7 changed files with 14 additions and 14 deletions

View file

@ -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);

View file

@ -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

View file

@ -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)

View file

@ -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);
}
/**

View file

@ -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 => [

View file

@ -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);

View file

@ -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