chore: Проверки к типам
This commit is contained in:
parent
5d3fae4249
commit
8786e84568
12 changed files with 41 additions and 47 deletions
|
|
@ -120,9 +120,9 @@ class Path
|
|||
* Преобразует строку пути в массив
|
||||
*
|
||||
* @param string $path Путь
|
||||
* @return array<string>
|
||||
* @return list<string>|false
|
||||
*/
|
||||
public static function listFromString(string $path): array
|
||||
public static function listFromString(string $path): array|false
|
||||
{
|
||||
$list = preg_split('#\\\\|/#s', $path);
|
||||
return $list;
|
||||
|
|
@ -182,7 +182,7 @@ class Path
|
|||
. $path['host']
|
||||
. (isset($path['port']) ? ':' . $path['port'] : '')) : '')
|
||||
. $slash
|
||||
. $path['path']
|
||||
. ($path['path'] ?? '')
|
||||
. (isset($path['query']) ? '?' . $path['query'] : '')
|
||||
. (isset($path['fragment']) ? '#' . $path['fragment'] : '');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue