Skip to content

Commit 0a8b6af

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

File tree

3 files changed

+5
-30
lines changed

3 files changed

+5
-30
lines changed

lib/Doctrine/Record/Filter.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
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)
@@ -56,7 +59,7 @@ public function init()
5659
*
5760
* @return Doctrine_Record the given record
5861
*
59-
* @thrown Doctrine_Exception when this way is not available
62+
* @throws Doctrine_Exception when this way is not available
6063
*/
6164
abstract public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value);
6265

@@ -67,7 +70,7 @@ abstract public function filterSet(Doctrine_Record $record, $propertyOrRelation,
6770
*
6871
* @return mixed
6972
*
70-
* @thrown Doctrine_Exception when this way is not available
73+
* @throws Doctrine_Exception when this way is not available
7174
*/
7275
abstract public function filterGet(Doctrine_Record $record, $propertyOrRelation);
7376
}

lib/Doctrine/Record/Filter/Compound.php

-18
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,6 @@ public function init()
5656
}
5757
}
5858

59-
/**
60-
* Provides a way for setting property or relation value to the given record.
61-
*
62-
* @param string $propertyOrRelation
63-
*
64-
* @return Doctrine_Record the given record
65-
*
66-
* @thrown Doctrine_Record_UnknownPropertyException when this way is not available
67-
*/
6859
public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value)
6960
{
7061
foreach ($this->_aliases as $alias) {
@@ -89,15 +80,6 @@ public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value)
8980
throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));
9081
}
9182

92-
/**
93-
* Provides a way for getting property or relation value from the given record.
94-
*
95-
* @param string $propertyOrRelation
96-
*
97-
* @return mixed
98-
*
99-
* @thrown Doctrine_Record_UnknownPropertyException when this way is not available
100-
*/
10183
public function filterGet(Doctrine_Record $record, $propertyOrRelation)
10284
{
10385
foreach ($this->_aliases as $alias) {

lib/Doctrine/Record/Filter/Standard.php

-10
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,11 @@
3333
*/
3434
class Doctrine_Record_Filter_Standard extends Doctrine_Record_Filter
3535
{
36-
/**
37-
* @param string $propertyOrRelation
38-
*
39-
* @thrown Doctrine_Record_UnknownPropertyException
40-
*/
4136
public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value)
4237
{
4338
throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));
4439
}
4540

46-
/**
47-
* @param string $propertyOrRelation
48-
*
49-
* @thrown Doctrine_Record_UnknownPropertyException
50-
*/
5141
public function filterGet(Doctrine_Record $record, $propertyOrRelation)
5242
{
5343
throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));

0 commit comments

Comments
 (0)