Skip to content
Permalink
Browse files

formatting

  • Loading branch information
taylorotwell committed Jan 13, 2020
1 parent f58e4e1 commit 2103eb7ccfbb6798e9078d82e0ebffcf87d95b14
Showing with 5 additions and 4 deletions.
  1. +5 −4 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);

0 comments on commit 2103eb7

Please sign in to comment.
You can’t perform that action at this time.