From 2e7b683b5979cff0946fcc32a6dc12dc11e2c5f6 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 8 Jan 2007 12:00:47 +0000 Subject: [PATCH] remove call by &reference and add class type hints --- draft/Node.php | 6 +++--- draft/Tree.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/draft/Node.php b/draft/Node.php index b9705ecfa..4ff072bf4 100644 --- a/draft/Node.php +++ b/draft/Node.php @@ -57,7 +57,7 @@ class Doctrine_Node implements IteratorAggregate * @param object $record instance of Doctrine_Record * @param array $options options */ - public function __construct(&$record, $options) + public function __construct(Doctrine_Record $record, $options) { $this->record = $record; $this->options = $options; @@ -71,7 +71,7 @@ class Doctrine_Node implements IteratorAggregate * @param array $options options * @return object $options instance of Doctrine_Node */ - public static function factory(&$record, $implName, $options = array()) + public static function factory(Doctrine_Record $record, $implName, $options = array()) { $class = 'Doctrine_Node_' . $implName; @@ -87,7 +87,7 @@ class Doctrine_Node implements IteratorAggregate * * @param object $record instance of Doctrine_Record */ - public function setRecord(&$record) + public function setRecord(Doctrine_Record $record) { $this->record = $record; } diff --git a/draft/Tree.php b/draft/Tree.php index 92b1be2bc..1279cfb08 100644 --- a/draft/Tree.php +++ b/draft/Tree.php @@ -47,7 +47,7 @@ class Doctrine_Tree * @param object $table instance of Doctrine_Table * @param array $options options */ - public function __construct($table, $options) + public function __construct(Doctrine_Table $table, $options) { $this->table = $table; $this->options = $options; @@ -80,7 +80,7 @@ class Doctrine_Tree * @return object $options instance of Doctrine_Node * @throws Doctrine_Exception if class does not extend Doctrine_Tree */ - public static function factory(&$table, $implName, $options = array()) + public static function factory(Doctrine_Table $table, $implName, $options = array()) { $class = 'Doctrine_Tree_' . $implName; if (!class_exists($class)) {