浏览代码

Update typehints.

ADmad 6 年之前
父节点
当前提交
f980960d25
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/Validation/Validation.php
  2. 1 1
      src/View/Helper/IdGeneratorTrait.php

+ 1 - 1
src/Validation/Validation.php

@@ -525,7 +525,7 @@ class Validation
      * @return bool True if the value is valid, false otherwise
      * @see Regex credits: https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/
      */
-    public static function iso8601($check)
+    public static function iso8601($check): bool
     {
         if ($check instanceof DateTimeInterface) {
             return true;

+ 1 - 1
src/View/Helper/IdGeneratorTrait.php

@@ -73,7 +73,7 @@ trait IdGeneratorTrait
      * @param string $val The ID attribute value.
      * @return string Generated id suffix.
      */
-    protected function _idSuffix($val)
+    protected function _idSuffix(string $val): string
     {
         $idSuffix = mb_strtolower(str_replace(['/', '@', '<', '>', ' ', '"', '\''], '-', $val));
         $count = 1;