diff --git a/src/Files.php b/src/Files.php index ca95fef..88404fc 100644 --- a/src/Files.php +++ b/src/Files.php @@ -33,7 +33,7 @@ class Files * @return bool * @throws DtAppException */ - public function delete(string $name) + public function delete($name) { if (empty($name)) throw new DtAppException('请检查需要删除文件夹的名称'); if (file_exists($name)) if (unlink($name)) return true; @@ -46,7 +46,7 @@ class Files * @return bool * @throws DtAppException */ - public function deletes(string $name) + public function deletes($name) { if (empty($name)) throw new DtAppException('请检查需要删除文件夹的名称'); //先删除目录下的文件: @@ -78,7 +78,7 @@ class Files * @return bool * @throws DtAppException */ - public function folderZip(string $name, string $suffix_name = '.png', string $file_name = '*') + public function folderZip($name, $suffix_name = '.png', $file_name = '*') { if (empty($name)) throw new DtAppException('请检查需要打包的路径名称'); try { diff --git a/src/Random.php b/src/Random.php index 4a70254..67cd96c 100644 --- a/src/Random.php +++ b/src/Random.php @@ -30,7 +30,7 @@ class Random * @param int $type 类型,1 纯数字,2 纯小写字母,3 纯大写字母,4 数字和小写字母,5 数字和大写字母,6 大小写字母,7 数字和大小写字母 * @return false|string */ - public function generate(int $length = 6, int $type = 1) + public function generate($length = 6, $type = 1) { // 取字符集数组 $number = range(0, 9); diff --git a/src/Time.php b/src/Time.php index a09ec4f..9049336 100644 --- a/src/Time.php +++ b/src/Time.php @@ -29,7 +29,7 @@ class Time * @param string $format 格式 * @return false|string */ - public function getData(string $format = "Y-m-d H:i:s") + public function getData($format = "Y-m-d H:i:s") { date_default_timezone_set('Asia/Shanghai'); return date($format, time()); @@ -63,7 +63,7 @@ class Time * @param string $start_time 开始时间 * @return false|int */ - public function getTimeDifference(string $end_time, string $start_time) + public function getTimeDifference($end_time, $start_time) { date_default_timezone_set('Asia/Shanghai'); $end_time = strtotime($end_time); @@ -76,7 +76,7 @@ class Time * @param string $date * @return false|int */ - public function dateToTimestamp(string $date) + public function dateToTimestamp($date) { date_default_timezone_set('Asia/Shanghai'); return strtotime($date); @@ -88,7 +88,7 @@ class Time * @param int $mun 多少分钟 * @return false|string */ - public function dateRear(string $format = "Y-m-d H:i:s", int $mun = 10) + public function dateRear($format = "Y-m-d H:i:s", $mun = 10) { date_default_timezone_set('Asia/Shanghai'); return date($format, strtotime(self::getData()) + $mun); @@ -100,7 +100,7 @@ class Time * @param int $mun 多少分钟 * @return false|string */ - public function dateBefore(string $format = "Y-m-d H:i:s", int $mun = 10) + public function dateBefore($format = "Y-m-d H:i:s", $mun = 10) { date_default_timezone_set('Asia/Shanghai'); return date($format, strtotime(self::getData()) - $mun); @@ -113,7 +113,7 @@ class Time * @param string $end 结束时间 * @return bool true:在范围内,false:没在范围内 */ - public function checkIsBetweenTime(string $start, string $end) + public function checkIsBetweenTime($start, $end) { date_default_timezone_set('Asia/Shanghai'); $date = date('H:i');