Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"phpunit/phpcov": "^9.0.2 || ^10.0",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^3.0",
"rector/rector": "2.6.7",
"rector/rector": "2.7.0",
"shipmonk/phpstan-baseline-per-identifier": "^2.0"
},
"replace": {
Expand Down
2 changes: 0 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Rector\CodeQuality\Rector\BooleanNot\NegatedAndsToPositiveOrsRector;
use Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector;
use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
use Rector\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector;
use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector;
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
Expand Down Expand Up @@ -174,7 +173,6 @@
->withRules([
DeclareStrictTypesRector::class,
UnderscoreToCamelCaseVariableNameRector::class,
SimplifyUselessVariableRector::class,
PassStrictParameterToFunctionParameterRector::class,
RemoveErrorSuppressInTryCatchStmtsRector::class,
FuncGetArgsToVariadicParamRector::class,
Expand Down
38 changes: 19 additions & 19 deletions tests/system/Database/Live/ForgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,10 @@ public function testForeignKey(): void
}

$this->assertSame($foreignKeyData[$foreignKeyName]->constraint_name, $foreignKeyName);
$this->assertSame($foreignKeyData[$foreignKeyName]->column_name, ['users_id']);
$this->assertSame($foreignKeyData[$foreignKeyName]->foreign_column_name, ['id']);
$this->assertSame($foreignKeyData[$foreignKeyName]->table_name, $this->db->DBPrefix . $tableName);
$this->assertSame($foreignKeyData[$foreignKeyName]->foreign_table_name, $this->db->DBPrefix . 'forge_test_users');
$this->assertSame(['users_id'], $foreignKeyData[$foreignKeyName]->column_name);
$this->assertSame(['id'], $foreignKeyData[$foreignKeyName]->foreign_column_name);
$this->assertSame($this->db->DBPrefix . $tableName, $foreignKeyData[$foreignKeyName]->table_name);
$this->assertSame($this->db->DBPrefix . 'forge_test_users', $foreignKeyData[$foreignKeyName]->foreign_table_name);

$this->forge->dropTable($tableName, true);
$this->forge->dropTable('forge_test_users', true);
Expand Down Expand Up @@ -1170,63 +1170,63 @@ public function testCompositeKey(): void

if ($this->db->DBDriver === 'MySQLi') {
$this->assertSame('PRIMARY', $keys['PRIMARY']->name);
$this->assertSame($keys['PRIMARY']->fields, ['id']);
$this->assertSame(['id'], $keys['PRIMARY']->fields);
$this->assertSame('PRIMARY', $keys['PRIMARY']->type);

$this->assertSame('code_company', $keys['code_company']->name);
$this->assertSame($keys['code_company']->fields, ['code', 'company']);
$this->assertSame(['code', 'company'], $keys['code_company']->fields);
$this->assertSame('INDEX', $keys['code_company']->type);

$this->assertSame('code_active', $keys['code_active']->name);
$this->assertSame($keys['code_active']->fields, ['code', 'active']);
$this->assertSame(['code', 'active'], $keys['code_active']->fields);
$this->assertSame('UNIQUE', $keys['code_active']->type);
} elseif ($this->db->DBDriver === 'Postgre') {
$this->assertSame('pk_db_forge_test_1', $keys['pk_db_forge_test_1']->name);
$this->assertSame($keys['pk_db_forge_test_1']->fields, ['id']);
$this->assertSame(['id'], $keys['pk_db_forge_test_1']->fields);
$this->assertSame('PRIMARY', $keys['pk_db_forge_test_1']->type);

$this->assertSame('db_forge_test_1_code_company', $keys['db_forge_test_1_code_company']->name);
$this->assertSame($keys['db_forge_test_1_code_company']->fields, ['code', 'company']);
$this->assertSame(['code', 'company'], $keys['db_forge_test_1_code_company']->fields);
$this->assertSame('INDEX', $keys['db_forge_test_1_code_company']->type);

$this->assertSame('db_forge_test_1_code_active', $keys['db_forge_test_1_code_active']->name);
$this->assertSame($keys['db_forge_test_1_code_active']->fields, ['code', 'active']);
$this->assertSame(['code', 'active'], $keys['db_forge_test_1_code_active']->fields);
$this->assertSame('UNIQUE', $keys['db_forge_test_1_code_active']->type);
} elseif ($this->db->DBDriver === 'SQLite3') {
$this->assertSame('PRIMARY', $keys['PRIMARY']->name);
$this->assertSame($keys['PRIMARY']->fields, ['id']);
$this->assertSame(['id'], $keys['PRIMARY']->fields);
$this->assertSame('PRIMARY', $keys['PRIMARY']->type);

$this->assertSame('db_forge_test_1_code_company', $keys['db_forge_test_1_code_company']->name);
$this->assertSame($keys['db_forge_test_1_code_company']->fields, ['code', 'company']);
$this->assertSame(['code', 'company'], $keys['db_forge_test_1_code_company']->fields);
$this->assertSame('INDEX', $keys['db_forge_test_1_code_company']->type);

$this->assertSame('db_forge_test_1_code_active', $keys['db_forge_test_1_code_active']->name);
$this->assertSame($keys['db_forge_test_1_code_active']->fields, ['code', 'active']);
$this->assertSame(['code', 'active'], $keys['db_forge_test_1_code_active']->fields);
$this->assertSame('UNIQUE', $keys['db_forge_test_1_code_active']->type);
} elseif ($this->db->DBDriver === 'SQLSRV') {
$this->assertSame('pk_db_forge_test_1', $keys['pk_db_forge_test_1']->name);
$this->assertSame($keys['pk_db_forge_test_1']->fields, ['id']);
$this->assertSame(['id'], $keys['pk_db_forge_test_1']->fields);
$this->assertSame('PRIMARY', $keys['pk_db_forge_test_1']->type);

$this->assertSame('db_forge_test_1_code_company', $keys['db_forge_test_1_code_company']->name);
$this->assertSame($keys['db_forge_test_1_code_company']->fields, ['code', 'company']);
$this->assertSame(['code', 'company'], $keys['db_forge_test_1_code_company']->fields);
$this->assertSame('INDEX', $keys['db_forge_test_1_code_company']->type);

$this->assertSame('db_forge_test_1_code_active', $keys['db_forge_test_1_code_active']->name);
$this->assertSame($keys['db_forge_test_1_code_active']->fields, ['code', 'active']);
$this->assertSame(['code', 'active'], $keys['db_forge_test_1_code_active']->fields);
$this->assertSame('UNIQUE', $keys['db_forge_test_1_code_active']->type);
} elseif ($this->db->DBDriver === 'OCI8') {
$this->assertSame('pk_db_forge_test_1', $keys['pk_db_forge_test_1']->name);
$this->assertSame($keys['pk_db_forge_test_1']->fields, ['id']);
$this->assertSame(['id'], $keys['pk_db_forge_test_1']->fields);
$this->assertSame('PRIMARY', $keys['pk_db_forge_test_1']->type);

$this->assertSame('db_forge_test_1_code_company', $keys['db_forge_test_1_code_company']->name);
$this->assertSame($keys['db_forge_test_1_code_company']->fields, ['code', 'company']);
$this->assertSame(['code', 'company'], $keys['db_forge_test_1_code_company']->fields);
$this->assertSame('INDEX', $keys['db_forge_test_1_code_company']->type);

$this->assertSame('db_forge_test_1_code_active', $keys['db_forge_test_1_code_active']->name);
$this->assertSame($keys['db_forge_test_1_code_active']->fields, ['code', 'active']);
$this->assertSame(['code', 'active'], $keys['db_forge_test_1_code_active']->fields);
$this->assertSame('UNIQUE', $keys['db_forge_test_1_code_active']->type);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ public function testCallStoredProcedureForCursor(): void
oci_execute($result);
$row = oci_fetch_array($result, OCI_ASSOC + OCI_RETURN_NULLS);

$this->assertSame($row, ['ONE' => '1']);
$this->assertSame(['ONE' => '1'], $row);
}
}
2 changes: 1 addition & 1 deletion tests/system/HTTP/CLIRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ public function testGetCookie(): void
{
$this->assertNull($this->request->getCookie('TESTY'));

$this->assertSame($this->request->getCookie(), []);
$this->assertSame([], $this->request->getCookie());
}

public function testIs(): void
Expand Down
8 changes: 4 additions & 4 deletions tests/system/Router/RouteCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ static function (): void {},

$options = $routes->getRoutesOptions('administrator');

$this->assertSame($options, ['as' => 'admin', 'foo' => 'baz']);
$this->assertSame(['as' => 'admin', 'foo' => 'baz'], $options);
}

