Skip to content
Permalink
Browse files

PHPCS

  • Loading branch information
niden committed Jan 30, 2020
1 parent 74aa882 commit 07d9f1e0fcd6196b97bc2dbb0a4b9c7a593d2ceb
Showing with 223 additions and 247 deletions.
  1. +1 −0 phpcs.xml
  2. +5 −8 tests/database/Mvc/Model/AssignCest.php
  3. +3 −7 tests/database/Mvc/Model/CountCest.php
  4. +5 −6 tests/database/Mvc/Model/CreateCest.php
  5. +5 −6 tests/database/Mvc/Model/DeleteCest.php
  6. +3 −3 tests/database/Mvc/Model/FindCest.php
  7. +2 −2 tests/database/Mvc/Model/GetSetEventsManagerCest.php
  8. +3 −4 tests/database/Mvc/Model/RefreshCest.php
  9. +4 −4 tests/database/Mvc/Model/SerializeCest.php
  10. +2 −2 tests/database/Paginator/Model/ConstructCest.php
  11. +6 −9 tests/database/Paginator/Model/PaginateCest.php
  12. +2 −4 tests/database/Paginator/Model/SetGetLimitCest.php
  13. +1 −1 tests/integration/Mvc/Dispatcher/Refactor-ForwardCest.php
  14. +3 −3 tests/integration/Mvc/Model/FindFirstCest.php
  15. +4 −4 tests/integration/Session/Manager/ExistsDestroyCest.php
  16. +1 −1 tests/integration/Storage/Adapter/Libmemcached/GetKeysCest.php
  17. +0 −1 tests/integration/Storage/Adapter/Redis/ConstructCest.php
  18. +1 −1 tests/integration/Storage/Adapter/Stream/GetPrefixCest.php
  19. +1 −1 tests/integration/Storage/Serializer/Base64/SerializeCest.php
  20. +1 −1 tests/integration/Storage/Serializer/Base64/UnserializeCest.php
  21. +1 −1 tests/integration/Storage/Serializer/Igbinary/SerializeCest.php
  22. +1 −1 tests/integration/Storage/Serializer/Igbinary/UnserializeCest.php
  23. +2 −2 tests/integration/Storage/Serializer/Json/SerializeCest.php
  24. +1 −1 tests/integration/Storage/Serializer/Json/UnserializeCest.php
  25. +1 −1 tests/integration/Storage/Serializer/Msgpack/SerializeCest.php
  26. +1 −1 tests/integration/Storage/Serializer/Msgpack/UnserializeCest.php
  27. +1 −1 tests/integration/Storage/Serializer/None/SerializeCest.php
  28. +1 −1 tests/integration/Storage/Serializer/None/UnserializeCest.php
  29. +1 −1 tests/integration/Storage/Serializer/Php/SerializeCest.php
  30. +1 −1 tests/integration/Storage/Serializer/Php/UnserializeCest.php
  31. +1 −1 tests/integration/Storage/SerializerFactory/NewInstanceCest.php
  32. +1 −1 tests/unit/Annotations/Adapter/Memory/ConstructCest.php
  33. +1 −1 tests/unit/Annotations/Adapter/Memory/GetCest.php
  34. +1 −1 tests/unit/Annotations/Adapter/Memory/GetMethodCest.php
  35. +1 −1 tests/unit/Annotations/Adapter/Memory/GetPropertiesCest.php
  36. +1 −2 tests/unit/Annotations/Annotation/ConstructCest.php
  37. +11 −10 tests/unit/Annotations/Annotation/GetArgumentCest.php
  38. +10 −9 tests/unit/Annotations/Annotation/GetArgumentsCest.php
  39. +9 −8 tests/unit/Annotations/Annotation/GetExprArgumentsCest.php
  40. +8 −8 tests/unit/Annotations/Annotation/GetExpressionCest.php
  41. +1 −1 tests/unit/Annotations/Annotation/GetNameCest.php
  42. +23 −22 tests/unit/Annotations/Annotation/GetNamedArgumentCest.php
  43. +23 −22 tests/unit/Annotations/Annotation/GetNamedParameterCest.php
  44. +11 −10 tests/unit/Annotations/Annotation/HasArgumentCest.php
  45. +11 −10 tests/unit/Annotations/Annotation/NumberArgumentsCest.php
  46. +1 −1 tests/unit/Annotations/Reader/ParseCest.php
  47. +1 −1 tests/unit/Collection/Collection/JsonSerializeCest.php
  48. +1 −1 tests/unit/Config/ConfigFactory/LoadCest.php
  49. +3 −3 tests/unit/Debug/GetJsSourcesCest.php
  50. +1 −1 tests/unit/Dispatcher/GetSetEventsManagerCest.php
  51. +2 −1 tests/unit/Domain/Payload/Payload/GetSetExceptionCest.php
  52. +3 −3 tests/unit/Helper/Str/DecrementCest.php
  53. +3 −3 tests/unit/Helper/Str/IncrementCest.php
  54. +1 −1 tests/unit/Http/Cookie/DeleteCest.php
  55. +1 −1 tests/unit/Http/Request/RequestCest.php
  56. +2 −2 tests/unit/Http/Response/Cookies/ConstructCest.php
  57. +3 −3 tests/unit/Http/Response/Cookies/DeleteCest.php
  58. +3 −3 tests/unit/Http/Response/Cookies/GetCookiesCest.php
  59. +1 −1 tests/unit/Http/Response/Cookies/GetSetCest.php
  60. +1 −1 tests/unit/Http/Response/Cookies/HasCest.php
  61. +3 −3 tests/unit/Http/Response/Cookies/ResetCest.php
  62. +1 −2 tests/unit/Http/Response/Cookies/SendCest.php
  63. +1 −2 tests/unit/Http/Response/Cookies/SetSignKeyCest.php
  64. +4 −3 tests/unit/Http/Response/Cookies/UseEncryptionIsUsingEncryptionCest.php
  65. +4 −3 tests/unit/Http/Response/GetSetEventsManagerCest.php
  66. +2 −2 tests/unit/Image/Adapter/Gd/GetRealpathCest.php
  67. +2 −2 tests/unit/Loader/GetSetEventsManagerCest.php
  68. +1 −1 tests/unit/Logger/AdapterFactory/NewInstanceCest.php
  69. +0 −1 tests/unit/Logger/Formatter/Line/FormatCest.php
  70. +1 −4 tests/unit/Translate/Adapter/Gettext/NqueryCest.php
  71. +0 −3 tests/unit/Translate/Adapter/Gettext/QueryCest.php
  72. +0 −3 tests/unit/Translate/Adapter/Gettext/ResetDomainCest.php
  73. +0 −3 tests/unit/Translate/Adapter/Gettext/SetDomainCest.php
  74. +0 −3 tests/unit/Translate/Adapter/Gettext/UnderscoreCest.php
