Skip to content

Commit

Permalink
Update DecimalFieldTypeSchema.php
Browse files Browse the repository at this point in the history
Replace str_contains with helper
  • Loading branch information
fryiee authored Jun 22, 2020
1 parent 65b4cdf commit 7e974e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DecimalFieldTypeSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Anomaly\Streams\Platform\Addon\FieldType\FieldTypeSchema;
use Anomaly\Streams\Platform\Assignment\Contract\AssignmentInterface;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Str;
use Illuminate\Support\Fluent;

/**
Expand Down Expand Up @@ -38,7 +39,7 @@ public function addColumn(Blueprint $table, AssignmentInterface $assignment)
array_get($this->fieldType->getConfig(), 'decimals', 2)
)->nullable(!$assignment->isTranslatable() ? !$assignment->isRequired() : true);

if (!str_contains($this->fieldType->getColumnType(), ['text', 'blob'])) {
if (!Str::contains($this->fieldType->getColumnType(), ['text', 'blob'])) {
$column->default(array_get($this->fieldType->getConfig(), 'default_value'));
}

Expand Down

0 comments on commit 7e974e2

Please sign in to comment.