Skip to content

Commit c75b41d

Browse files
authored
Merge pull request #518 from kenjis/docs-remove-psalm-issues
docs: add annotation for psalm
2 parents bfbbd03 + b3b6c23 commit c75b41d

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/Auth.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public function getProvider(): UserModel
129129
return $this->userProvider;
130130
}
131131

132+
/** @var \CodeIgniter\Shield\Config\Auth $config */
132133
$config = config('Auth');
133134

134135
if (! property_exists($config, 'userProvider')) {

src/Entities/User.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414

1515
/**
1616
* @property string|null $email
17+
* @property int|string|null $id
1718
* @property UserIdentity[]|null $identities
1819
* @property Time|null $last_active
1920
* @property string|null $password
2021
* @property string|null $password_hash
22+
* @property string|null $username
2123
*/
2224
class User extends Entity
2325
{

src/Models/UserModel.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
use CodeIgniter\Shield\Exceptions\ValidationException;
1515
use Faker\Generator;
1616

17+
/**
18+
* @phpstan-consistent-constructor
19+
*/
1720
class UserModel extends Model
1821
{
1922
use CheckQueryReturnTrait;

tests/_support/Config/Registrar.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class Registrar
2424
* DB config array for testing purposes.
2525
*
2626
* @var array
27+
*
28+
* @psalm-suppress RedundantCondition
2729
*/
2830
protected static $dbConfig = [
2931
'MySQLi' => [

0 commit comments

Comments
 (0)