@@ -8,6 +8,7 @@
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
</rule>
<file>tests/cli</file>
<file>tests/database</file>
<file>tests/integration</file>
<file>tests/unit</file>
</ruleset>
@@ -15,12 +15,9 @@

use DatabaseTester;
use Phalcon\Test\Fixtures\Migrations\InvoicesMigration;
use Phalcon\Test\Fixtures\Migrations\ObjectsMigration;
use Phalcon\Test\Fixtures\Traits\DiTrait;
use Phalcon\Test\Models\Invoices;
use Phalcon\Test\Models\Objects;
use Phalcon\Test\Models\Personas;
use Phalcon\Test\Models\Users;

use function uniqid;

class AssignCest
@@ -34,7 +31,7 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

@@ -48,9 +45,9 @@ public function mvcModelAssign(DatabaseTester $I)
{
$I->wantToTest('Mvc\Model - assign()');

$title = uniqid('inv-');
$date = date('Y-m-d H:i:s');
$data = [
$title = uniqid('inv-');
$date = date('Y-m-d H:i:s');
$data = [
'inv_id' => 1,
'inv_cst_id' => 2,
'inv_status_flag' => 3,
@@ -20,10 +20,6 @@
use Phalcon\Test\Fixtures\Traits\RecordsTrait;
use Phalcon\Test\Models\Invoices;
use Phalcon\Test\Models\InvoicesMap;
use Phalcon\Test\Models\Personnes;
use Phalcon\Test\Models\Pessoas;
use function uniqid;
use function var_dump;

class CountCest
{
@@ -37,7 +33,7 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

@@ -58,7 +54,7 @@ public function mvcModelCount(DatabaseTester $I)
if ('sqlite' !== $driver) {
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);

$this->insertDataInvoices($migration, 7, 2, 'ccc');
$this->insertDataInvoices($migration, 1, 3, 'aaa');
@@ -128,7 +124,7 @@ public function mvcModelCountColumnMap(DatabaseTester $I)
if ('sqlite' !== $driver) {
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);

$this->insertDataInvoices($migration, 7, 2, 'ccc');
$this->insertDataInvoices($migration, 1, 3, 'aaa');
@@ -16,9 +16,8 @@
use DatabaseTester;
use Phalcon\Test\Fixtures\Migrations\InvoicesMigration;
use Phalcon\Test\Fixtures\Traits\DiTrait;
use Phalcon\Test\Models\AlbumORama\Artists;

use Phalcon\Test\Models\Invoices;

use function date;
use function uniqid;

@@ -36,7 +35,7 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

@@ -50,9 +49,9 @@ public function mvcModelCreate(DatabaseTester $I)
{
$I->wantToTest('Mvc\Model - create()');

$title = uniqid('inv-');
$date = date('Y-m-d H:i:s');
$invoice = new Invoices();
$title = uniqid('inv-');
$date = date('Y-m-d H:i:s');
$invoice = new Invoices();
$invoice->inv_id = 1;
$invoice->inv_cst_id = 2;
$invoice->inv_status_flag = 3;
@@ -16,9 +16,8 @@
use DatabaseTester;
use Phalcon\Test\Fixtures\Migrations\InvoicesMigration;
use Phalcon\Test\Fixtures\Traits\DiTrait;
use Phalcon\Test\Models\AlbumORama\Artists;

use Phalcon\Test\Models\Invoices;

use function date;
use function uniqid;

@@ -36,7 +35,7 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

@@ -50,9 +49,9 @@ public function mvcModelDelete(DatabaseTester $I)
{
$I->wantToTest('Mvc\Model - delete()');

$title = uniqid('inv-');
$date = date('Y-m-d H:i:s');
$invoice = new Invoices();
$title = uniqid('inv-');
$date = date('Y-m-d H:i:s');
$invoice = new Invoices();
$invoice->inv_id = 1;
$invoice->inv_cst_id = 2;
$invoice->inv_status_flag = 3;
@@ -38,7 +38,7 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new ObjectsMigration($connection);
$migration = new ObjectsMigration($connection);
$migration->clear();
}

@@ -54,7 +54,7 @@ public function mvcModelFind(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new ObjectsMigration($connection);
$migration = new ObjectsMigration($connection);
$migration->insert(1, 'random data', 1);

$data = Objects::find();
@@ -81,7 +81,7 @@ public function mvcModelFindWithCache(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new ObjectsMigration($connection);
$migration = new ObjectsMigration($connection);
$migration->insert(1, 'random data', 1);

$options = [
@@ -35,7 +35,7 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

@@ -52,7 +52,7 @@ public function mvcModelGetEventsManager(DatabaseTester $I)
$title = uniqid('inv-');
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->insert(4, null, 0, $title);

$invoice = Invoices::findFirst();
@@ -17,8 +17,7 @@
use Phalcon\Test\Fixtures\Migrations\InvoicesMigration;
use Phalcon\Test\Fixtures\Traits\DiTrait;
use Phalcon\Test\Models\Invoices;
use Phalcon\Test\Models\Personas;
use function date;

use function uniqid;

class RefreshCest
@@ -32,7 +31,7 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

@@ -46,7 +45,7 @@ public function mvcModelRefresh(DatabaseTester $I)
$title = uniqid('inv-');
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->insert(4, null, 0, $title);

$invoice = Invoices::findFirst();
@@ -37,7 +37,7 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

@@ -51,9 +51,9 @@ public function mvcModelSerialize(DatabaseTester $I)
{
$I->wantToTest('Mvc\Model - serialize()');

$title = uniqid('inv-');
$date = date('Y-m-d H:i:s');
$data = [
$title = uniqid('inv-');
$date = date('Y-m-d H:i:s');
$data = [
'inv_id' => 1,
'inv_cst_id' => 2,
'inv_status_flag' => 3,
@@ -35,7 +35,7 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

@@ -52,7 +52,7 @@ public function paginatorAdapterModelConstruct(DatabaseTester $I)
$title = uniqid('inv-');
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->insert(4, null, 0, $title);

$paginator = new Model(
@@ -21,8 +21,6 @@
use Phalcon\Test\Fixtures\Traits\RecordsTrait;
use Phalcon\Test\Models\Invoices;

use function uniqid;

class PaginateCest
{
use DiTrait;
@@ -35,15 +33,15 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

public function paginatorAdapterModelPaginate(DatabaseTester $I)
{
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$this->insertDataInvoices($migration, 17, 2, 'ccc');
$this->insertDataInvoices($migration, 11, 3, 'aaa');
$this->insertDataInvoices($migration, 31, 1, 'aaa');
@@ -96,7 +94,7 @@ public function paginatorAdapterModelPaginateBind(DatabaseTester $I)
{
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$this->insertDataInvoices($migration, 17, 2, 'ccc');
$this->insertDataInvoices($migration, 11, 3, 'aaa');
$this->insertDataInvoices($migration, 31, 1, 'aaa');
@@ -137,7 +135,7 @@ public function paginatorAdapterModelPaginateParametersString(DatabaseTester $I)
{
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$this->insertDataInvoices($migration, 17, 2, 'ccc');
$this->insertDataInvoices($migration, 11, 3, 'aaa');
$this->insertDataInvoices($migration, 31, 1, 'aaa');
@@ -169,7 +167,7 @@ public function paginatorAdapterModelPaginateParametersArrayString(DatabaseTeste
{
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$this->insertDataInvoices($migration, 17, 2, 'ccc');
$this->insertDataInvoices($migration, 11, 3, 'aaa');
$this->insertDataInvoices($migration, 31, 1, 'aaa');
@@ -179,7 +177,7 @@ public function paginatorAdapterModelPaginateParametersArrayString(DatabaseTeste
[
'model' => Invoices::class,
'parameters' => [
'inv_cst_id >= 2'
'inv_cst_id >= 2',
],
'limit' => 5,
'page' => 1,
@@ -198,5 +196,4 @@ public function paginatorAdapterModelPaginateParametersArrayString(DatabaseTeste
$I->assertEquals(5, $page->getLimit());
$I->assertEquals(1, $page->getCurrent());
}

}
@@ -15,12 +15,10 @@

use DatabaseTester;
use Phalcon\Paginator\Adapter\Model;
use Phalcon\Paginator\Repository;
use Phalcon\Test\Fixtures\Migrations\InvoicesMigration;
use Phalcon\Test\Fixtures\Traits\DiTrait;
use Phalcon\Test\Fixtures\Traits\RecordsTrait;
use Phalcon\Test\Models\Invoices;
use Phalcon\Test\Models\Personnes;

/**
* Class SetGetLimitCest
@@ -37,7 +35,7 @@ public function _before(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

@@ -53,7 +51,7 @@ public function paginatorAdapterModelGetLimit(DatabaseTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$this->insertDataInvoices($migration, 17, 2, 'ccc');
$this->insertDataInvoices($migration, 11, 3, 'aaa');
$this->insertDataInvoices($migration, 31, 1, 'aaa');
@@ -56,7 +56,7 @@ function () {
function ($event, $dispatcher, $exception) {
$dispatcher->forward(
[
'namespace' => 'Phalcon\Test\Controllers',
'namespace' => 'Phalcon\Test\Controllers',
'controller' => 'exception',
'action' => 'second',
]
@@ -36,7 +36,7 @@ public function _before(IntegrationTester $I)

/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->clear();
}

@@ -53,7 +53,7 @@ public function mvcModelFindFirst(IntegrationTester $I)
$title = uniqid('inv-');
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->insert(4, null, 0, $title);

$invoice = Invoices::findFirst();
@@ -128,7 +128,7 @@ public function mvcModelFindFirstExtended(IntegrationTester $I)
$title = uniqid('inv-');
/** @var PDO $connection */
$connection = $I->getConnection();
$migration = new InvoicesMigration($connection);
$migration = new InvoicesMigration($connection);
$migration->insert(4, null, 0, $title);

$invoice = InvoicesExtended::findFirst(4);

0 comments on commit 07d9f1e

Please sign in to comment.
You can’t perform that action at this time.