Drop deprecated $type subnodes

These have been replaced by $flags in 3.0
This commit is contained in:
Nikita Popov 2017-01-19 21:00:44 +01:00
parent 3b4dd387b8
commit 0c9c8d58ab
4 changed files with 0 additions and 19 deletions

View File

@ -20,9 +20,6 @@ class ClassMethod extends Node\Stmt implements FunctionLike
/** @var Node[] Statements */
public $stmts;
/** @deprecated Use $flags instead */
public $type;
/**
* Constructs a class method node.
*
@ -39,7 +36,6 @@ class ClassMethod extends Node\Stmt implements FunctionLike
parent::__construct($attributes);
$this->flags = isset($subNodes['flags']) ? $subNodes['flags']
: (isset($subNodes['type']) ? $subNodes['type'] : 0);
$this->type = $this->flags;
$this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
$this->name = $name;
$this->params = isset($subNodes['params']) ? $subNodes['params'] : array();

View File

@ -23,9 +23,6 @@ class Class_ extends ClassLike
/** @var Node\Name[] Names of implemented interfaces */
public $implements;
/** @deprecated Use $flags instead */
public $type;
protected static $specialNames = array(
'self' => true,
'parent' => true,
@ -47,7 +44,6 @@ class Class_ extends ClassLike
parent::__construct($attributes);
$this->flags = isset($subNodes['flags']) ? $subNodes['flags']
: (isset($subNodes['type']) ? $subNodes['type'] : 0);
$this->type = $this->flags;
$this->name = $name;
$this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : null;
$this->implements = isset($subNodes['implements']) ? $subNodes['implements'] : array();

View File

@ -11,9 +11,6 @@ class Property extends Node\Stmt
/** @var PropertyProperty[] Properties */
public $props;
/** @deprecated Use $flags instead */
public $type;
/**
* Constructs a class property list node.
*
@ -24,7 +21,6 @@ class Property extends Node\Stmt
public function __construct($flags, array $props, array $attributes = array()) {
parent::__construct($attributes);
$this->flags = $flags;
$this->type = $flags;
$this->props = $props;
}

View File

@ -56,11 +56,4 @@ class ClassTest extends \PHPUnit_Framework_TestCase
$this->assertSame($methodTest, $class->getMethod('test'));
$this->assertNull($class->getMethod('nonExisting'));
}
public function testDeprecatedTypeNode() {
$class = new Class_('Foo', array('type' => Class_::MODIFIER_ABSTRACT));
$this->assertTrue($class->isAbstract());
$this->assertSame(Class_::MODIFIER_ABSTRACT, $class->flags);
$this->assertSame(Class_::MODIFIER_ABSTRACT, $class->type);
}
}