Skip to content

Commit

Permalink
Add missing return statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
jstoone committed Jan 10, 2021
1 parent bca8a21 commit 01e0554
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ray.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function showQueries($callable = null): self

public function queries($callable = null): self
{
$this->showQueries($callable);
return $this->showQueries($callable);
}

public function stopShowingQueries(): self
Expand Down
10 changes: 10 additions & 0 deletions tests/RayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ public function it_can_start_logging_queries()
$this->assertCount(1, $this->client->sentPayloads());
}

/** @test */
public function it_can_start_logging_queries_using_alias()
{
ray()->queries();

DB::table('users')->get('id');

$this->assertCount(1, $this->client->sentPayloads());
}

/** @test */
public function it_can_stop_logging_queries()
{
Expand Down

0 comments on commit 01e0554

Please sign in to comment.