From a9a1f10c7c5cefb0714ab8c8ff7724476a421668 Mon Sep 17 00:00:00 2001 From: thePanz Date: Sat, 26 Oct 2024 00:47:47 +0200 Subject: [PATCH] Fix PHP deprecations on Doctrine_Record_Filter::filterSet() and ::filterGet() and sub-classes --- lib/Doctrine/Record/Filter.php | 7 +++++-- lib/Doctrine/Record/Filter/Compound.php | 18 ------------------ lib/Doctrine/Record/Filter/Standard.php | 10 ---------- 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/lib/Doctrine/Record/Filter.php b/lib/Doctrine/Record/Filter.php index b122ff723..ac8b65157 100644 --- a/lib/Doctrine/Record/Filter.php +++ b/lib/Doctrine/Record/Filter.php @@ -33,6 +33,9 @@ */ abstract class Doctrine_Record_Filter { + /** + * @var Doctrine_Table|null + */ protected $_table; public function setTable(Doctrine_Table $table) @@ -56,7 +59,7 @@ public function init() * * @return Doctrine_Record the given record * - * @thrown Doctrine_Exception when this way is not available + * @throws Doctrine_Exception when this way is not available */ abstract public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value); @@ -67,7 +70,7 @@ abstract public function filterSet(Doctrine_Record $record, $propertyOrRelation, * * @return mixed * - * @thrown Doctrine_Exception when this way is not available + * @throws Doctrine_Exception when this way is not available */ abstract public function filterGet(Doctrine_Record $record, $propertyOrRelation); } diff --git a/lib/Doctrine/Record/Filter/Compound.php b/lib/Doctrine/Record/Filter/Compound.php index 38e599aec..b665fe67e 100644 --- a/lib/Doctrine/Record/Filter/Compound.php +++ b/lib/Doctrine/Record/Filter/Compound.php @@ -56,15 +56,6 @@ public function init() } } - /** - * Provides a way for setting property or relation value to the given record. - * - * @param string $propertyOrRelation - * - * @return Doctrine_Record the given record - * - * @thrown Doctrine_Record_UnknownPropertyException when this way is not available - */ public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value) { foreach ($this->_aliases as $alias) { @@ -89,15 +80,6 @@ public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value) throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record))); } - /** - * Provides a way for getting property or relation value from the given record. - * - * @param string $propertyOrRelation - * - * @return mixed - * - * @thrown Doctrine_Record_UnknownPropertyException when this way is not available - */ public function filterGet(Doctrine_Record $record, $propertyOrRelation) { foreach ($this->_aliases as $alias) { diff --git a/lib/Doctrine/Record/Filter/Standard.php b/lib/Doctrine/Record/Filter/Standard.php index f2a665358..54e41cdec 100644 --- a/lib/Doctrine/Record/Filter/Standard.php +++ b/lib/Doctrine/Record/Filter/Standard.php @@ -33,21 +33,11 @@ */ class Doctrine_Record_Filter_Standard extends Doctrine_Record_Filter { - /** - * @param string $propertyOrRelation - * - * @thrown Doctrine_Record_UnknownPropertyException - */ public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value) { throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record))); } - /** - * @param string $propertyOrRelation - * - * @thrown Doctrine_Record_UnknownPropertyException - */ public function filterGet(Doctrine_Record $record, $propertyOrRelation) { throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));