mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Replace is_a() and is_subclass_of() with instanceof
This commit is contained in:
parent
bc06367edf
commit
80f2dd7a8a
3 changed files with 4 additions and 4 deletions
|
|
@ -619,7 +619,7 @@ class DB
|
|||
|
||||
$output = include($cache_file);
|
||||
|
||||
if((is_a($output, 'Object') || is_subclass_of($output, 'Object')) && !$output->toBool())
|
||||
if($output instanceof Object && !$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -652,7 +652,7 @@ class DB
|
|||
{
|
||||
$output = $this->getError();
|
||||
}
|
||||
else if(!is_a($output, 'Object') && !is_subclass_of($output, 'Object'))
|
||||
elseif(!($output instanceof Object))
|
||||
{
|
||||
$output = new Object();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ class ModuleInstaller
|
|||
}
|
||||
|
||||
$output = $oModule->moduleUninstall();
|
||||
if(is_subclass_of($output, 'Object') && !$output->toBool())
|
||||
if($output instanceof Object && !$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class editorController extends editor
|
|||
if(method_exists($oComponent, $method)) $output = $oComponent->{$method}();
|
||||
else return new Object(-1,sprintf('%s method is not exists', $method));
|
||||
|
||||
if((is_a($output, 'Object') || is_subclass_of($output, 'Object')) && !$output->toBool()) return $output;
|
||||
if($output instanceof Object && !$output->toBool()) return $output;
|
||||
|
||||
$this->setError($oComponent->getError());
|
||||
$this->setMessage($oComponent->getMessage());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue