Skip to content

Commit

Permalink
update cs-fixer to latest stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
isfedorov committed May 9, 2021
1 parent 7d3f0e8 commit f25c9fa
Show file tree
Hide file tree
Showing 38 changed files with 526 additions and 253 deletions.
File renamed without changes.
19 changes: 16 additions & 3 deletions Ev/Ev.php
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,12 @@ final class EvPeriodic extends EvWatcher
* @param int $priority
*/
public function __construct(
$offset, $interval, ?callable $reschedule_cb = null, callable $callback, $data = null, $priority = 0
$offset,
$interval,
?callable $reschedule_cb,
callable $callback,
$data = null,
$priority = 0
) {}

/**
Expand Down Expand Up @@ -847,7 +852,12 @@ public function at() {}
* @return EvPeriodic
*/
final public static function createStopped(
$offset, $interval, ?callable $reschedule_cb = null, callable $callback, $data = null, $priority = 0
$offset,
$interval,
?callable $reschedule_cb,
callable $callback,
$data = null,
$priority = 0
) {}

/**
Expand Down Expand Up @@ -1516,6 +1526,9 @@ public function verify() {}
* @param float $timeout_interval
*/
public static function defaultLoop(
$flags = Ev::FLAG_AUTO, $data = null, $io_interval = 0.0, $timeout_interval = 0.0
$flags = Ev::FLAG_AUTO,
$data = null,
$io_interval = 0.0,
$timeout_interval = 0.0
) {}
}
12 changes: 7 additions & 5 deletions Phar/Phar.php
Original file line number Diff line number Diff line change
Expand Up @@ -808,11 +808,13 @@ final public static function unlinkArchive(string $filename) {}
* </p>
* @return void No value is returned.
*/
final public static function webPhar(?string $alias = null,
?string $index = "index.php",
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $fileNotFoundScript = null,
array $mimeTypes = null,
?callable $rewrite = null) {}
final public static function webPhar(
?string $alias = null,
?string $index = "index.php",
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $fileNotFoundScript = null,
array $mimeTypes = null,
?callable $rewrite = null
) {}

/**
* Returns whether current entry is a directory and not '.' or '..'
Expand Down
12 changes: 8 additions & 4 deletions SPL/SPL.php
Original file line number Diff line number Diff line change
Expand Up @@ -1271,8 +1271,12 @@ class RecursiveTreeIterator extends RecursiveIteratorIterator
* @param int $cachingIteratorFlags [optional] Flags to affect the behavior of the {@see RecursiveCachingIterator} used internally.
* @param int $mode [optional] Flags to affect the behavior of the {@see RecursiveIteratorIterator} used internally.
*/
public function __construct($iterator, $flags = self::BYPASS_KEY, $cachingIteratorFlags = CachingIterator::CATCH_GET_CHILD,
$mode = self::SELF_FIRST) {}
public function __construct(
$iterator,
$flags = self::BYPASS_KEY,
$cachingIteratorFlags = CachingIterator::CATCH_GET_CHILD,
$mode = self::SELF_FIRST
) {}

