Skip to content

Commit b9f3da1

Browse files
committed
Update for PHP 8
1 parent 7be2553 commit b9f3da1

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
}
1414
],
1515
"require": {
16-
"php": "^7.2",
17-
"illuminate/support": "^5.0|^6.0|^7.0|^8.0"
16+
"php": "^7.2 | ^8.0",
17+
"illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0"
1818
},
1919
"require-dev": {
2020
"mockery/mockery": "^1.3.1",
21-
"codeclimate/php-test-reporter": "dev-master"
21+
"phpunit/phpunit": "^9.5"
2222
},
2323
"autoload": {
2424
"psr-4": {

src/Models/Term.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ class Term extends \Eloquent
1616

1717
public function termRelation()
1818
{
19-
return $this->morphMany('Trexology\Taxonomy\Models\TermRelation', 'relationable');
19+
return $this->morphMany(TermRelation::class, 'relationable');
2020
}
2121

2222
public function vocabulary()
2323
{
24-
return $this->belongsTo('Trexology\Taxonomy\Models\Vocabulary');
24+
return $this->belongsTo(Vocabulary::class);
2525
}
2626

2727
public function childrens()
2828
{
29-
return $this->hasMany('Trexology\Taxonomy\Models\Term', 'parent', 'id')
29+
return $this->hasMany(Term::class, 'parent', 'id')
3030
->orderBy('weight', 'ASC');
3131
}
3232

3333
public function parentTerm()
3434
{
35-
return $this->hasOne('Trexology\Taxonomy\Models\Term', 'id', 'parent');
35+
return $this->hasOne(Term::class, 'id', 'parent');
3636
}
3737
}

src/Models/TermRelation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public function relationable()
1818

1919
public function term()
2020
{
21-
return $this->belongsTo('Trexology\Taxonomy\Models\Term');
21+
return $this->belongsTo(Term::class);
2222
}
2323
}

src/Models/Vocabulary.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ class Vocabulary extends \Eloquent
1616

1717
public function terms()
1818
{
19-
return $this->HasMany('Trexology\Taxonomy\Models\Term');
19+
return $this->HasMany(Term::class);
2020
}
2121

2222
public function relations()
2323
{
24-
return $this->HasMany('Trexology\Taxonomy\Models\TermRelation');
24+
return $this->HasMany(TermRelation::class);
2525
}
2626
}

0 commit comments

Comments
 (0)