Skip to content

Commit

Permalink
Merge pull request #8708 from kenjis/fix-var-in-BaseModel
Browse files Browse the repository at this point in the history
docs: update `@var` types in BaseModel
kenjis authored Apr 5, 2024
2 parents 07e3999 + e2ac94a commit 1f6baa0
Showing 2 changed files with 12 additions and 132 deletions.
120 changes: 0 additions & 120 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
@@ -261,66 +261,6 @@
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$afterDelete type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$afterFind type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$afterInsert type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$afterInsertBatch type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$afterUpdate type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$afterUpdateBatch type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$beforeDelete type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$beforeFind type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$beforeInsert type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$beforeInsertBatch type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$beforeUpdate type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\BaseModel\\:\\:\\$beforeUpdateBatch type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Strict comparison using \\!\\=\\= between mixed and null will always evaluate to true\\.$#',
'count' => 1,
@@ -11116,71 +11056,11 @@
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$afterDelete type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$afterFind type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$afterInsert type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$afterInsertBatch type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$afterUpdate type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$afterUpdateBatch type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$beforeDelete type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$beforeFind type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$beforeFindReturnData has no type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$beforeInsert type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$beforeInsertBatch type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$beforeUpdate type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$beforeUpdateBatch type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/tests/_support/Models/EventModel.php',
];
$ignoreErrors[] = [
'message' => '#^Property Tests\\\\Support\\\\Models\\\\EventModel\\:\\:\\$eventData has no type specified\\.$#',
'count' => 1,
24 changes: 12 additions & 12 deletions system/BaseModel.php
Original file line number Diff line number Diff line change
@@ -246,84 +246,84 @@ abstract class BaseModel
/**
* Callbacks for beforeInsert
*
* @var array
* @var list<string>
*/
protected $beforeInsert = [];

/**
* Callbacks for afterInsert
*
* @var array
* @var list<string>
*/
protected $afterInsert = [];

/**
* Callbacks for beforeUpdate
*
* @var array
* @var list<string>
*/
protected $beforeUpdate = [];

/**
* Callbacks for afterUpdate
*
* @var array
* @var list<string>
*/
protected $afterUpdate = [];

/**
* Callbacks for beforeInsertBatch
*
* @var array
* @var list<string>
*/
protected $beforeInsertBatch = [];

/**
* Callbacks for afterInsertBatch
*
* @var array
* @var list<string>
*/
protected $afterInsertBatch = [];

/**
* Callbacks for beforeUpdateBatch
*
* @var array
* @var list<string>
*/
protected $beforeUpdateBatch = [];

/**
* Callbacks for afterUpdateBatch
*
* @var array
* @var list<string>
*/
protected $afterUpdateBatch = [];

/**
* Callbacks for beforeFind
*
* @var array
* @var list<string>
*/
protected $beforeFind = [];

/**
* Callbacks for afterFind
*
* @var array
* @var list<string>
*/
protected $afterFind = [];

/**
* Callbacks for beforeDelete
*
* @var array
* @var list<string>
*/
protected $beforeDelete = [];

/**
* Callbacks for afterDelete
*
* @var array
* @var list<string>
*/
protected $afterDelete = [];

0 comments on commit 1f6baa0

Please sign in to comment.