From 2103eb7ccfbb6798e9078d82e0ebffcf87d95b14 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 13 Jan 2020 11:11:04 -0600 Subject: [PATCH] formatting --- .../Foundation/Testing/Constraints/HasInDatabase.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php b/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php index b1b4d3e35a76..c523a0039303 100644 --- a/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php +++ b/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php @@ -77,9 +77,10 @@ protected function getAdditionalInfo($table) { $query = $this->database->table($table); - $key = array_key_first($this->data); - $value = $this->data[$key]; - $similarResults = $query->where($key, $value)->limit($this->show)->get(); + $similarResults = $query->where( + array_key_first($this->data), + $this->data[array_key_first($this->data)] + )->limit($this->show)->get(); if ($similarResults->isNotEmpty()) { $description = 'Found similar results: '.json_encode($similarResults, JSON_PRETTY_PRINT); @@ -89,7 +90,7 @@ protected function getAdditionalInfo($table) $results = $query->limit($this->show)->get(); if ($results->isEmpty()) { - return 'The table is empty'; + return 'The table is empty.'; } $description = 'Found: '.json_encode($results, JSON_PRETTY_PRINT);