Skip to content

Commit

Permalink
Apply fixes from StyleCI (#19336)
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed May 24, 2017
1 parent d68c4b6 commit a3cdb2b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Expand Up @@ -236,7 +236,7 @@ protected function formatAttachRecords($ids, array $attributes)
// To create the attachment records, we will simply spin through the IDs given
// and create a new record to insert for each ID. Each ID may actually be a
// key in the array, with extra attributes to be placed in other columns.
$attributes = $this->using
$attributes = $this->using
? $this->newPivot()->forceFill($attributes)->getAttributes()
: $attributes;

Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/Database/EloquentCustomPivotCastTest.php
@@ -1,10 +1,8 @@
<?php

use Faker\Generator;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factory;

/**
* @group integration
Expand Down Expand Up @@ -45,7 +43,6 @@ public function setUp()
});
}


public function test_casts_are_respected_on_attach()
{
$user = CustomPivotCastTestUser::forceCreate([
Expand All @@ -62,7 +59,6 @@ public function test_casts_are_respected_on_attach()
$this->assertEquals(['foo' => 'bar'], $project->collaborators[0]->pivot->permissions);
}


public function test_casts_are_respected_on_sync()
{
$user = CustomPivotCastTestUser::forceCreate([
Expand All @@ -86,7 +82,6 @@ class CustomPivotCastTestUser extends Model
public $timestamps = false;
}


class CustomPivotCastTestProject extends Model
{
public $table = 'projects';
Expand All @@ -100,7 +95,6 @@ public function collaborators()
}
}


class CustomPivotCastTestCollaborator extends Illuminate\Database\Eloquent\Relations\Pivot
{
protected $casts = [
Expand Down

0 comments on commit a3cdb2b

Please sign in to comment.