]> git.agnieray.net Git - galette.git/blobdiff - galette/lib/Galette/Core/Pagination.php
Improve coding standards
[galette.git] / galette / lib / Galette / Core / Pagination.php
index 40bc8dac4e7a16e964bd97f8e8e3416d7e6498ed..e58edeae6fa1c521348ebc2bde7fb0f0e5606731 100644 (file)
@@ -366,17 +366,19 @@ abstract class Pagination
      *
      * @return mixed the called property
      */
-    public function __get(string $name)
+    public function __get(string $name): mixed
     {
         if (in_array($name, $this->pagination_fields)) {
             return $this->$name;
-        } else {
-            Analog::log(
-                '[' . get_class($this) .
-                '|Pagination] Unable to get property `' . $name . '`',
-                Analog::WARNING
-            );
         }
+
+        throw new \RuntimeException(
+            sprintf(
+                'Unable to get property "%s::%s"!',
+                __CLASS__,
+                $name
+            )
+        );
     }
 
     /**
@@ -403,7 +405,7 @@ abstract class Pagination
      *
      * @return void
      */
-    public function __set(string $name, $value): void
+    public function __set(string $name, mixed $value): void
     {
         switch ($name) {
             case 'ordered':