remove call by &reference and add class type hints
This commit is contained in:
parent
971083c836
commit
2e7b683b59
@ -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;
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user