From 5c6f846ebe4a82648feacab84b7d6de6892f3db7 Mon Sep 17 00:00:00 2001 From: giorgiolino Date: Thu, 21 May 2020 10:11:56 +0200 Subject: [PATCH 1/2] Fix BadMethod name in README The `getclass($data)` call should be rewritten to `get_class($data)` (cf. https://www.php.net/get-class) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d46e7f6..5d8f5dc 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ class Model return iterator_to_array($data); } - throw new InvalidArgumentException(sprintf('Expected array, Traversable or KeyValueContainer, got "%s"', is_object($data) ? getclass($data) : get_type($data))); + throw new InvalidArgumentException(sprintf('Expected array, Traversable or KeyValueContainer, got "%s"', is_object($data) ? get_class($data) : get_type($data))); } } ``` From d14cbeefad98aa8ea9462501adbe8c2cee49bfe5 Mon Sep 17 00:00:00 2001 From: giorgiolino Date: Thu, 21 May 2020 10:22:57 +0200 Subject: [PATCH 2/2] Fix bad method name `get_type` in README The `get_type($data)` call should be rewritten to `gettype($data)` (cf. https://www.php.net/gettype) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d8f5dc..684218f 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ class Model return iterator_to_array($data); } - throw new InvalidArgumentException(sprintf('Expected array, Traversable or KeyValueContainer, got "%s"', is_object($data) ? get_class($data) : get_type($data))); + throw new InvalidArgumentException(sprintf('Expected array, Traversable or KeyValueContainer, got "%s"', is_object($data) ? get_class($data) : gettype($data))); } } ```