/**
Expand Down Expand Up @@ -1459,15 +1459,15 @@ static function (): void {},

$options = $routes->getRoutesOptions('administrator');

$this->assertSame($options, ['as' => 'admin1', 'foo' => 'baz1', 'bar' => 'baz']);
$this->assertSame(['as' => 'admin1', 'foo' => 'baz1', 'bar' => 'baz'], $options);

$options = $routes->setHTTPVerb(Method::POST)->getRoutesOptions('administrator');

$this->assertSame($options, ['as' => 'admin2', 'foo' => 'baz2', 'bar' => 'baz']);
$this->assertSame(['as' => 'admin2', 'foo' => 'baz2', 'bar' => 'baz'], $options);

$options = $routes->setHTTPVerb(Method::GET)->getRoutesOptions('administrator', Method::POST);

$this->assertSame($options, ['as' => 'admin2', 'foo' => 'baz2', 'bar' => 'baz']);
$this->assertSame(['as' => 'admin2', 'foo' => 'baz2', 'bar' => 'baz'], $options);
}

public function testRouteGroupWithFilterSimple(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Router/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ public function testMatchedRouteOptions(): void

$router->handle('foo');

$this->assertSame($router->getMatchedRouteOptions(), ['as' => 'login', 'foo' => 'baz']);
$this->assertSame(['as' => 'login', 'foo' => 'baz'], $router->getMatchedRouteOptions());
}

public function testRouteWorksWithFilters(): void
Expand Down
6 changes: 0 additions & 6 deletions tests/system/View/ParserFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,6 @@ public function testHighlightCode(): void
$parser->setData($data);

$template = '{ value1|highlight_code }';
$expected = <<<'EOF'
<code><span style="color: #000000">
<span style="color: #0000BB">Sincerely&nbsp;</span>
</span>
</code>
EOF;

// PHP 8.3 changes the output.
if (PHP_VERSION_ID >= 80300) {
Expand Down
Loading