Răsfoiți Sursa

revert scalar type hints to retain support for PHP < 7.0

El RIDO 7 ani în urmă
părinte
comite
f58cbefd1e
2 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 2 2
      lib/Model/AbstractModel.php
  2. 1 1
      lib/Model/Paste.php

+ 2 - 2
lib/Model/AbstractModel.php

@@ -86,7 +86,7 @@ abstract class AbstractModel
      * @param string $id
      * @throws Exception
      */
-    public function setId(string $id)
+    public function setId($id)
     {
         if (!self::isValidId($id)) {
             throw new Exception('Invalid paste ID.', 60);
@@ -154,7 +154,7 @@ abstract class AbstractModel
      * @param  string $id
      * @return bool
      */
-    public static function isValidId(string $id)
+    public static function isValidId($id)
     {
         return (bool) preg_match('#\A[a-f\d]{16}\z#', (string) $id);
     }

+ 1 - 1
lib/Model/Paste.php

@@ -136,7 +136,7 @@ class Paste extends AbstractModel
      * @throws Exception
      * @return Comment
      */
-    public function getComment(string $parentId, string $commentId = '')
+    public function getComment($parentId, $commentId = '')
     {
         if (!$this->exists()) {
             throw new Exception('Invalid data.', 62);