Skip to content

Commit

Permalink
Fixed #97: protected property PHP_Depend_Code_Method::$parent
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelpichler committed Oct 11, 2012
1 parent 7cab199 commit 87a1b5e
Show file tree
Hide file tree
Showing 12 changed files with 130 additions and 331 deletions.
30 changes: 15 additions & 15 deletions src/main/php/PHP/Depend/Code/ASTNode.php
Expand Up @@ -60,7 +60,7 @@
* @link http://www.pdepend.org/
* @since 0.9.6
*/
abstract class PHP_Depend_Code_ASTNode implements PHP_Depend_Code_ASTNodeI
abstract class PHP_Depend_Code_ASTNode
{
/**
* The type of this class.
Expand All @@ -72,15 +72,15 @@ abstract class PHP_Depend_Code_ASTNode implements PHP_Depend_Code_ASTNodeI
/**
* Parsed child nodes of this node.
*
* @var array(PHP_Depend_Code_ASTNodeI)
* @var array(PHP_Depend_Code_ASTNode)
*/
protected $nodes = array();

/**
* The parent node of this node or <b>null</b> when this node is the root
* of a node tree.
*
* @var PHP_Depend_Code_ASTNodeI
* @var PHP_Depend_Code_ASTNode
*/
protected $parent = null;

Expand Down Expand Up @@ -356,7 +356,7 @@ protected function getMetadataSize()
*
* @param integer $index Index of the requested node.
*
* @return PHP_Depend_Code_ASTNodeI
* @return PHP_Depend_Code_ASTNode
* @throws OutOfBoundsException When no node exists at the given index.
*/
public function getChild($index)
Expand All @@ -376,7 +376,7 @@ public function getChild($index)
/**
* This method returns all direct children of the actual node.
*
* @return PHP_Depend_Code_ASTNodeI[]
* @return PHP_Depend_Code_ASTNode[]
*/
public function getChildren()
{
Expand All @@ -390,7 +390,7 @@ public function getChildren()
*
* @param string $targetType Searched class or interface type.
*
* @return PHP_Depend_Code_ASTNodeI
* @return PHP_Depend_Code_ASTNode
*/
public function getFirstChildOfType($targetType)
{
Expand All @@ -414,7 +414,7 @@ public function getFirstChildOfType($targetType)
* @param array &$results Already found node instances. This parameter
* is only for internal usage.
*
* @return PHP_Depend_Code_ASTNodeI[]
* @return PHP_Depend_Code_ASTNode[]
*/
public function findChildrenOfType($targetType, array &$results = array())
{
Expand All @@ -430,12 +430,12 @@ public function findChildrenOfType($targetType, array &$results = array())
/**
* This method adds a new child node at the first position of the children.
*
* @param PHP_Depend_Code_ASTNodeI $node The new child node.
* @param PHP_Depend_Code_ASTNode $node The new child node.
*
* @return void
* @since 0.10.2
*/
public function prependChild(PHP_Depend_Code_ASTNodeI $node)
public function prependChild(PHP_Depend_Code_ASTNode $node)
{
array_unshift($this->nodes, $node);
$node->setParent($this);
Expand All @@ -444,11 +444,11 @@ public function prependChild(PHP_Depend_Code_ASTNodeI $node)
/**
* This method adds a new child node to this node instance.
*
* @param PHP_Depend_Code_ASTNodeI $node The new child node.
* @param PHP_Depend_Code_ASTNode $node The new child node.
*
* @return void
*/
public function addChild(PHP_Depend_Code_ASTNodeI $node)
public function addChild(PHP_Depend_Code_ASTNode $node)
{
$this->nodes[] = $node;
$node->setParent($this);
Expand All @@ -458,7 +458,7 @@ public function addChild(PHP_Depend_Code_ASTNodeI $node)
* Returns the parent node of this node or <b>null</b> when this node is
* the root of a node tree.
*
* @return PHP_Depend_Code_ASTNodeI
* @return PHP_Depend_Code_ASTNode
*/
public function getParent()
{
Expand All @@ -471,7 +471,7 @@ public function getParent()
*
* @param string $parentType Class/interface type you are looking for,
*
* @return array(PHP_Depend_Code_ASTNodeI)
* @return array(PHP_Depend_Code_ASTNode)
*/
public function getParentsOfType($parentType)
{
Expand All @@ -490,11 +490,11 @@ public function getParentsOfType($parentType)
/**
* Sets the parent node of this node.
*
* @param PHP_Depend_Code_ASTNodeI $node The parent node of this node.
* @param PHP_Depend_Code_ASTNode $node The parent node of this node.
*
* @return void
*/
public function setParent(PHP_Depend_Code_ASTNodeI $node)
public function setParent(PHP_Depend_Code_ASTNode $node)
{
$this->parent = $node;
}
Expand Down
201 changes: 0 additions & 201 deletions src/main/php/PHP/Depend/Code/ASTNodeI.php

This file was deleted.

12 changes: 6 additions & 6 deletions src/main/php/PHP/Depend/Code/AbstractCallable.php
Expand Up @@ -105,7 +105,7 @@ abstract class PHP_Depend_Code_AbstractCallable
/**
* List of all parsed child nodes.
*
* @var PHP_Depend_Code_ASTNodeI[]
* @var PHP_Depend_Code_ASTNode[]
* @since 0.9.6
*/
protected $nodes = array();
Expand Down Expand Up @@ -151,21 +151,21 @@ public function setCache(PHP_Depend_Util_Cache_Driver $cache)
/**
* Adds a parsed child node to this node.
*
* @param PHP_Depend_Code_ASTNodeI $node A parsed child node instance.
* @param PHP_Depend_Code_ASTNode $node A parsed child node instance.
*
* @return void
* @access private
* @since 0.9.6
*/
public function addChild(PHP_Depend_Code_ASTNodeI $node)
public function addChild(PHP_Depend_Code_ASTNode $node)
{
$this->nodes[] = $node;
}

/**
* Returns all child nodes of this method.
*
* @return PHP_Depend_Code_ASTNodeI[]
* @return PHP_Depend_Code_ASTNode[]
* @since 0.9.8
*/
public function getChildren()
Expand All @@ -180,7 +180,7 @@ public function getChildren()
*
* @param string $targetType Searched class or interface type.
*
* @return PHP_Depend_Code_ASTNodeI
* @return PHP_Depend_Code_ASTNode
* @access private
* @since 0.9.6
*/
Expand All @@ -203,7 +203,7 @@ public function getFirstChildOfType($targetType)
* @param string $targetType The target class or interface type.
* @param array &$results The found children.
*
* @return PHP_Depend_Code_ASTNodeI[]
* @return PHP_Depend_Code_ASTNode[]
* @access private
* @since 0.9.6
*/
Expand Down

0 comments on commit 87a1b5e

Please sign in to comment.