Skip to content

Commit

Permalink
优化代码,更新基线文件
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Oct 23, 2023
1 parent 7bf6342 commit cca2dd4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions phpstan-baseline/baseline-core.neon
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@ parameters:
count: 3
path: ../src/Db/Query/Query.php

-
message: "#^Argument of an invalid type ArrayAccess supplied for foreach, only iterables are supported\\.$#"
count: 1
path: ../src/Model/Model.php

-
message: "#^Left side of && is always true\\.$#"
count: 1
path: ../src/Model/Model.php

-
message: "#^PHPDoc tag @return with type T\\|null is not subtype of native type Imi\\\\Bean\\\\Annotation\\\\Base\\|null\\.$#"
count: 1
path: ../src/Model/ModelManager.php

-
message: "#^Parameter \\#2 \\$class of static method Imi\\\\Server\\\\ServerManager\\:\\:getServer\\(\\) expects class\\-string\\<Imi\\\\Server\\\\Contract\\\\IServer\\>\\|null, string given\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ private static function parseSaveData($data, string $type, ?self $object = null)
}
$columnType = $column->type;
// 字段自动更新时间
if ($column->updateTime && !$isInsert && (empty($object[$dbFieldName]) || ($object[$dbFieldName] && ($originData[$dbFieldName] ?? null) === $object[$dbFieldName])))
if ($column->updateTime && !$isInsert && (empty($object[$dbFieldName]) || (($originData[$dbFieldName] ?? null) === $object[$dbFieldName])))
{
$microTime ??= microtime(true);
$value = static::parseDateTime($columnType, $column->updateTime, $microTime);
Expand Down

0 comments on commit cca2dd4

Please sign in to comment.