Skip to content

Commit

Permalink
[+]: normalize more phpdocs (double -> float) + fix some more types
Browse files Browse the repository at this point in the history
  • Loading branch information
voku committed Sep 3, 2020
1 parent 32051b8 commit a8c609c
Show file tree
Hide file tree
Showing 13 changed files with 142 additions and 142 deletions.
54 changes: 27 additions & 27 deletions Ev/Ev.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,14 +743,14 @@ final public static function createStopped($fd, $events, callable $callback, $da
final class EvPeriodic extends EvWatcher
{
/**
* @var double When repeating, this contains the offset value, otherwise this is the absolute point in time (the
* @var float When repeating, this contains the offset value, otherwise this is the absolute point in time (the
* offset value passed to EvPeriodic::set(), although libev might modify this value for better numerical
* stability).
*/
public $offset;

/**
* @var double The current interval value. Can be modified any time, but changes only take effect when the periodic
* @var float The current interval value. Can be modified any time, but changes only take effect when the periodic
* timer fires or EvPeriodic::again() is being called.
*/
public $interval;
Expand All @@ -762,10 +762,10 @@ final class EvPeriodic extends EvWatcher
* Constructs EvPeriodic watcher object and starts it automatically. EvPeriodic::createStopped() method creates
* stopped periodic watcher.
*
* @param double $offset When repeating, this contains the offset value, otherwise this is the absolute point in
* @param float $offset When repeating, this contains the offset value, otherwise this is the absolute point in
* time (the offset value passed to EvPeriodic::set(), although libev might modify this value for better
* numerical stability).
* @param double $interval The current interval value. Can be modified any time, but changes only take effect when
* @param float $interval The current interval value. Can be modified any time, but changes only take effect when
* the periodic timer fires or EvPeriodic::again() is being called.
* @param callable $reschedule_cb If set, tt must return the next time to trigger, based on the passed time value
* (that is, the lowest time value larger than or equal to the second argument). It will usually be called just
Expand All @@ -792,7 +792,7 @@ public function again() {}
* the same as the offset argument to EvPeriodic::set() or EvPeriodic::__construct(), but indeed works even in
* interval mode.
*
* @return double Rhe absolute time this watcher is supposed to trigger next in seconds.
* @return float Rhe absolute time this watcher is supposed to trigger next in seconds.
*/
public function at() {}

Expand All @@ -801,10 +801,10 @@ public function at() {}
*
* Create EvPeriodic object. Unlike EvPeriodic::__construct() this method doesn't start the watcher automatically.
*
* @param double $offset When repeating, this contains the offset value, otherwise this is the absolute point in
* @param float $offset When repeating, this contains the offset value, otherwise this is the absolute point in
* time (the offset value passed to EvPeriodic::set(), although libev might modify this value for better
* numerical stability).
* @param double $interval The current interval value. Can be modified any time, but changes only take effect when
* @param float $interval The current interval value. Can be modified any time, but changes only take effect when
* the periodic timer fires or EvPeriodic::again() is being called.
* @param callable $reschedule_cb If set, tt must return the next time to trigger, based on the passed time value
* (that is, the lowest time value larger than or equal to the second argument). It will usually be called just
Expand Down Expand Up @@ -952,7 +952,7 @@ final public static function createStopped($signum, callable $callback, $data =
* This watcher type is not meant for massive numbers of EvStat watchers, as even with OS-supported change
* notifications, this can be resource-intensive.
*
* @property-read double $interval Hint on how quickly a change is expected to be detected and should normally be
* @property-read float $interval Hint on how quickly a change is expected to be detected and should normally be
* specified as 0.0 to let libev choose a suitable value.
* @property-read string $path The path to wait for status changes on.
*/
Expand All @@ -964,7 +964,7 @@ final class EvStat extends EvWatcher
* Constructs EvStat watcher object and starts the watcher automatically.
*
* @param string $path The path to wait for status changes on.
* @param double $interval Hint on how quickly a change is expected to be detected and should normally be specified
* @param float $interval Hint on how quickly a change is expected to be detected and should normally be specified
* as 0.0 to let libev choose a suitable value.
* @param callable $callback
* @param mixed $data
Expand All @@ -986,7 +986,7 @@ public function prev() {}
* Configures the watcher.
*
* @param string $path The path to wait for status changes on.
* @param double $interval Hint on how quickly a change is expected to be detected and should normally be specified
* @param float $interval Hint on how quickly a change is expected to be detected and should normally be specified
* as 0.0 to let libev choose a suitable value.
*/
public function set($path, $interval) {}
Expand All @@ -1007,7 +1007,7 @@ public function stat() {}
* Creates EvStat watcher object, but doesn't start it automatically (unlike EvStat::__construct()).
*
* @param string $path The path to wait for status changes on.
* @param double $interval Hint on how quickly a change is expected to be detected and should normally be specified
* @param float $interval Hint on how quickly a change is expected to be detected and should normally be specified
* as 0.0 to let libev choose a suitable value.
* @param callable $callback
* @param mixed $data
Expand Down Expand Up @@ -1041,14 +1041,14 @@ final public static function createStopped($path, $interval, callable $callback,
final class EvTimer extends EvWatcher
{
/**
* @var double If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it is
* @var float If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it is
* positive, then the timer will automatically be configured to trigger again every repeat seconds later, until
* stopped manually.
*/
public $repeat;

/**
* @var double The remaining time until a timer fires. If the timer is active, then this time is relative to the
* @var float The remaining time until a timer fires. If the timer is active, then this time is relative to the
* current event loop time, otherwise it's the timeout value currently configured.
*
* That is, after instantiating an EvTimer with an after value of 5.0 and repeat value of 7.0, remaining
Expand All @@ -1061,8 +1061,8 @@ final class EvTimer extends EvWatcher
/**
* Constructs an EvTimer watcher object.
*
* @param double $after Configures the timer to trigger after $after seconds.
* @param double $repeat If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it
* @param float $after Configures the timer to trigger after $after seconds.
* @param float $repeat If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it
* is positive, then the timer will automatically be configured to trigger again every repeat seconds later,
* until stopped manually.
* @param callable $callback
Expand All @@ -1086,8 +1086,8 @@ public function again() {}
/**
* Configures the watcher.
*
* @param double $after Configures the timer to trigger after $after seconds.
* @param double $repeat If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it
* @param float $after Configures the timer to trigger after $after seconds.
* @param float $repeat If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it
* is positive, then the timer will automatically be configured to trigger again every repeat seconds later,
* until stopped manually.
*/
Expand All @@ -1096,8 +1096,8 @@ public function set($after, $repeat) {}
/**
* Creates a stopped EvTimer watcher object.
*
* @param double $after Configures the timer to trigger after $after seconds.
* @param double $repeat If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it
* @param float $after Configures the timer to trigger after $after seconds.
* @param float $repeat If repeat is 0.0, then it will automatically be stopped once the timeout is reached. If it
* is positive, then the timer will automatically be configured to trigger again every repeat seconds later,
* until stopped manually.
* @param callable $callback
Expand Down Expand Up @@ -1215,7 +1215,7 @@ final class EvLoop
public $pending;

/**
* @var double Higher io_interval allows libev to spend more time collecting EvIo events, so more events can be
* @var float Higher io_interval allows libev to spend more time collecting EvIo events, so more events can be
* handled per iteration, at the cost of increasing latency. Timeouts (both EvPeriodic and EvTimer) will not be
* affected. Setting this to a non-zero value will introduce an additional sleep() call into most loop
* iterations. The sleep time ensures that libev will not poll for EvIo events more often than once per this
Expand All @@ -1226,7 +1226,7 @@ final class EvLoop
public $io_interval;

/**
* @var double Higher timeout_interval allows libev to spend more time collecting timeouts, at the expense of
* @var float Higher timeout_interval allows libev to spend more time collecting timeouts, at the expense of
* increased latency/jitter/inexactness (the watcher callback will be called later). EvIo watchers will not be
* affected. Setting this to a non-null value will not introduce any overhead in libev.
*/
Expand Down Expand Up @@ -1338,7 +1338,7 @@ public function loopFork() {}
* used for relative timers. You can treat it as the timestamp of the event occurring (or more correctly, libev
* finding out about it).
*
* @return double Time of the event loop in (fractional) seconds.
* @return float Time of the event loop in (fractional) seconds.
*/
public function now() {}

Expand All @@ -1356,8 +1356,8 @@ public function nowUpdate() {}
/**
* Creates EvPeriodic object associated with the current event loop instance.
*
* @param double $offset
* @param double $interval
* @param float $offset
* @param float $interval
* @param callable $callback
* @param mixed $data
* @param int $priority
Expand Down Expand Up @@ -1409,7 +1409,7 @@ public final function signal($signal, callable $callback, $data = null, $priorit
* Creates EvStats object associated with the current event loop instance.
*
* @param string $path
* @param double $interval
* @param float $interval
* @param callable $callback
* @param mixed $data
* @param int $priority
Expand All @@ -1434,8 +1434,8 @@ public function suspend() {}
/**
* Creates EvTimer object associated with the current event loop instance.
*
* @param double $after
* @param double $repeat
* @param float $after
* @param float $repeat
* @param callable $callback
* @param mixed $data
* @param int $priority
Expand Down
4 changes: 2 additions & 2 deletions SaxonC/SaxonC.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SaxonProcessor {
public function __construct($license = false, $cwd = '') {}

/**
* Create an Xdm Atomic value from any of the main primitive types (i.e. bool, int, float, double, string)
* Create an Xdm Atomic value from any of the main primitive types (i.e. bool, int, float, string)
*
* @param bool|int|float|string $primitive_type_val
* @return XdmValue
Expand Down Expand Up @@ -1179,7 +1179,7 @@ public function getStringValue() {}
public function getBooleanValue() {}

/**
* Get the value converted to a double using the XPath casting rules. If the value is a string, the XSD 1.1 rules are used, which means that the string "+INF" is recognised
* Get the value converted to a float using the XPath casting rules. If the value is a string, the XSD 1.1 rules are used, which means that the string "+INF" is recognised
*
* @return float
*/
Expand Down
26 changes: 13 additions & 13 deletions cassandra/cassandra.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public function prepareAsync($cql, $options);
/**
* Close the session and all its connections.
*
* @param double $timeout The amount of time in seconds to wait for the session to close.
* @param float $timeout The amount of time in seconds to wait for the session to close.
*
* @return null Nothing.
* @throws \Cassandra\Exception
Expand Down Expand Up @@ -1197,7 +1197,7 @@ interface Future
/**
* Waits for a given future resource to resolve and throws errors if any.
*
* @param int|double|null $timeout A timeout in seconds
* @param int|float|null $timeout A timeout in seconds
*
* @return mixed a value that the future has been resolved with
* @throws \Cassandra\Exception\TimeoutException
Expand Down Expand Up @@ -1985,7 +1985,7 @@ final class Smallint implements Value, Numeric
/**
* Creates a new 16-bit signed integer.
*
* @param int|double|string $value The value as an integer, double or string
* @param int|float|string $value The value as an integer, double or string
*
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-__construct
*/
Expand Down Expand Up @@ -2146,7 +2146,7 @@ final class FuturePreparedStatement implements Future
/**
* Waits for a given future resource to resolve and throws errors if any.
*
* @param int|double|null $timeout A timeout in seconds
* @param int|float|null $timeout A timeout in seconds
*
* @return \Cassandra\PreparedStatement A prepared statement
* @throws \Cassandra\Exception\TimeoutException
Expand Down Expand Up @@ -2412,7 +2412,7 @@ final class FutureRows implements Future
/**
* Waits for a given future resource to resolve and throws errors if any.
*
* @param int|double|null $timeout A timeout in seconds
* @param int|float|null $timeout A timeout in seconds
*
* @return \Cassandra\Rows|null The result set
* @throws \Cassandra\Exception\TimeoutException
Expand Down Expand Up @@ -2890,7 +2890,7 @@ final class FutureSession implements Future
/**
* Waits for a given future resource to resolve and throws errors if any.
*
* @param int|double|null $timeout A timeout in seconds
* @param int|float|null $timeout A timeout in seconds
*
* @return \Cassandra\Session A connected session
* @throws \Cassandra\Exception\TimeoutException
Expand Down Expand Up @@ -3308,7 +3308,7 @@ final class Tinyint implements Value, Numeric
/**
* Creates a new 8-bit signed integer.
*
* @param int|double|string $value The value as an integer, double or string
* @param int|float|string $value The value as an integer, float or string
*
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-__construct
*/
Expand Down Expand Up @@ -3626,7 +3626,7 @@ public function prepareAsync($cql, $options)
/**
* Close the session and all its connections.
*
* @param double $timeout The amount of time in seconds to wait for the session to close.
* @param float $timeout The amount of time in seconds to wait for the session to close.
*
* @return null Nothing.
* @throws \Cassandra\Exception
Expand Down Expand Up @@ -4732,7 +4732,7 @@ final class Float_ implements Value, Numeric
/**
* Creates a new float.
*
* @param double|int|string|\Cassandra\Float_ $value A float value as a string, number or Float
* @param float|int|string|\Cassandra\Float_ $value A float value as a string, number or Float
*
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-__construct
*/
Expand Down Expand Up @@ -4914,9 +4914,9 @@ final class Duration implements Value
{

/**
* @param int|double|string|\Cassandra\Bigint $months Months attribute of the duration.
* @param int|double|string|\Cassandra\Bigint $days Days attribute of the duration.
* @param int|double|string|\Cassandra\Bigint $nanos Nanos attribute of the duration.
* @param int|float|string|\Cassandra\Bigint $months Months attribute of the duration.
* @param int|float|string|\Cassandra\Bigint $days Days attribute of the duration.
* @param int|float|string|\Cassandra\Bigint $nanos Nanos attribute of the duration.
*
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-__construct
*/
Expand Down Expand Up @@ -5896,7 +5896,7 @@ final class FutureClose implements Future
/**
* Waits for a given future resource to resolve and throws errors if any.
*
* @param int|double|null $timeout A timeout in seconds
* @param int|float|null $timeout A timeout in seconds
*
* @return null Nothing
* @throws \Cassandra\Exception\TimeoutException
Expand Down
2 changes: 1 addition & 1 deletion ftp/ftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function ftp_exec ($ftp_stream, $command) {}
* @param string $command <p>
* The command to execute.
* </p>
* @return array the server's response as an array of strings.
* @return string[] the server's response as an array of strings.
* No parsing is performed on the response string, nor does
* <b>ftp_raw</b> determine if the command succeeded.
*/
Expand Down
2 changes: 1 addition & 1 deletion http/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -1869,7 +1869,7 @@ public static function setThrottleDelay ($seconds) {}
* (PECL pecl_http &gt;= 0.10.0)<br/>
* Get throttle delay
* @link https://php.net/manual/en/function.httpresponse-getthrottledelay.php
* @return double a double representing the throttle delay in seconds.
* @return float a float representing the throttle delay in seconds.
*/
public static function getThrottleDelay () {}

Expand Down
2 changes: 1 addition & 1 deletion http/http3.php
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ class Header implements \Serializable {
/**
* The value of the HTTP header.
*
* @var
* @var mixed
*/
public $value = null;
/**
Expand Down
Loading

0 comments on commit a8c609c

Please sign in to comment.