chore: Аннотации к типам
This commit is contained in:
parent
704e4e0bd5
commit
8588173079
9 changed files with 80 additions and 27 deletions
|
|
@ -19,8 +19,12 @@ class right {
|
|||
$this->params = $params;
|
||||
}
|
||||
|
||||
function apply() {
|
||||
$params = func_get_args();
|
||||
/**
|
||||
* Применение функции
|
||||
* @param mixed ...$params
|
||||
* @return mixed
|
||||
*/
|
||||
function apply(...$params) {
|
||||
array_splice($params, count($params), 0, $this->params);
|
||||
return call_user_func_array($this->fn, $params);
|
||||
}
|
||||
|
|
@ -40,8 +44,12 @@ class left {
|
|||
$this->params = $params;
|
||||
}
|
||||
|
||||
function apply() {
|
||||
$params = func_get_args();
|
||||
/**
|
||||
* Применение функции
|
||||
* @param mixed ...$params
|
||||
* @return mixed
|
||||
*/
|
||||
function apply(...$params) {
|
||||
array_splice ($params, 0, 0, $this->params);
|
||||
return call_user_func_array ($this->fn, $params);
|
||||
}
|
||||
|
|
@ -171,7 +179,7 @@ class Functions {
|
|||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param array $value
|
||||
* @param array<string, mixed> $value
|
||||
* @param string $name
|
||||
*
|
||||
* @return mixed
|
||||
|
|
@ -182,6 +190,9 @@ class Functions {
|
|||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
static function identity($value) {
|
||||
return $value;
|
||||
|
|
@ -191,7 +202,7 @@ class Functions {
|
|||
* @deprecated use fn and <=> operator
|
||||
* @param array $a
|
||||
* @param array $b
|
||||
* @param $key
|
||||
* @param string|int $key
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
|
|
@ -206,7 +217,7 @@ class Functions {
|
|||
* @deprecated use fn and <=> operator
|
||||
* @param array $a
|
||||
* @param array $b
|
||||
* @param $key
|
||||
* @param string|int $key
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue