mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fix types (#19332)
* Migration::upsert() returns void * Unneeded `@property` tags * Add missing `null` param/return types * Null types for db\Query + db\ActiveQuery * Fixed testSelect
This commit is contained in:
@ -170,7 +170,7 @@ class Application extends \yii\base\Application
|
||||
*
|
||||
* @param string $route the route that specifies the action.
|
||||
* @param array $params the parameters to be passed to the action
|
||||
* @return int|Response the result of the action. This can be either an exit code or Response object.
|
||||
* @return int|Response|null the result of the action. This can be either an exit code or Response object.
|
||||
* Exit code 0 means normal, and other values mean abnormal. Exit code of `null` is treated as `0` as well.
|
||||
* @throws Exception if the route is invalid
|
||||
*/
|
||||
|
@ -34,7 +34,7 @@ class UnknownCommandException extends Exception
|
||||
* @param string $route the route of the command that could not be found.
|
||||
* @param Application $application the console application instance involved.
|
||||
* @param int $code the Exception code.
|
||||
* @param \Exception $previous the previous exception used for the exception chaining.
|
||||
* @param \Exception|null $previous the previous exception used for the exception chaining.
|
||||
*/
|
||||
public function __construct($route, $application, $code = 0, \Exception $previous = null)
|
||||
{
|
||||
|
@ -992,7 +992,7 @@ abstract class BaseMigrateController extends Controller
|
||||
|
||||
/**
|
||||
* Returns the migration history.
|
||||
* @param int $limit the maximum number of records in the history to be returned. `null` for "no limit".
|
||||
* @param int|null $limit the maximum number of records in the history to be returned. `null` for "no limit".
|
||||
* @return array the migration history
|
||||
*/
|
||||
abstract protected function getMigrationHistory($limit);
|
||||
|
@ -41,7 +41,7 @@ class HelpController extends Controller
|
||||
* Displays available commands or the detailed information
|
||||
* about a particular command.
|
||||
*
|
||||
* @param string $command The name of the command to show help about.
|
||||
* @param string|null $command The name of the command to show help about.
|
||||
* If not provided, all available commands will be displayed.
|
||||
* @return int the exit status
|
||||
* @throws Exception if the command for help is unknown
|
||||
|
@ -286,7 +286,7 @@ EOD;
|
||||
* This command will search through source code files and extract
|
||||
* messages that need to be translated in different languages.
|
||||
*
|
||||
* @param string $configFile the path or alias of the configuration file.
|
||||
* @param string|null $configFile the path or alias of the configuration file.
|
||||
* You may use the "yii message/config" command to generate
|
||||
* this file and then customize it for your needs.
|
||||
* @throws Exception on failure.
|
||||
|
Reference in New Issue
Block a user