Commit 2e7b683b authored by david's avatar david

remove call by &reference and add class type hints

parent 971083c8
...@@ -57,7 +57,7 @@ class Doctrine_Node implements IteratorAggregate ...@@ -57,7 +57,7 @@ class Doctrine_Node implements IteratorAggregate
* @param object $record instance of Doctrine_Record * @param object $record instance of Doctrine_Record
* @param array $options options * @param array $options options
*/ */
public function __construct(&$record, $options) public function __construct(Doctrine_Record $record, $options)
{ {
$this->record = $record; $this->record = $record;
$this->options = $options; $this->options = $options;
...@@ -71,7 +71,7 @@ class Doctrine_Node implements IteratorAggregate ...@@ -71,7 +71,7 @@ class Doctrine_Node implements IteratorAggregate
* @param array $options options * @param array $options options
* @return object $options instance of Doctrine_Node * @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; $class = 'Doctrine_Node_' . $implName;
...@@ -87,7 +87,7 @@ class Doctrine_Node implements IteratorAggregate ...@@ -87,7 +87,7 @@ class Doctrine_Node implements IteratorAggregate
* *
* @param object $record instance of Doctrine_Record * @param object $record instance of Doctrine_Record
*/ */
public function setRecord(&$record) public function setRecord(Doctrine_Record $record)
{ {
$this->record = $record; $this->record = $record;
} }
......
...@@ -47,7 +47,7 @@ class Doctrine_Tree ...@@ -47,7 +47,7 @@ class Doctrine_Tree
* @param object $table instance of Doctrine_Table * @param object $table instance of Doctrine_Table
* @param array $options options * @param array $options options
*/ */
public function __construct($table, $options) public function __construct(Doctrine_Table $table, $options)
{ {
$this->table = $table; $this->table = $table;
$this->options = $options; $this->options = $options;
...@@ -80,7 +80,7 @@ class Doctrine_Tree ...@@ -80,7 +80,7 @@ class Doctrine_Tree
* @return object $options instance of Doctrine_Node * @return object $options instance of Doctrine_Node
* @throws Doctrine_Exception if class does not extend Doctrine_Tree * @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; $class = 'Doctrine_Tree_' . $implName;
if (!class_exists($class)) { if (!class_exists($class)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment