Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/helper.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php

Check warning on line 1 in src/helper.php

View workflow job for this annotation

GitHub Actions / php-cs-fixer

Found violation(s) of type: explicit_indirect_variable

Check warning on line 1 in src/helper.php

View workflow job for this annotation

GitHub Actions / php-cs-fixer

Found violation(s) of type: single_line_comment_spacing

Check warning on line 1 in src/helper.php

View workflow job for this annotation

GitHub Actions / php-cs-fixer

Found violation(s) of type: blank_line_after_opening_tag

Check warning on line 1 in src/helper.php

View workflow job for this annotation

GitHub Actions / php-cs-fixer

Found violation(s) of type: phpdoc_no_empty_return

Check warning on line 1 in src/helper.php

View workflow job for this annotation

GitHub Actions / php-cs-fixer

Found violation(s) of type: no_superfluous_phpdoc_tags

Check warning on line 1 in src/helper.php

View workflow job for this annotation

GitHub Actions / php-cs-fixer

Found violation(s) of type: fully_qualified_strict_types

Check warning on line 1 in src/helper.php

View workflow job for this annotation

GitHub Actions / php-cs-fixer

Found violation(s) of type: phpdoc_no_access

Check warning on line 1 in src/helper.php

View workflow job for this annotation

GitHub Actions / php-cs-fixer

Found violation(s) of type: string_implicit_backslashes

Check warning on line 1 in src/helper.php

View workflow job for this annotation

GitHub Actions / php-cs-fixer

Found violation(s) of type: no_useless_else

Check warning on line 1 in src/helper.php

View workflow job for this annotation

GitHub Actions / php-cs-fixer

Found violation(s) of type: no_superfluous_elseif
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
Expand Down Expand Up @@ -208,8 +208,8 @@
/**
* 获取环境变量值
* @access public
* @param string $name 环境变量名(支持二级 .号分割)
* @param string $default 默认值
* @param ?string $name 环境变量名(支持二级 .号分割)
* @param mixed $default 默认值
* @return mixed
*/
function env(?string $name = null, $default = null)
Expand Down
6 changes: 3 additions & 3 deletions src/think/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public function load(string $file): void
/**
* 获取环境变量值
* @access public
* @param string $name 环境变量名
* @param mixed $default 默认值
* @param ?string $name 环境变量名
* @param mixed $default 默认值
* @return mixed
*/
public function get(?string $name = null, $default = null)
public function get(?string $name = null, mixed $default = null)
{
if (is_null($name)) {
return $this->data;
Expand Down
Loading