/**
* Rewind iterator
Expand Down Expand Up @@ -1555,7 +1559,7 @@ public function ksort($flags = SORT_REGULAR) {}
/**
* Sort the entries with a user-defined comparison function and maintain key association
* @link https://php.net/manual/en/arrayobject.uasort.php
* @param callback $callback <p>
* @param callable $callback <p>
* Function <i>cmp_function</i> should accept two
* parameters which will be filled by pairs of entries.
* The comparison function must return an integer less than, equal
Expand All @@ -1570,7 +1574,7 @@ public function uasort($callback) {}
/**
* Sort the entries by keys using a user-defined comparison function
* @link https://php.net/manual/en/arrayobject.uksort.php
* @param callback $callback <p>
* @param callable $callback <p>
* The callback comparison function.
* </p>
* <p>
Expand Down
4 changes: 2 additions & 2 deletions SPL/SPL_f.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function spl_autoload_extensions(?string $file_extensions): string {}
/**
* Register given function as __autoload() implementation
* @link https://php.net/manual/en/function.spl-autoload-register.php
* @param callback|null $callback [optional] <p>
* @param callable|null $callback [optional] <p>
* The autoload function being registered.
* If no parameter is provided, then the default implementation of
* spl_autoload will be registered.
Expand Down Expand Up @@ -166,7 +166,7 @@ function iterator_count(Traversable $iterator): int {}
* @param Traversable $iterator <p>
* The class to iterate over.
* </p>
* @param callback $callback <p>
* @param callable $callback <p>
* The callback function to call on every element.
* The function must return true in order to
* continue iterating over the iterator.
Expand Down
6 changes: 3 additions & 3 deletions SQLite/SQLite.php
Original file line number Diff line number Diff line change
Expand Up @@ -1103,10 +1103,10 @@ function sqlite_unbuffered_query($dbhandle, $query, $result_type = SQLITE_BOTH,
* @param string $function_name <p>
* The name of the function used in SQL statements.
* </p>
* @param callback $step_func <p>
* @param callable $step_func <p>
* Callback function called for each row of the result set.
* </p>
* @param callback $finalize_func <p>
* @param callable $finalize_func <p>
* Callback function to aggregate the "stepped" data from each row.
* </p>
* @param int $num_args [optional] <p>
Expand All @@ -1127,7 +1127,7 @@ function sqlite_create_aggregate($dbhandle, $function_name, $step_func, $finaliz
* @param string $function_name <p>
* The name of the function used in SQL statements.
* </p>
* @param callback $callback <p>
* @param callable $callback <p>
* Callback function to handle the defined SQL function.
* </p>
* Callback functions should return a type understood by SQLite (i.e.
Expand Down
12 changes: 6 additions & 6 deletions enchant/enchant.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ function enchant_dict_suggest($dict, $word) {}
* @see enchant_dict_add()
*/
#[Deprecated(
reason: 'Use enchant_dict_add instead',
replacement: 'enchant_dict_add(%parameter0%, %parameter1%)',
since: '8.0'
reason: 'Use enchant_dict_add instead',
replacement: 'enchant_dict_add(%parameter0%, %parameter1%)',
since: '8.0'
)]
function enchant_dict_add_to_personal($dict, $word) {}

Expand Down Expand Up @@ -241,9 +241,9 @@ function enchant_dict_add($dictionary, $word) {}
* @see enchant_dict_is_added
*/
#[Deprecated(
reason: 'Use enchant_dict_is_added instead',
replacement: 'enchant_dict_is_added(%parameter0%, %parameter1%)',
since: '8.0'
reason: 'Use enchant_dict_is_added instead',
replacement: 'enchant_dict_is_added(%parameter0%, %parameter1%)',
since: '8.0'
)]
function enchant_dict_is_in_session($dict, $word) {}

Expand Down
16 changes: 8 additions & 8 deletions gearman/gearman.php
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@ public function addTaskStatus($job_handle, $context = null) {}
* single argument, a GearmanTask object.
*
* @link https://php.net/manual/en/gearmanclient.setworkloadcallback.php
* @param callback $callback A function to call
* @param callable $callback A function to call
* @return bool
*/
public function setWorkloadCallback($callback) {}
Expand All @@ -1711,7 +1711,7 @@ public function setCreatedCallback($callback) {}
* function should take a single argument, a GearmanTask object.
*
* @link https://php.net/manual/en/gearmanclient.setdatacallback.php
* @param callback $callback A function or method to call
* @param callable $callback A function or method to call
* @return bool
*/
public function setDataCallback($callback) {}
Expand All @@ -1721,7 +1721,7 @@ public function setDataCallback($callback) {}
* accept a single argument, a GearmanTask object.
*
* @link https://php.net/manual/en/gearmanclient.setwarningcallback.php
* @param callback $callback A function to call
* @param callable $callback A function to call
* @return bool
*/
public function setWarningCallback($callback) {}
Expand All @@ -1731,7 +1731,7 @@ public function setWarningCallback($callback) {}
* worker. The function should accept a single argument, a GearmanTask object.
*
* @link https://php.net/manual/en/gearmanclient.setstatuscallback.php
* @param callback $callback A function to call
* @param callable $callback A function to call
* @return bool
*/
public function setStatusCallback($callback) {}
Expand All @@ -1741,7 +1741,7 @@ public function setStatusCallback($callback) {}
* function should accept a single argument, a GearmanTask oject.
*
* @link https://php.net/manual/en/gearmanclient.setcompletecallback.php
* @param callback $callback A function to be called
* @param callable $callback A function to be called
* @return bool
*/
public function setCompleteCallback($callback) {}
Expand All @@ -1750,7 +1750,7 @@ public function setCompleteCallback($callback) {}
* Specifies a function to call when a worker for a task sends an exception.
*
* @link https://php.net/manual/en/gearmanclient.setexceptioncallback.php
* @param callback $callback Function to call when the worker throws an exception
* @param callable $callback Function to call when the worker throws an exception
* @return bool
*/
public function setExceptionCallback($callback) {}
Expand All @@ -1760,7 +1760,7 @@ public function setExceptionCallback($callback) {}
* successfully. The function should accept a single argument, a GearmanTask object.
*
* @link https://php.net/manual/en/gearmanclient.setfailcallback.php
* @param callback $callback A function to call
* @param callable $callback A function to call
* @return bool
*/
public function setFailCallback($callback) {}
Expand Down Expand Up @@ -2083,7 +2083,7 @@ public function grabJob() {}
* @link https://php.net/manual/en/gearmanworker.addfunction.php
* @param string $function_name The name of a function to register with the job
* server
* @param callback $function A callback that gets called when a job for the
* @param callable $function A callback that gets called when a job for the
* registered function name is submitted
* @param mixed $context A reference to arbitrary application context data that can
* be modified by the worker function
Expand Down
4 changes: 2 additions & 2 deletions interbase/interbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ function ibase_wait_event($event_name1, $event_name2 = null, ...$_) {}
/**
* Register a callback function to be called when events are posted
* @link https://php.net/manual/en/function.ibase-set-event-handler.php
* @param callback $event_handler <p>
* @param callable $event_handler <p>
* The callback is called with the event name and the link resource as
* arguments whenever one of the specified events is posted by the
* database.
Expand Down Expand Up @@ -1413,7 +1413,7 @@ function fbird_wait_event($event_name1, $event_name2 = null, ...$_) {}
* This is an alias of ibase_set_event_handler
* Register a callback function to be called when events are posted
* @link https://php.net/manual/en/function.fbird-set-event-handler.php
* @param callback $event_handler <p>
* @param callable $event_handler <p>
* The callback is called with the event name and the link resource as
* arguments whenever one of the specified events is posted by the
* database.
Expand Down
10 changes: 8 additions & 2 deletions intl/intl.php
Original file line number Diff line number Diff line change
Expand Up @@ -4291,8 +4291,14 @@ function msgfmt_get_error_message(MessageFormatter $formatter): string {}
* @return IntlDateFormatter|null
*/
#[Pure]
function datefmt_create(?string $locale, int $dateType, int $timeType, $timezone = null, IntlCalendar|int|null $calendar = null,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $pattern = null): ?IntlDateFormatter {}
function datefmt_create(
?string $locale,
int $dateType,
int $timeType,
$timezone = null,
IntlCalendar|int|null $calendar = null,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $pattern = null
): ?IntlDateFormatter {}

