mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-26 20:14:46 +01:00
Add methods visibility (#464)
* [PSR-2] Visibility before static * [PSR-2] Declare method Visibility
This commit is contained in:
parent
248b29ecf6
commit
bf7d811cda
@ -15,7 +15,7 @@ class Autoloader
|
||||
*
|
||||
* @param bool $prepend Whether to prepend the autoloader instead of appending
|
||||
*/
|
||||
static public function register(bool $prepend = false) {
|
||||
public static function register(bool $prepend = false) {
|
||||
if (self::$registered === true) {
|
||||
return;
|
||||
}
|
||||
@ -29,7 +29,7 @@ class Autoloader
|
||||
*
|
||||
* @param string $class A class name.
|
||||
*/
|
||||
static public function autoload(string $class) {
|
||||
public static function autoload(string $class) {
|
||||
if (0 === strpos($class, 'PhpParser\\')) {
|
||||
$fileName = __DIR__ . strtr(substr($class, 9), '\\', '/') . '.php';
|
||||
if (file_exists($fileName)) {
|
||||
|
@ -9,14 +9,14 @@ interface NodeTraverserInterface
|
||||
*
|
||||
* @param NodeVisitor $visitor Visitor to add
|
||||
*/
|
||||
function addVisitor(NodeVisitor $visitor);
|
||||
public function addVisitor(NodeVisitor $visitor);
|
||||
|
||||
/**
|
||||
* Removes an added visitor.
|
||||
*
|
||||
* @param NodeVisitor $visitor
|
||||
*/
|
||||
function removeVisitor(NodeVisitor $visitor);
|
||||
public function removeVisitor(NodeVisitor $visitor);
|
||||
|
||||
/**
|
||||
* Traverses an array of nodes using the registered visitors.
|
||||
@ -25,6 +25,5 @@ interface NodeTraverserInterface
|
||||
*
|
||||
* @return Node[] Traversed array of nodes
|
||||
*/
|
||||
function traverse(array $nodes) : array;
|
||||
public function traverse(array $nodes) : array;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user