Skip to content

Commit 89befe8

Browse files
committed
fix psalm error
1 parent b77f34f commit 89befe8

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/Models/UserIdentityModel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,15 +542,15 @@ public function forceGlobalPasswordReset(): void
542542
* Throws an Exception when it fails.
543543
*
544544
* @param array|int|string|null $id
545-
* @param array|object|null $data
545+
* @param array|object|null $row
546546
*
547547
* @return true if the update is successful
548548
*
549549
* @throws ValidationException
550550
*/
551-
public function update($id = null, $data = null): bool
551+
public function update($id = null, $row = null): bool
552552
{
553-
$result = parent::update($id, $data);
553+
$result = parent::update($id, $row);
554554

555555
$this->checkQueryReturn($result);
556556

src/Models/UserModel.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -251,18 +251,18 @@ public function activate(User $user): void
251251
* Override the BaseModel's `insert()` method.
252252
* If you pass User object, also inserts Email Identity.
253253
*
254-
* @param array|User $data
254+
* @param array|User $row
255255
*
256256
* @return int|string|true Insert ID if $returnID is true
257257
*
258258
* @throws ValidationException
259259
*/
260-
public function insert($data = null, bool $returnID = true)
260+
public function insert($row = null, bool $returnID = true)
261261
{
262262
// Clone User object for not changing the passed object.
263-
$this->tempUser = $data instanceof User ? clone $data : null;
263+
$this->tempUser = $row instanceof User ? clone $row : null;
264264

265-
$result = parent::insert($data, $returnID);
265+
$result = parent::insert($row, $returnID);
266266

267267
$this->checkQueryReturn($result);
268268

@@ -274,20 +274,20 @@ public function insert($data = null, bool $returnID = true)
274274
* If you pass User object, also updates Email Identity.
275275
*
276276
* @param array|int|string|null $id
277-
* @param array|User $data
277+
* @param array|User $row
278278
*
279279
* @return true if the update is successful
280280
*
281281
* @throws ValidationException
282282
*/
283-
public function update($id = null, $data = null): bool
283+
public function update($id = null, $row = null): bool
284284
{
285285
// Clone User object for not changing the passed object.
286-
$this->tempUser = $data instanceof User ? clone $data : null;
286+
$this->tempUser = $row instanceof User ? clone $row : null;
287287

288288
try {
289289
/** @throws DataException */
290-
$result = parent::update($id, $data);
290+
$result = parent::update($id, $row);
291291
} catch (DataException $e) {
292292
// When $data is an array.
293293
if ($this->tempUser === null) {
@@ -316,15 +316,15 @@ public function update($id = null, $data = null): bool
316316
* Override the BaseModel's `save()` method.
317317
* If you pass User object, also updates Email Identity.
318318
*
319-
* @param array|User $data
319+
* @param array|User $row
320320
*
321321
* @return true if the save is successful
322322
*
323323
* @throws ValidationException
324324
*/
325-
public function save($data): bool
325+
public function save($row): bool
326326
{
327-
$result = parent::save($data);
327+
$result = parent::save($row);
328328

329329
$this->checkQueryReturn($result);
330330

0 commit comments

Comments
 (0)