Closed webchick closed 9 years ago
I have fixed the example up :)
In regards to point 3. If you only have one namespace (in the filename being parsed) you should see one element in the protected $nodes property. Its just what you see is a tree so you will see all kinds of things in there, but at very top level there should be the one node.
The below test file should trigger the die..
<?php
namespace MyNamespace {
}
namespace FailHere {
}
Similar problem as #169; the usage example in README.md doesn't seem to work.
( ! ) Notice: Undefined offset: 1 in /Users/webchick/Sites/7.x/pharborist/src/NodeCollection.php on line 73 ( ! ) Fatal error: Call to a member function getSourcePosition() on a non-object in /Users/webchick/Sites/7.x/pharborist/far.php on line 14
getSourcePosition seems to have been removed in https://github.com/grom358/pharborist/commit/14f0fee3aa1a3921528451434f7ebd5310ce43a1