diff --git a/src/LaraCart.php b/src/LaraCart.php index ea4b203..144f108 100644 --- a/src/LaraCart.php +++ b/src/LaraCart.php @@ -327,14 +327,14 @@ public function find($data) } } - switch(count($matches)) { - case 0 : - return null; + switch (count($matches)) { + case 0: + return; break; case 1: return $matches[0]; break; - default : + default: return $matches; } } diff --git a/tests/ItemsTest.php b/tests/ItemsTest.php index 59bdcad..4b92eb6 100644 --- a/tests/ItemsTest.php +++ b/tests/ItemsTest.php @@ -411,7 +411,7 @@ public function testfindItemById() $item->id = 123; $this->assertEquals($item, $this->laracart->find([ - 'id' => 123 + 'id' => 123, ])); } }