mirror of
https://github.com/yiisoft/yii2.git
synced 2026-02-20 00:32:19 +01:00
Skip Object when fixing properties
This commit is contained in:
@@ -504,6 +504,11 @@ class PhpDocController extends Controller
|
||||
|
||||
protected function updateClassPropertyDocs($file, $className, $propertyDoc)
|
||||
{
|
||||
if ($this->shouldSkipClass($className)) {
|
||||
$this->stderr("[INFO] Skipping class $className.\n", Console::FG_BLUE, Console::BOLD);
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
$ref = new \ReflectionClass($className);
|
||||
} catch (\Exception $e) {
|
||||
@@ -855,4 +860,12 @@ class PhpDocController extends Controller
|
||||
}
|
||||
return !$isDepreceatedObject && !$ref->isSubclassOf('yii\base\BaseObject') && $className !== 'yii\base\BaseObject';
|
||||
}
|
||||
|
||||
private function shouldSkipClass($className)
|
||||
{
|
||||
if (PHP_VERSION_ID > 70100) {
|
||||
return $className === 'yii\base\Object';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user