mirror of
https://github.com/yiisoft/yii.git
synced 2026-02-19 17:11:23 +01:00
Merge pull request #4537 from yiisoft/4533-phan-check-improvements
PHAN refactoring improvements
This commit is contained in:
@@ -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
|
||||
--------------------------------
|
||||
|
||||
@@ -141,7 +141,6 @@ class CComponent
|
||||
* </pre>
|
||||
* @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 @@ class CComponent
|
||||
* 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)
|
||||
{
|
||||
|
||||
@@ -522,7 +522,6 @@ class CSecurityManager extends CApplicationComponent
|
||||
/**
|
||||
* 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)
|
||||
|
||||
@@ -370,7 +370,6 @@ abstract class CCache extends CApplicationComponent implements ICache, ArrayAcce
|
||||
* 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)
|
||||
|
||||
@@ -158,7 +158,6 @@ class CDummyCache extends CApplicationComponent implements ICache, ArrayAccess
|
||||
* 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)
|
||||
|
||||
@@ -121,8 +121,6 @@ EOD;
|
||||
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -362,7 +362,7 @@ class ModelCode extends CCodeModel
|
||||
/**
|
||||
* 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 @@ class ModelCode extends CCodeModel
|
||||
|
||||
/**
|
||||
* 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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -84,7 +84,6 @@ return array (
|
||||
'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.',
|
||||
|
||||
@@ -30,7 +30,6 @@ class CHttpSessionIterator implements Iterator
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param array the data to be iterated through
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -92,7 +92,6 @@ class CViewAction extends CAction
|
||||
/**
|
||||
* 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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user