mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Fixes for issues found with Static Code Analysis with Php Inspections (EA Extended) (#13606)
* Php Inspections (EA Extended): language level migration fixes * Php Inspections (EA Extended): instanceof a trait always return false * Php Inspections (EA Extended): fixed preg_quote (/ is not escaped by default) * Php Inspections (EA Extended): fixed a greedy regex * Php Inspections (EA Extended): refereted instanceof self in a trait * Php Inspections (EA Extended): revert language level changes in requirements checker * Php Inspections (EA Extended): revert language level changes in requirements checker * Php Inspections (EA Extended): more greedy regexes fixed
This commit is contained in:
committed by
Alexander Makarov
parent
2de18cf9a5
commit
a182ce57fc
@ -480,7 +480,7 @@ class DbManager extends BaseManager
|
||||
{
|
||||
$role = $this->getRole($roleName);
|
||||
|
||||
if (is_null($role)) {
|
||||
if ($role === null) {
|
||||
throw new InvalidParamException("Role \"$roleName\" not found.");
|
||||
}
|
||||
|
||||
|
||||
@ -410,7 +410,7 @@ class PhpManager extends BaseManager
|
||||
{
|
||||
$role = $this->getRole($roleName);
|
||||
|
||||
if (is_null($role)) {
|
||||
if ($role === null) {
|
||||
throw new InvalidParamException("Role \"$roleName\" not found.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user