mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Remove is_object() calls when the test subject is already type hinted as a Model.
This commit is contained in:
parent
2f24de81cb
commit
5c595b90d2
1 changed files with 2 additions and 2 deletions
|
@ -2119,7 +2119,7 @@ class DboSource extends DataSource {
|
|||
if (!isset($params[1])) {
|
||||
$params[1] = 'count';
|
||||
}
|
||||
if (is_object($Model) && $Model->isVirtualField($params[0])) {
|
||||
if ($Model->isVirtualField($params[0])) {
|
||||
$arg = $this->_quoteFields($Model->getVirtualField($params[0]));
|
||||
} else {
|
||||
$arg = $this->name($params[0]);
|
||||
|
@ -2130,7 +2130,7 @@ class DboSource extends DataSource {
|
|||
if (!isset($params[1])) {
|
||||
$params[1] = $params[0];
|
||||
}
|
||||
if (is_object($Model) && $Model->isVirtualField($params[0])) {
|
||||
if ($Model->isVirtualField($params[0])) {
|
||||
$arg = $this->_quoteFields($Model->getVirtualField($params[0]));
|
||||
} else {
|
||||
$arg = $this->name($params[0]);
|
||||
|
|
Loading…
Reference in a new issue