From 5ffcb732739b6e293315b4ea2d63d6f9a6073c33 Mon Sep 17 00:00:00 2001 From: thePanz Date: Sat, 26 Oct 2024 00:47:47 +0200 Subject: [PATCH] Fix(typehint) Fix PHP deprecations on Doctrine_Record_Filter::filterSet() and ::filterGet() and sub-classes --- lib/Doctrine/Record/Filter.php | 10 ++++++++-- lib/Doctrine/Record/Filter/Compound.php | 14 +++----------- lib/Doctrine/Record/Filter/Standard.php | 8 ++------ 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/lib/Doctrine/Record/Filter.php b/lib/Doctrine/Record/Filter.php index b122ff723..24123b6d4 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) @@ -40,6 +43,9 @@ public function setTable(Doctrine_Table $table) $this->_table = $table; } + /** + * @return Doctrine_Table|null + */ public function getTable() { return $this->_table; @@ -56,7 +62,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 +73,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..f4e212af8 100644 --- a/lib/Doctrine/Record/Filter/Compound.php +++ b/lib/Doctrine/Record/Filter/Compound.php @@ -57,13 +57,9 @@ public function init() } /** - * Provides a way for setting property or relation value to the given record. + * @return Doctrine_Record * - * @param string $propertyOrRelation - * - * @return Doctrine_Record the given record - * - * @thrown Doctrine_Record_UnknownPropertyException when this way is not available + * @throws Doctrine_Record_UnknownPropertyException */ public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value) { @@ -90,13 +86,9 @@ public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value) } /** - * 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 + * @throws Doctrine_Record_UnknownPropertyException */ public function filterGet(Doctrine_Record $record, $propertyOrRelation) { diff --git a/lib/Doctrine/Record/Filter/Standard.php b/lib/Doctrine/Record/Filter/Standard.php index f2a665358..e4fc5cf51 100644 --- a/lib/Doctrine/Record/Filter/Standard.php +++ b/lib/Doctrine/Record/Filter/Standard.php @@ -34,9 +34,7 @@ class Doctrine_Record_Filter_Standard extends Doctrine_Record_Filter { /** - * @param string $propertyOrRelation - * - * @thrown Doctrine_Record_UnknownPropertyException + * @return Doctrine_Record the given record */ public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value) { @@ -44,9 +42,7 @@ public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value) } /** - * @param string $propertyOrRelation - * - * @thrown Doctrine_Record_UnknownPropertyException + * @return mixed */ public function filterGet(Doctrine_Record $record, $propertyOrRelation) {