| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function __construct(Node\Name $name, $alias = null, $type = Use_::TYPE_UNKNOWN, array $attributes = array()) { |
||
| 26 | if (null === $alias) { |
||
| 27 | $alias = $name->getLast(); |
||
| 28 | } |
||
| 29 | |||
| 30 | if ('self' == strtolower($alias) || 'parent' == strtolower($alias)) { |
||
| 31 | throw new Error(sprintf( |
||
| 32 | 'Cannot use %s as %s because \'%2$s\' is a special class name', |
||
| 33 | $name, $alias |
||
| 34 | )); |
||
| 35 | } |
||
| 36 | |||
| 37 | parent::__construct($attributes); |
||
| 38 | $this->type = $type; |
||
| 39 | $this->name = $name; |
||
| 40 | $this->alias = $alias; |
||
| 41 | } |
||
| 42 | |||
| 47 |