Skip to content

Commit 8272032

Browse files
committed
way to list interfaces of class
Conflicts: src/Hal/Component/OOP/Reflected/ReflectedClass.php tests/Hal/Component/OOP/OOPExtractorTest.php
1 parent 4f33c6e commit 8272032

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Hal/Component/OOP/Reflected/ReflectedClass.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ReflectedClass {
5959
*
6060
* @var string
6161
*/
62-
protected $parent;
62+
private $parent;
6363

6464
/**
6565
* Constructor
@@ -70,7 +70,7 @@ class ReflectedClass {
7070
public function __construct($namespace, $name)
7171
{
7272
$this->name = (string) $name;
73-
$this->setNamespace($namespace);
73+
$this->namespace = (string) $namespace;
7474
$this->methods = array();
7575
$this->nameResolver = new NameResolver();
7676
}
@@ -140,6 +140,7 @@ public function getDependencies()
140140
$dependencies = array_merge($dependencies, $method->getDependencies());
141141
}
142142
foreach($dependencies as &$name) {
143+
// $name = preg_replace('!^(\\\\)!', '', $name);
143144
$name = $this->nameResolver->resolve($name, $this->getNamespace());
144145
}
145146
return array_unique($dependencies);
@@ -195,7 +196,7 @@ public function getParent() {
195196
if ($this->parent === null) {
196197
return null;
197198
}
198-
return $this->nameResolver->resolve($this->parent, $this->namespace);
199+
return $this->nameResolver->resolve($this->parent, $this->getNamespace());
199200
}
200201

201202
/**

0 commit comments

Comments
 (0)