Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Mar 27, 2022
1 parent eb7245f commit 8b5ed97
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Testing/Eloquent/InteractsWithCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ trait InteractsWithCast
*/
public function cast(string $cast, string $attribute = 'test'): PendingTestCast
{
$model = new class() extends Model {
$model = new class() extends Model
{
protected $table = 'cast_tests';
public $timestamps = false;
};
Expand Down
6 changes: 3 additions & 3 deletions src/Testing/Eloquent/PendingTestCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Traits\ForwardsCalls;
use PHPUnit\Framework\Assert as PHPUnit;
use function is_array;
use PHPUnit\Framework\Assert as PHPUnit;

class PendingTestCast
{
Expand Down Expand Up @@ -46,7 +46,7 @@ public function assertCastTo(mixed $incoming, mixed $expected): static
{
$clone = (clone $this->model)->setAttribute($this->attribute, $incoming);

if (!is_array($expected)) {
if (! is_array($expected)) {
$expected = [$this->attribute => $expected];
}

Expand All @@ -72,7 +72,7 @@ public function assertCastToRaw(mixed $incoming, mixed $expected): static
{
$clone = (clone $this->model)->setAttribute($this->attribute, $incoming);

if (!is_array($expected)) {
if (! is_array($expected)) {
$expected = [$this->attribute => $expected];
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Testing/Eloquent/InteractsWithCastTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function test_with_raw_attributes(): void
'test' => 'BAR',
'test_foo' => false,
'test_bar' => true,
'test_baz' => 'baz'
'test_baz' => 'baz',
]);
}
}
Expand Down

0 comments on commit 8b5ed97

Please sign in to comment.