1
0
mirror of synced 2025-01-17 22:11:41 +03:00

remove call by &reference and add class type hints

This commit is contained in:
david 2007-01-08 12:00:47 +00:00
parent 971083c836
commit 2e7b683b59
2 changed files with 5 additions and 5 deletions

View File

@ -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;
}

View File

@ -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)) {