Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #19336

Merged
merged 1 commit into from
May 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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