Skip to content

Commit

Permalink
StyleCI Issues Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
alnahian2003 committed May 11, 2024
1 parent f2ddb0d commit 6076194
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Illuminate/Database/Concerns/BuildsQueries.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\MultipleRecordsFoundException;
use Illuminate\Database\Query\Expression;
use Illuminate\Database\RecordsNotFoundException;
use Illuminate\Database\RecordNotFoundException;
use Illuminate\Database\RecordsNotFoundException;
use Illuminate\Pagination\Cursor;
use Illuminate\Pagination\CursorPaginator;
use Illuminate\Pagination\LengthAwarePaginator;
Expand Down Expand Up @@ -336,7 +336,7 @@ public function first($columns = ['*'])
return $this->take(1)->get($columns)->first();
}

/**
/**
* Execute the query and get the first result or throw an exception.
*
* @param array|string $columns
Expand All @@ -349,7 +349,7 @@ public function firstOrFail($columns = ['*'], $message = null)
return $result;
}

throw new RecordNotFoundException($message ?: "No record found for the given query.");
throw new RecordNotFoundException($message ?: 'No record found for the given query.');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Database/DatabaseQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2778,7 +2778,7 @@ public function testFirstOrFailMethodThrowsRecordNotFoundException()
$builder->getProcessor()->shouldReceive('processSelect')->once()->with($builder, [])->andReturn([]);

$this->expectException(RecordNotFoundException::class);
$this->expectExceptionMessage("No record found for the given query.");
$this->expectExceptionMessage('No record found for the given query.');

$builder->from('users')->where('id', '=', 1)->firstOrFail();
}
Expand Down

0 comments on commit 6076194

Please sign in to comment.