mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
docs: fix PHPDoc types in BaseModel
This commit is contained in:
parent
3503b4d461
commit
f54cdde5aa
@ -226,11 +226,6 @@ $ignoreErrors[] = [
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/system/BaseModel.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Method CodeIgniter\\\\BaseModel\\:\\:setValidationRules\\(\\) has parameter \\$validationRules with no value type specified in iterable type array\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/system/BaseModel.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Method CodeIgniter\\\\BaseModel\\:\\:transformDataToArray\\(\\) return type has no value type specified in iterable type array\\.$#',
|
||||
'count' => 1,
|
||||
@ -11391,16 +11386,6 @@ $ignoreErrors[] = [
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/_support/Models/UserModel.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Property Tests\\\\Support\\\\Models\\\\ValidErrorsModel\\:\\:\\$validationRules \\(array\\<int, string\\>\\|string\\) does not accept default value of type array\\<string, array\\<int\\|string, array\\<string, string\\>\\|string\\>\\|string\\>\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/_support/Models/ValidErrorsModel.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Property Tests\\\\Support\\\\Models\\\\ValidModel\\:\\:\\$validationRules \\(array\\<int, string\\>\\|string\\) does not accept default value of type array\\<string, array\\<int, string\\>\\|string\\>\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/_support/Models/ValidModel.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Property Tests\\\\Support\\\\SomeEntity\\:\\:\\$attributes type has no value type specified in iterable type array\\.$#',
|
||||
'count' => 1,
|
||||
@ -16301,41 +16286,11 @@ $ignoreErrors[] = [
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/Models/UpdateModelTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Property class@anonymous/tests/system/Models/ValidationModelRuleGroupTest\\.php\\:368\\:\\:\\$validationRules \\(array\\<int, string\\>\\|string\\) does not accept default value of type array\\<string, string\\>\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/Models/ValidationModelRuleGroupTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Property class@anonymous/tests/system/Models/ValidationModelRuleGroupTest\\.php\\:406\\:\\:\\$validationRules \\(array\\<int, string\\>\\|string\\) does not accept default value of type array\\<string, string\\>\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/Models/ValidationModelRuleGroupTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Property class@anonymous/tests/system/Models/ValidationModelRuleGroupTest\\.php\\:446\\:\\:\\$validationRules \\(array\\<int, string\\>\\|string\\) does not accept default value of type array\\<string, string\\>\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/Models/ValidationModelRuleGroupTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Property class@anonymous/tests/system/Models/ValidationModelTest\\.php\\:243\\:\\:\\$grouptest has no type specified\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/Models/ValidationModelTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Property class@anonymous/tests/system/Models/ValidationModelTest\\.php\\:380\\:\\:\\$validationRules \\(array\\<int, string\\>\\|string\\) does not accept default value of type array\\<string, string\\>\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/Models/ValidationModelTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Property class@anonymous/tests/system/Models/ValidationModelTest\\.php\\:418\\:\\:\\$validationRules \\(array\\<int, string\\>\\|string\\) does not accept default value of type array\\<string, string\\>\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/Models/ValidationModelTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Property class@anonymous/tests/system/Models/ValidationModelTest\\.php\\:458\\:\\:\\$validationRules \\(array\\<int, string\\>\\|string\\) does not accept default value of type array\\<string, string\\>\\.$#',
|
||||
'count' => 1,
|
||||
'path' => __DIR__ . '/tests/system/Models/ValidationModelTest.php',
|
||||
];
|
||||
$ignoreErrors[] = [
|
||||
'message' => '#^Cannot access property \\$key on array\\.$#',
|
||||
'count' => 7,
|
||||
|
@ -173,11 +173,14 @@ abstract class BaseModel
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* Rules used to validate data in insert, update, and save methods.
|
||||
* Rules used to validate data in insert(), update(), and save() methods.
|
||||
*
|
||||
* The array must match the format of data passed to the Validation
|
||||
* library.
|
||||
*
|
||||
* @var list<string>|string
|
||||
* @see https://codeigniter4.github.io/userguide/models/model.html#setting-validation-rules
|
||||
*
|
||||
* @var array<string, array<string, array<string, string>|string>|string>|string
|
||||
*/
|
||||
protected $validationRules = [];
|
||||
|
||||
@ -1448,7 +1451,7 @@ abstract class BaseModel
|
||||
* Allows to set (and reset) validation rules.
|
||||
* It could be used when you have to change default or override current validate rules.
|
||||
*
|
||||
* @param array $validationRules Value
|
||||
* @param array<string, array<string, array<string, string>|string>|string> $validationRules Value
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user