chore: Типы
This commit is contained in:
parent
b782af55a5
commit
fbe5eb878e
4 changed files with 9 additions and 6 deletions
|
|
@ -187,8 +187,11 @@ class Login extends Filter
|
||||||
}
|
}
|
||||||
} else if (isset($_SERVER['HTTP_REFERER'])) {
|
} else if (isset($_SERVER['HTTP_REFERER'])) {
|
||||||
$arr = [];
|
$arr = [];
|
||||||
parse_str(parse_url($_SERVER['HTTP_REFERER'] ?? '', PHP_URL_QUERY) ?? '', $arr);
|
parse_str(parse_url($_SERVER['HTTP_REFERER'] ?? '', PHP_URL_QUERY) ?: '', $arr);
|
||||||
if (isset($arr['back_page']) && $request->getString('mode') != 'ajax') {
|
if (isset($arr['back_page'])
|
||||||
|
&& is_string($arr['back_page'])
|
||||||
|
&& $request->getString('mode') != 'ajax')
|
||||||
|
{
|
||||||
$request->redirect($arr['back_page']);
|
$request->redirect($arr['back_page']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ namespace ctiso\Form;
|
||||||
use ctiso\Form\Field;
|
use ctiso\Form\Field;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @phpstan-type Option = array{value: string, name: string, selected: bool, class?: string|false}
|
* @phpstan-type Option = array{value: string, name: string, selected?: bool, class?: string|false}
|
||||||
*/
|
*/
|
||||||
class Select extends Field
|
class Select extends Field
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ class Functions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param list<object>|\ArrayIterator<int, object> $array
|
* @param array<object>|\ArrayIterator<int, object> $array
|
||||||
* @return array<mixed>
|
* @return array<mixed>
|
||||||
*/
|
*/
|
||||||
static function key_values_object($key, $array) {
|
static function key_values_object($key, $array) {
|
||||||
|
|
@ -283,7 +283,7 @@ class Functions {
|
||||||
/**
|
/**
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param string $value
|
* @param string $value
|
||||||
* @param list<array<string, mixed>>|\ArrayIterator<int, array> $array
|
* @param array<array<string, mixed>>|\ArrayIterator<int, array> $array
|
||||||
* @return array<string, mixed>
|
* @return array<string, mixed>
|
||||||
*/
|
*/
|
||||||
static function assoc_key_values($key, $value, $array) {
|
static function assoc_key_values($key, $value, $array) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ use Exception,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @phpstan-type Rule array{
|
* @phpstan-type Rule array{
|
||||||
* validate:string, // Описание правила см. формат правила ниже
|
* validate?:string, // Описание правила см. формат правила ниже
|
||||||
* name:string, // Имя переменой для проверки
|
* name:string, // Имя переменой для проверки
|
||||||
* context?:object
|
* context?:object
|
||||||
* }
|
* }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue