Open MartijnBraam opened 10 years ago
If the input file contains static function() phpparser doesn't assume the visibility is public, only the MODIFIER_STATIC bit is set.
static function()
Example:
static function staticFunction(){} public static function publicStaticFunction(){}
This only happens on static functions without the explicit public modifier
if($statement->type & Stmt\Class_::MODIFIER_PUBLIC){ $node['visibility'] = 'public'; }elseif($statement->type & Stmt\Class_::MODIFIER_PROTECTED){ $node['visibility'] = 'protected'; }elseif($statement->type & Stmt\Class_::MODIFIER_PRIVATE){ $node['visibility'] = 'private'; } if($statement->type & Stmt\Class_::MODIFIER_STATIC){ $node['scope'] = 'classifier'; }else{ $node['scope'] = 'instance'; }
If the input file contains
static function()
phpparser doesn't assume the visibility is public, only the MODIFIER_STATIC bit is set.Example:
This only happens on static functions without the explicit public modifier