Skip to content

Commit 57dc870

Browse files
committed
fix(saveObjects-error-msg): fix PR
1 parent 53bbe87 commit 57dc870

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Exceptions/InvalidArgumentObjectsException.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
namespace Algolia\AlgoliaSearch\Exceptions;
44

5+
use Throwable;
6+
57
final class InvalidArgumentObjectsException extends AlgoliaException
68
{
9+
/**
10+
* InvalidArgumentObjectsException constructor.
11+
*
12+
* @param string $message The Exception message to throw
13+
* @param int $code The Exception code
14+
* @param Throwable $previous The previous throwable used for the exception chaining
15+
*/
716
public function __construct($message = '', $code = 0, $previous = null)
817
{
9-
if (!$message) {
18+
if ('' === $message) {
1019
$message = 'Please provide an array of objects instead of a single object.';
1120
}
1221

src/Support/Helpers.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,6 @@ public static function mapObjectIDs($objectIDKey, $objects)
136136
*/
137137
public static function isIterable($object)
138138
{
139-
return is_array($object) || is_object($object) || $object instanceof \Traversable;
139+
return is_array($object) || $object instanceof \Traversable;
140140
}
141141
}

0 commit comments

Comments
 (0)