Skip to content

Commit 5ffcb73

Browse files
committed
Fix(typehint) Fix PHP deprecations on Doctrine_Record_Filter::filterSet() and ::filterGet() and sub-classes
1 parent 5c857c2 commit 5ffcb73

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

lib/Doctrine/Record/Filter.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,19 @@
3333
*/
3434
abstract class Doctrine_Record_Filter
3535
{
36+
/**
37+
* @var Doctrine_Table|null
38+
*/
3639
protected $_table;
3740

3841
public function setTable(Doctrine_Table $table)
3942
{
4043
$this->_table = $table;
4144
}
4245

46+
/**
47+
* @return Doctrine_Table|null
48+
*/
4349
public function getTable()
4450
{
4551
return $this->_table;
@@ -56,7 +62,7 @@ public function init()
5662
*
5763
* @return Doctrine_Record the given record
5864
*
59-
* @thrown Doctrine_Exception when this way is not available
65+
* @throws Doctrine_Exception when this way is not available
6066
*/
6167
abstract public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value);
6268

@@ -67,7 +73,7 @@ abstract public function filterSet(Doctrine_Record $record, $propertyOrRelation,
6773
*
6874
* @return mixed
6975
*
70-
* @thrown Doctrine_Exception when this way is not available
76+
* @throws Doctrine_Exception when this way is not available
7177
*/
7278
abstract public function filterGet(Doctrine_Record $record, $propertyOrRelation);
7379
}

lib/Doctrine/Record/Filter/Compound.php

+3-11
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,9 @@ public function init()
5757
}
5858

5959
/**
60-
* Provides a way for setting property or relation value to the given record.
60+
* @return Doctrine_Record
6161
*
62-
* @param string $propertyOrRelation
63-
*
64-
* @return Doctrine_Record the given record
65-
*
66-
* @thrown Doctrine_Record_UnknownPropertyException when this way is not available
62+
* @throws Doctrine_Record_UnknownPropertyException
6763
*/
6864
public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value)
6965
{
@@ -90,13 +86,9 @@ public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value)
9086
}
9187

9288
/**
93-
* Provides a way for getting property or relation value from the given record.
94-
*
95-
* @param string $propertyOrRelation
96-
*
9789
* @return mixed
9890
*
99-
* @thrown Doctrine_Record_UnknownPropertyException when this way is not available
91+
* @throws Doctrine_Record_UnknownPropertyException
10092
*/
10193
public function filterGet(Doctrine_Record $record, $propertyOrRelation)
10294
{

lib/Doctrine/Record/Filter/Standard.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,15 @@
3434
class Doctrine_Record_Filter_Standard extends Doctrine_Record_Filter
3535
{
3636
/**
37-
* @param string $propertyOrRelation
38-
*
39-
* @thrown Doctrine_Record_UnknownPropertyException
37+
* @return Doctrine_Record the given record
4038
*/
4139
public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value)
4240
{
4341
throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));
4442
}
4543

4644
/**
47-
* @param string $propertyOrRelation
48-
*
49-
* @thrown Doctrine_Record_UnknownPropertyException
45+
* @return mixed
5046
*/
5147
public function filterGet(Doctrine_Record $record, $propertyOrRelation)
5248
{

0 commit comments

Comments
 (0)