diff --git a/CHANGELOG b/CHANGELOG index c8ee5f86a8..a73083baf9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ Version 1.1.29 under development - Bug #4523: Fixed translated in Greek class messages in framework requirements view, which they should not be translated (lourdas) - Bug #4534: PHP 8.2 compatibility: Fix deprecated dynamic properties in gii/components/Pear/Text/Diff (mdeweerd, marcovtwout) - Enh #4529: Exceptions thrown while loading fixture file rows now contain more details (eduardor2k) +- Enh #4533: Various refactorings applied based on PHAN checks (marcovtwout) Version 1.1.28 February 28, 2023 -------------------------------- diff --git a/framework/base/CComponent.php b/framework/base/CComponent.php index e229c0eb99..26d648cbb2 100644 --- a/framework/base/CComponent.php +++ b/framework/base/CComponent.php @@ -141,7 +141,6 @@ public function __get($name) * * @param string $name the property name or the event name * @param mixed $value the property value or callback - * @return mixed * @throws CException if the property/event is not defined or the property is read only. * @see __get */ @@ -210,7 +209,6 @@ public function __isset($name) * to allow using unset() to set a component property to be null. * @param string $name the property name or the event name * @throws CException if the property is read only. - * @return mixed */ public function __unset($name) { diff --git a/framework/base/CSecurityManager.php b/framework/base/CSecurityManager.php index 525f7d10bf..cdd82f911c 100644 --- a/framework/base/CSecurityManager.php +++ b/framework/base/CSecurityManager.php @@ -522,7 +522,6 @@ private function substr($string,$start,$length) /** * Checks if a key is valid for {@link cryptAlgorithm}. * @param string $key the key to check - * @return boolean the validation result * @throws CException if the supported key lengths of the cipher are unknown */ protected function validateEncryptionKey($key) diff --git a/framework/caching/CCache.php b/framework/caching/CCache.php index 4dc82848d0..1143efe2a2 100644 --- a/framework/caching/CCache.php +++ b/framework/caching/CCache.php @@ -370,7 +370,6 @@ public function offsetSet($id, $value) * Deletes the value with the specified key from cache * This method is required by the interface ArrayAccess. * @param string $id the key of the value to be deleted - * @return boolean if no error happens during deletion */ #[ReturnTypeWillChange] public function offsetUnset($id) diff --git a/framework/caching/CDummyCache.php b/framework/caching/CDummyCache.php index db2635cf67..0932b5fe52 100644 --- a/framework/caching/CDummyCache.php +++ b/framework/caching/CDummyCache.php @@ -158,7 +158,6 @@ public function offsetSet($id, $value) * Deletes the value with the specified key from cache * This method is required by the interface ArrayAccess. * @param string $id the key of the value to be deleted - * @return boolean if no error happens during deletion */ #[ReturnTypeWillChange] public function offsetUnset($id) diff --git a/framework/cli/commands/shell/ModelCommand.php b/framework/cli/commands/shell/ModelCommand.php index 6c335fa22c..cc2b192245 100644 --- a/framework/cli/commands/shell/ModelCommand.php +++ b/framework/cli/commands/shell/ModelCommand.php @@ -121,8 +121,6 @@ protected function isRelationTable($table) /** * Generate code to put in ActiveRecord class's relations() function. - * @return array indexed by table names, each entry contains array of php code to go in appropriate ActiveRecord class. - * Empty array is returned if database couldn't be connected. */ protected function generateRelations() { diff --git a/framework/db/schema/mssql/CMssqlPdoAdapter.php b/framework/db/schema/mssql/CMssqlPdoAdapter.php index c0ec530b38..9862d55792 100644 --- a/framework/db/schema/mssql/CMssqlPdoAdapter.php +++ b/framework/db/schema/mssql/CMssqlPdoAdapter.php @@ -20,7 +20,7 @@ class CMssqlPdoAdapter extends PDO * Get the last inserted id value * MSSQL doesn't support sequence, so, argument is ignored * - * @param string|null sequence name. Defaults to null + * @param string|null $sequence sequence name. Defaults to null * @return integer last inserted id */ #[ReturnTypeWillChange] diff --git a/framework/gii/generators/model/ModelCode.php b/framework/gii/generators/model/ModelCode.php index 4908fec06c..81dd117cc0 100644 --- a/framework/gii/generators/model/ModelCode.php +++ b/framework/gii/generators/model/ModelCode.php @@ -362,7 +362,7 @@ protected function generateRelations() /** * Checks if the given table is a "many to many" pivot table. * Their PK has 2 fields, and both of those fields are also FK to other separate tables. - * @param CDbTableSchema table to inspect + * @param CDbTableSchema $table table to inspect * @return boolean true if table matches description of helper table. */ protected function isRelationTable($table) @@ -394,9 +394,9 @@ protected function generateClassName($tableName) /** * Generate a name for use as a relation name (inside relations() function in a model). - * @param string the name of the table to hold the relation - * @param string the foreign key name - * @param boolean whether the relation would contain multiple objects + * @param string $tableName the name of the table to hold the relation + * @param string $fkName the foreign key name + * @param boolean $multiple whether the relation would contain multiple objects * @return string the relation name */ protected function generateRelationName($tableName, $fkName, $multiple) diff --git a/framework/gii/generators/model/ModelGenerator.php b/framework/gii/generators/model/ModelGenerator.php index 819507ee07..e5e12db464 100644 --- a/framework/gii/generators/model/ModelGenerator.php +++ b/framework/gii/generators/model/ModelGenerator.php @@ -7,7 +7,6 @@ class ModelGenerator extends CCodeGenerator /** * Provides autocomplete table names * @param string $db the database connection component id - * @return string the json array of tablenames that contains the entered term $q */ public function actionGetTableNames($db) { diff --git a/framework/messages/ca/yii.php b/framework/messages/ca/yii.php index 504691441c..a1d30a3cfc 100644 --- a/framework/messages/ca/yii.php +++ b/framework/messages/ca/yii.php @@ -84,7 +84,6 @@ 'Active Record requires a "db" CDbConnection application component.' => 'Active Record requiereix un component d\'aplicació "db" de tipus CDbConnection.', 'Active record "{class}" has an invalid configuration for relation "{relation}". It must specify the relation type, the related active record class and the foreign key.' => 'Active record "{class}" conté una configuració de relació invàlida "{relation}". La mateixa ha d\'especificar el tipus de relació, la clase active record relacionada i la clau forània.', 'Active record "{class}" is trying to select an invalid column "{column}". Note, the column must exist in the table or be an expression with alias.' => 'Active Record "{class}" esta intentant seleccionar una columna que no és vàlida {"column"}. Nota: la columna pot existir a la BDD o ser una expressió amb àlies.', - 'Alias "{alias}" is invalid. Make sure it points to an existing directory or file.' => 'Alias "{alias}" es inválido. Verifique que el mismo apunta a un directorio o archivo exisitente.', 'Alias "{alias}" is invalid. Make sure it points to an existing directory or file.' => 'L\'àlies "{alias}" no és vàlid. Verifiqui que el mateix apunta a un directori o arxiu exisitent.', 'Application base path "{path}" is not a valid directory.' => 'Ruta base de l\'aplicació "{path}" no és un directori vàlid.', 'Application runtime path "{path}" is not valid. Please make sure it is a directory writable by the Web server process.' => 'Ruta de runtime d\'aplicació "{path}" no és vàlida. Asseguri\'s de que sigui un directori amb permisos d\'escriptura pel procés que corre el servidor Web.', diff --git a/framework/web/CHttpSessionIterator.php b/framework/web/CHttpSessionIterator.php index fe51332e5a..2b3f14c0c9 100644 --- a/framework/web/CHttpSessionIterator.php +++ b/framework/web/CHttpSessionIterator.php @@ -30,7 +30,6 @@ class CHttpSessionIterator implements Iterator /** * Constructor. - * @param array the data to be iterated through */ public function __construct() { diff --git a/framework/web/actions/CViewAction.php b/framework/web/actions/CViewAction.php index afaf886888..9bacbab681 100644 --- a/framework/web/actions/CViewAction.php +++ b/framework/web/actions/CViewAction.php @@ -92,7 +92,6 @@ public function getRequestedView() /** * Resolves the user-specified view into a valid view name. * @param string $viewPath user-specified view in the format of 'path.to.view'. - * @return string fully resolved view in the format of 'path/to/view'. * @throws CHttpException if the user-specified view is invalid */ protected function resolveView($viewPath) diff --git a/framework/web/widgets/COutputCache.php b/framework/web/widgets/COutputCache.php index d3acb326cd..6723dbc5b9 100644 --- a/framework/web/widgets/COutputCache.php +++ b/framework/web/widgets/COutputCache.php @@ -157,7 +157,6 @@ class COutputCache extends CFilterWidget * Performs filtering before the action is executed. * This method is meant to be overridden by child classes if begin-filtering is needed. * @param CFilterChain $filterChain list of filters being applied to an action - * @return boolean whether the filtering process should stop after this filter. Defaults to false. */ public function filter($filterChain) {