mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
refactor: rename stdclass
to stdClass
This commit is contained in:
parent
539436f58d
commit
107e2b3ff9
@ -13105,12 +13105,6 @@ $ignoreErrors[] = [
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/Database/Live/MySQLi/NumberNativeTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
// identifier: class.nameCase
|
||||
'message' => '#^Class stdClass referenced with incorrect case\\: stdclass\\.$#',
|
||||
'count' => 9,
|
||||
'path' => __DIR__ . '/tests/system/Database/Live/MySQLi/RawSqlTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
// identifier: method.notFound
|
||||
'message' => '#^Call to an undefined method CodeIgniter\\\\Database\\\\BaseConnection\\:\\:getCursor\\(\\)\\.$#',
|
||||
@ -13195,12 +13189,6 @@ $ignoreErrors[] = [
|
||||
'count' => 9,
|
||||
'path' => __DIR__ . '/tests/system/Database/Live/UpsertTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
// identifier: class.nameCase
|
||||
'message' => '#^Class stdClass referenced with incorrect case\\: stdclass\\.$#',
|
||||
'count' => 5,
|
||||
'path' => __DIR__ . '/tests/system/Database/Live/UpsertTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
// identifier: argument.type
|
||||
'message' => '#^Parameter \\#1 \\$set of method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:updateFields\\(\\) expects array\\<int, CodeIgniter\\\\Database\\\\RawSql\\|string\\>\\|string, array\\<string, CodeIgniter\\\\Database\\\\RawSql\\> given\\.$#',
|
||||
|
@ -17,7 +17,7 @@ use CodeIgniter\Database\RawSql;
|
||||
use CodeIgniter\Test\CIUnitTestCase;
|
||||
use CodeIgniter\Test\DatabaseTestTrait;
|
||||
use PHPUnit\Framework\Attributes\Group;
|
||||
use stdclass;
|
||||
use stdClass;
|
||||
use Tests\Support\Database\Seeds\CITestSeeder;
|
||||
|
||||
/**
|
||||
@ -61,12 +61,12 @@ final class RawSqlTest extends CIUnitTestCase
|
||||
{
|
||||
$data = [];
|
||||
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->email = 'derek@world.com';
|
||||
$row->created_at = new RawSql("setDateTime('2022-01-01')");
|
||||
$data[] = $row;
|
||||
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->email = 'ahmadinejad@world.com';
|
||||
$row->created_at = new RawSql("setDateTime('2022-01-01')");
|
||||
$data[] = $row;
|
||||
@ -85,12 +85,12 @@ final class RawSqlTest extends CIUnitTestCase
|
||||
{
|
||||
$data = [];
|
||||
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->email = 'derek@world.com';
|
||||
$row->created_at = new RawSql("setDateTime('2022-02-01')");
|
||||
$data[] = $row;
|
||||
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->email = 'ahmadinejad@world.com';
|
||||
$row->created_at = new RawSql("setDateTime('2022-02-01')");
|
||||
$data[] = $row;
|
||||
@ -147,12 +147,12 @@ final class RawSqlTest extends CIUnitTestCase
|
||||
{
|
||||
$data = [];
|
||||
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->email = 'tony@world.com';
|
||||
$row->created_at = new RawSql("setDateTime('2022-05-01')");
|
||||
$data[] = $row;
|
||||
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->email = 'sara@world.com';
|
||||
$row->created_at = new RawSql("setDateTime('2022-05-01')");
|
||||
$data[] = $row;
|
||||
@ -173,12 +173,12 @@ final class RawSqlTest extends CIUnitTestCase
|
||||
{
|
||||
$data = [];
|
||||
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->email = 'laura@world.com';
|
||||
$row->created_at = new RawSql("setDateTime('2022-06-01')");
|
||||
$data[] = $row;
|
||||
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->email = 'travis@world.com';
|
||||
$row->created_at = new RawSql("setDateTime('2022-06-01')");
|
||||
$data[] = $row;
|
||||
|
@ -20,7 +20,7 @@ use CodeIgniter\Test\CIUnitTestCase;
|
||||
use CodeIgniter\Test\DatabaseTestTrait;
|
||||
use Config\Database;
|
||||
use PHPUnit\Framework\Attributes\Group;
|
||||
use stdclass;
|
||||
use stdClass;
|
||||
use Tests\Support\Database\Seeds\CITestSeeder;
|
||||
|
||||
/**
|
||||
@ -107,21 +107,21 @@ final class UpsertTest extends CIUnitTestCase
|
||||
$data = [];
|
||||
|
||||
// new row insert
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->name = 'Pedro';
|
||||
$row->email = 'pedro@acme.com';
|
||||
$row->country = 'El Salvador';
|
||||
$data[] = $row;
|
||||
|
||||
// no change
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->name = 'Ahmadinejad';
|
||||
$row->email = 'ahmadinejad@world.com';
|
||||
$row->country = 'Iran';
|
||||
$data[] = $row;
|
||||
|
||||
// changed country for update
|
||||
$row = new stdclass();
|
||||
$row = new stdClass();
|
||||
$row->name = 'Derek Jones';
|
||||
$row->email = 'derek@world.com';
|
||||
$row->country = 'Canada';
|
||||
@ -644,7 +644,7 @@ final class UpsertTest extends CIUnitTestCase
|
||||
$builder->setData($moreData);
|
||||
}
|
||||
|
||||
$evenMoreData = new stdclass();
|
||||
$evenMoreData = new stdClass();
|
||||
$evenMoreData->name = 'New User2 users';
|
||||
$evenMoreData->email = 'newuser2@example.com';
|
||||
$evenMoreData->country = 'Netherlands';
|
||||
|
Loading…
x
Reference in New Issue
Block a user