Skip to content

Commit

Permalink
Code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Dec 7, 2020
1 parent 859a5de commit 6f5b9a9
Show file tree
Hide file tree
Showing 25 changed files with 1,210 additions and 353 deletions.
863 changes: 852 additions & 11 deletions .editorconfig

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
language: php

php:
- 7.3
- 7.4
- nightly
- 8.0

before_install:
# Turn off XDebug
Expand Down Expand Up @@ -45,8 +44,7 @@ jobs:

allow_failures:
- stage: Test Coverage
- php: 7.4snapshot
- php: nightly
- php: 8.0

sudo: false

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"authors" : [
{
"name" : "FastyBird s.r.o.",
"email" : "info@fastybird.com",
"email" : "code@fastybird.com",
"homepage" : "https://www.fastybird.com/"
},
{
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ $ composer require fastybird/couchdb-storage-plugin
Learn how to consume & publish messages in [documentation](https://github.com/FastyBird/couchdb-storage-plugin/blob/master/docs/en/index.md).

***
Homepage [http://www.fastybird.com](http://www.fastybird.com) and repository [https://github.com/FastyBird/couchdb-storage-plugin](https://github.com/FastyBird/couchdb-storage-plugin).
Homepage [https://www.fastybird.com](https://www.fastybird.com) and repository [https://github.com/FastyBird/couchdb-storage-plugin](https://github.com/FastyBird/couchdb-storage-plugin).
2 changes: 1 addition & 1 deletion src/Connections/CouchDbConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* CouchDbConnection.php
*
* @license More in license.md
* @copyright https://fastybird.com
* @copyright https://www.fastybird.com
* @author Adam Kadlec <adam.kadlec@fastybird.com>
* @package FastyBird:CouchDbStoragePlugin!
* @subpackage Connections
Expand Down
2 changes: 1 addition & 1 deletion src/Connections/ICouchDbConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* ICouchDbConnection.php
*
* @license More in license.md
* @copyright https://fastybird.com
* @copyright https://www.fastybird.com
* @author Adam Kadlec <adam.kadlec@fastybird.com>
* @package FastyBird:CouchDbStoragePlugin!
* @subpackage Connections
Expand Down
48 changes: 26 additions & 22 deletions src/DI/CouchDbStoragePluginExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,40 @@
class CouchDbStoragePluginExtension extends DI\CompilerExtension
{

/**
* @param Nette\Configurator $config
* @param string $extensionName
*
* @return void
*/
public static function register(
Nette\Configurator $config,
string $extensionName = 'fbCouchDbStoragePlugin'
): void {
$config->onCompile[] = function (
Nette\Configurator $config,
DI\Compiler $compiler
) use ($extensionName): void {
$compiler->addExtension($extensionName, new CouchDbStoragePluginExtension());
};
}

/**
* {@inheritDoc}
*/
public function getConfigSchema(): Schema\Schema
{
return Schema\Expect::structure([
'connection' => Schema\Expect::structure([
'database' => Schema\Expect::string()->default('state_storage'),
'host' => Schema\Expect::string()->default('127.0.0.1'),
'database' => Schema\Expect::string()
->default('state_storage'),
'host' => Schema\Expect::string()
->default('127.0.0.1'),
'port' => Schema\Expect::int(5672),
'username' => Schema\Expect::string('guest')->nullable(),
'password' => Schema\Expect::string('guest')->nullable(),
'username' => Schema\Expect::string('guest')
->nullable(),
'password' => Schema\Expect::string('guest')
->nullable(),
]),
]);
}
Expand Down Expand Up @@ -75,22 +97,4 @@ public function loadConfiguration(): void
->setType(Models\PropertyRepository::class);
}

/**
* @param Nette\Configurator $config
* @param string $extensionName
*
* @return void
*/
public static function register(
Nette\Configurator $config,
string $extensionName = 'fbCouchDbStoragePlugin'
): void {
$config->onCompile[] = function (
Nette\Configurator $config,
DI\Compiler $compiler
) use ($extensionName): void {
$compiler->addExtension($extensionName, new CouchDbStoragePluginExtension());
};
}

}
2 changes: 1 addition & 1 deletion src/Exceptions/IException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* IException.php
*
* @license More in license.md
* @copyright https://fastybird.com
* @copyright https://www.fastybird.com
* @author Adam Kadlec <adam.kadlec@fastybird.com>
* @package FastyBird:CouchDbStoragePlugin!
* @subpackage Exceptions
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* InvalidArgumentException.php
*
* @license More in license.md
* @copyright https://fastybird.com
* @copyright https://www.fastybird.com
* @author Adam Kadlec <adam.kadlec@fastybird.com>
* @package FastyBird:CouchDbStoragePlugin!
* @subpackage Exceptions
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidStateException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* InvalidStateException.php
*
* @license More in license.md
* @copyright https://fastybird.com
* @copyright https://www.fastybird.com
* @author Adam Kadlec <adam.kadlec@fastybird.com>
* @package FastyBird:CouchDbStoragePlugin!
* @subpackage Exceptions
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/NotUpdatedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* NotUpdatedException.php
*
* @license More in license.md
* @copyright https://fastybird.com
* @copyright https://www.fastybird.com
* @author Adam Kadlec <adam.kadlec@fastybird.com>
* @package FastyBird:CouchDbStoragePlugin!
* @subpackage Exceptions
Expand Down
2 changes: 1 addition & 1 deletion src/Models/IPropertiesManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* IPropertiesManager.php
*
* @license More in license.md
* @copyright https://fastybird.com
* @copyright https://www.fastybird.com
* @author Adam Kadlec <adam.kadlec@fastybird.com>
* @package FastyBird:CouchDbStoragePlugin!
* @subpackage Models
Expand Down
2 changes: 1 addition & 1 deletion src/Models/IPropertyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* IPropertyRepository.php
*
* @license More in license.md
* @copyright https://fastybird.com
* @copyright https://www.fastybird.com
* @author Adam Kadlec <adam.kadlec@fastybird.com>
* @package FastyBird:CouchDbStoragePlugin!
* @subpackage Models
Expand Down

0 comments on commit 6f5b9a9

Please sign in to comment.