8000 Merge pull request #5 from milwad-dev/analysis-32EE4P · milwad-dev/laravel-attributes@1abf130 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1abf130

Browse files
authored
Merge pull request #5 from milwad-dev/analysis-32EE4P
Apply fixes from StyleCI
2 parents e79e369 + 2bfc1d7 commit 1abf130

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

migrations/2022_08_04_155610_create_attributes_table.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
use Illuminate\Database\Schema\Blueprint;
55
use Illuminate\Support\Facades\Schema;
66

7-
return new class extends Migration
8-
{
7+
return new class() extends Migration {
98
/**
109
* Run the migrations.
1110
*

src/Traits/Attributable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trait Attributable
1313
use HasRelationships;
1414

1515
/**
16-
* Get attributes
16+
* Get attributes.
1717
*
1818
* @return MorphMany
1919
*/
@@ -30,10 +30,10 @@ public function attributes()
3030
public function attachAttribute(string $title, string $value)
3131
{
3232
$attributes = [
33-
'title' => $title,
34-
'value' => $value,
33+
'title' => $title,
34+
'value' => $value,
3535
'attributable_id' => $this->getKey(),
36-
'attributable' => get_class($this),
36+
'attributable' => get_class($this),
3737
];
3838

3939
return Attribute::query()->create($attributes);

0 commit comments

Comments
 (0)
0