Skip to content

Commit

Permalink
Use self instead of $this for IDE compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Dec 19, 2016
1 parent b2703a7 commit 2f0133b
Show file tree
Hide file tree
Showing 57 changed files with 349 additions and 349 deletions.
34 changes: 17 additions & 17 deletions src/Console/ConsoleOptionParser.php
Expand Up @@ -169,7 +169,7 @@ public function __construct($command = null, $defaultOptions = true)
*
* @param string|null $command The command name this parser is for. The command name is used for generating help.
* @param bool $defaultOptions Whether you want the verbose and quiet options set.
* @return $this
* @return self
*/
public static function create($command, $defaultOptions = true)
{
Expand Down Expand Up @@ -197,7 +197,7 @@ public static function create($command, $defaultOptions = true)
*
* @param array $spec The spec to build the OptionParser with.
* @param bool $defaultOptions Whether you want the verbose and quiet options set.
* @return $this
* @return self
*/
public static function buildFromArray($spec, $defaultOptions = true)
{
Expand Down Expand Up @@ -244,7 +244,7 @@ public function toArray()
* Get or set the command name for shell/task.
*
* @param array|\Cake\Console\ConsoleOptionParser $spec ConsoleOptionParser or spec to merge with.
* @return $this
* @return self
*/
public function merge($spec)
{
Expand Down Expand Up @@ -274,7 +274,7 @@ public function merge($spec)
* Sets the command name for shell/task.
*
* @param string $text The text to set.
* @return $this
* @return self
*/
public function setCommand($text)
{
Expand All @@ -298,7 +298,7 @@ public function getCommand()
*
* @deprecated 3.4.0 Use setCommand()/getCommand() instead.
* @param string|null $text The text to set, or null if you want to read
* @return string|$this If reading, the value of the command. If setting $this will be returned.
* @return string|self If reading, the value of the command. If setting $this will be returned.
*/
public function command($text = null)
{
Expand All @@ -314,7 +314,7 @@ public function command($text = null)
*
* @param string|array $text The text to set. If an array the
* text will be imploded with "\n".
* @return $this
* @return self
*/
public function setDescription($text)
{
Expand Down Expand Up @@ -342,7 +342,7 @@ public function getDescription()
* @deprecated 3.4.0 Use setDescription()/getDescription() instead.
* @param string|array|null $text The text to set, or null if you want to read. If an array the
* text will be imploded with "\n".
* @return string|$this If reading, the value of the description. If setting $this will be returned.
* @return string|self If reading, the value of the description. If setting $this will be returned.
*/
public function description($text = null)
{
Expand All @@ -359,7 +359,7 @@ public function description($text = null)
*
* @param string|array $text The text to set. If an array the text will
* be imploded with "\n".
* @return $this
* @return self
*/
public function setEpilog($text)
{
Expand Down Expand Up @@ -388,7 +388,7 @@ public function getEpilog()
* @deprecated 3.4.0 Use setEpilog()/getEpilog() instead.
* @param string|array|null $text Text when setting or null when reading. If an array the text will
* be imploded with "\n".
* @return string|$this If reading, the value of the epilog. If setting $this will be returned.
* @return string|self If reading, the value of the epilog. If setting $this will be returned.
*/
public function epilog($text = null)
{
Expand Down Expand Up @@ -419,7 +419,7 @@ public function epilog($text = null)
* @param \Cake\Console\ConsoleInputOption|string $name The long name you want to the value to be parsed out as when options are parsed.
* Will also accept an instance of ConsoleInputOption
* @param array $options An array of parameters that define the behavior of the option
* @return $this
* @return self
*/
public function addOption($name, array $options = [])
{
Expand Down Expand Up @@ -452,7 +452,7 @@ public function addOption($name, array $options = [])
* Remove an option from the option parser.
*
* @param string $name The option name to remove.
* @return $this
* @return self
*/
public function removeOption($name)
{
Expand All @@ -477,7 +477,7 @@ public function removeOption($name)
* @param \Cake\Console\ConsoleInputArgument|string $name The name of the argument.
* Will also accept an instance of ConsoleInputArgument.
* @param array $params Parameters for the argument, see above.
* @return $this
* @return self
*/
public function addArgument($name, array $params = [])
{
Expand Down Expand Up @@ -517,7 +517,7 @@ public function addArgument($name, array $params = [])
*
* @param array $args Array of arguments to add.
* @see \Cake\Console\ConsoleOptionParser::addArgument()
* @return $this
* @return self
*/
public function addArguments(array $args)
{
Expand All @@ -538,7 +538,7 @@ public function addArguments(array $args)
*
* @param array $options Array of options to add.
* @see \Cake\Console\ConsoleOptionParser::addOption()
* @return $this
* @return self
*/
public function addOptions(array $options)
{
Expand Down Expand Up @@ -566,7 +566,7 @@ public function addOptions(array $options)
*
* @param \Cake\Console\ConsoleInputSubcommand|string $name Name of the subcommand. Will also accept an instance of ConsoleInputSubcommand
* @param array $options Array of params, see above.
* @return $this
* @return self
*/
public function addSubcommand($name, array $options = [])
{
Expand All @@ -592,7 +592,7 @@ public function addSubcommand($name, array $options = [])
* Remove a subcommand from the option parser.
*
* @param string $name The subcommand name to remove.
* @return $this
* @return self
*/
public function removeSubcommand($name)
{
Expand All @@ -605,7 +605,7 @@ public function removeSubcommand($name)
* Add multiple subcommands at once.
*
* @param array $commands Array of subcommands.
* @return $this
* @return self
*/
public function addSubcommands(array $commands)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/InstanceConfigTrait.php
Expand Up @@ -124,7 +124,7 @@ public function config($key = null, $value = null, $merge = true)
*
* @param string|array $key The key to set, or a complete array of configs.
* @param mixed|null $value The value to set.
* @return $this The object itself.
* @return self The object itself.
*/
public function configShallow($key, $value = null)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Database/Connection.php
Expand Up @@ -150,7 +150,7 @@ public function configName()
* @param array $config Config for a new driver.
* @throws \Cake\Database\Exception\MissingDriverException When a driver class is missing.
* @throws \Cake\Database\Exception\MissingExtensionException When a driver's PHP extension is missing.
* @return $this
* @return self
*/
public function setDriver($driver, $config = [])
{
Expand Down Expand Up @@ -335,7 +335,7 @@ public function newQuery()
* Sets a Schema\Collection object for this connection.
*
* @param \Cake\Database\Schema\Collection $collection The schema collection object
* @return $this
* @return self
*/
public function setSchemaCollection(SchemaCollection $collection)
{
Expand Down Expand Up @@ -522,7 +522,7 @@ public function rollback()
* `$connection->enableSavePoints(false)` Disables usage of savepoints and returns false
*
* @param bool $enable Whether or not save points should be used.
* @return $this
* @return self
*/
public function enableSavePoints($enable)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Driver.php
Expand Up @@ -301,7 +301,7 @@ public function isConnected()
* in queries.
*
* @param bool $enable Whether to enable auto quoting
* @return $this
* @return self
*/
public function enableAutoQuoting($enable)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Expression/CaseExpression.php
Expand Up @@ -83,7 +83,7 @@ public function __construct($conditions = [], $values = [], $types = [])
* @param array|\Cake\Database\ExpressionInterface $values associative array of values of each condition
* @param array $types associative array of types to be associated with the values
*
* @return $this
* @return self
*/
public function add($conditions = [], $values = [], $types = [])
{
Expand Down
6 changes: 3 additions & 3 deletions src/Database/Expression/FunctionExpression.php
Expand Up @@ -77,7 +77,7 @@ public function __construct($name, $params = [], $types = [], $returnType = 'str
* Sets the name of the SQL function to be invoke in this expression.
*
* @param string $name The name of the function
* @return $this
* @return self
*/
public function setName($name)
{
Expand All @@ -102,7 +102,7 @@ public function getName()
*
* @deprecated 3.4.0 Use setName()/getName() instead.
* @param string|null $name The name of the function
* @return string|$this
* @return string|self
*/
public function name($name = null)
{
Expand All @@ -122,7 +122,7 @@ public function name($name = null)
* passed arguments
* @param bool $prepend Whether to prepend or append to the list of arguments
* @see \Cake\Database\Expression\FunctionExpression::__construct() for more details.
* @return $this
* @return self
*/
public function add($params, $types = [], $prepend = false)
{
Expand Down

0 comments on commit 2f0133b

Please sign in to comment.