Skip to content

Commit

Permalink
Update str helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyWay committed Sep 7, 2019
1 parent 39efbef commit 684b0bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Builder.php
Expand Up @@ -3,6 +3,7 @@
namespace Laracasts\TestDummy;

use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Faker\Factory as Faker;
use Closure;

Expand Down Expand Up @@ -167,7 +168,7 @@ protected function getAttributes($name, array $attributes)
protected function filterRelationshipAttributes(array $attributes)
{
return filter_array_keys($attributes, function ($key) {
return ! \Illuminate\Support\Str::contains($key, '.');
return ! Str::contains($key, '.');
});
}

Expand Down Expand Up @@ -332,7 +333,7 @@ protected function fetchRelationId($factoryName, $relationshipName, array $attri
protected function extractRelationshipAttributes($columnName, array $attributes)
{
$attributes = filter_array_keys($attributes, function ($key) use ($columnName) {
return starts_with($key, $columnName . '.');
return Str::startsWith($key, $columnName . '.');
});

$extractedAttributes = [];
Expand Down

0 comments on commit 684b0bf

Please sign in to comment.