/**
* (PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)<br/>
Expand Down
16 changes: 8 additions & 8 deletions libevent/libevent.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ function event_add($event, $timeout = -1) {}
* The additional flag EV_PERSIST makes the event to persist until {@link event_del}() is
* called, otherwise the callback is invoked only once.
* </p>
* @param callback $callback <p>
* @param callable $callback <p>
* Callback function to be called when the matching event occurs.
* </p>
* @param mixed $arg [optional] <p>
Expand Down Expand Up @@ -385,9 +385,9 @@ function event_del($event) {}
* @link https://php.net/event_buffer_new
*
* @param resource $stream Valid PHP stream resource. Must be castable to file descriptor.
* @param callback|null $readcb Callback to invoke where there is data to read, or NULL if no callback is desired.
* @param callback|null $writecb Callback to invoke where the descriptor is ready for writing, or NULL if no callback is desired.
* @param callback $errorcb Callback to invoke where there is an error on the descriptor, cannot be NULL.
* @param callable|null $readcb Callback to invoke where there is data to read, or NULL if no callback is desired.
* @param callable|null $writecb Callback to invoke where the descriptor is ready for writing, or NULL if no callback is desired.
* @param callable $errorcb Callback to invoke where there is an error on the descriptor, cannot be NULL.
* @param mixed $arg An argument that will be passed to each of the callbacks (optional).
*
* @return resource|false returns new buffered event resource on success or FALSE on error.
Expand Down Expand Up @@ -592,9 +592,9 @@ function event_buffer_fd_set($bevent, $fd) {}
* @link https://php.net/event_buffer_set_callback
*
* @param resource $bevent Valid buffered event resource.
* @param callback|null $readcb Callback to invoke where there is data to read, or NULL if no callback is desired.
* @param callback|null $writecb Callback to invoke where the descriptor is ready for writing, or NULL if no callback is desired.
* @param callback $errorcb Callback to invoke where there is an error on the descriptor, cannot be NULL.
* @param callable|null $readcb Callback to invoke where there is data to read, or NULL if no callback is desired.
* @param callable|null $writecb Callback to invoke where the descriptor is ready for writing, or NULL if no callback is desired.
* @param callable $errorcb Callback to invoke where there is an error on the descriptor, cannot be NULL.
* @param mixed $arg An argument that will be passed to each of the callbacks (optional).
*
* @return bool returns TRUE on success or FALSE on error.
Expand Down Expand Up @@ -636,7 +636,7 @@ function event_timer_new() {}
* @param resource $event <p>
* Valid event resource.
* </p>
* @param callback $callback <p>
* @param callable $callback <p>
* Callback function to be called when the matching event occurs.
* </p>
* @param mixed $arg [optional] <p>
Expand Down
7 changes: 5 additions & 2 deletions meta/attributes/Deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class Deprecated
* f(1,2) will be replaced with wrappedCall(f(2,1))
* @param string $since Element is deprecated starting with the provided PHP language level, applicable only for PhpStorm stubs entries
*/
public function __construct($reason = "", $replacement = "",
#[ExpectedValues(self::PHP_VERSIONS)] $since = "5.6") {}
public function __construct(
$reason = "",
$replacement = "",
#[ExpectedValues(self::PHP_VERSIONS)] $since = "5.6"
) {}
}
14 changes: 8 additions & 6 deletions mysqli/mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -2390,12 +2390,14 @@ function mysqli_stat(mysqli $mysql): string|false {}
* @param string|null $cipher_algos A list of allowable ciphers to use for SSL encryption
* @return bool This function always returns TRUE value.
*/
function mysqli_ssl_set(mysqli $mysql,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $key ,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $certificate ,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $ca_certificate ,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $ca_path,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $cipher_algos): bool {}
function mysqli_ssl_set(
mysqli $mysql,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $key,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $certificate,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $ca_certificate,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $ca_path,
#[LanguageLevelTypeAware(['8.0' => '?string'], default: 'string')] $cipher_algos
): bool {}

/**
* Closes a prepared statement
Expand Down
6 changes: 3 additions & 3 deletions oauth/oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function checkOAuthRequest($uri = '', $method = '') {}
public function __construct($params_array) {}

/**
* @param callback $callback_function
* @param callable $callback_function
* @return void
*/
public function consumerHandler($callback_function) {}
Expand Down Expand Up @@ -350,13 +350,13 @@ final public function setParam($param_key, $param_val = null) {}
final public function setRequestTokenPath($path) {}

/**
* @param callback $callback_function
* @param callable $callback_function
* @return void
*/
public function timestampNonceHandler($callback_function) {}

/**
* @param callback $callback_function
* @param callable $callback_function
* @return void
*/
public function tokenHandler($callback_function) {}
Expand Down
Loading

0 comments on commit f25c9fa

Please sign in to comment.