Skip to content

Commit

Permalink
Merge pull request #2 from hans-thomas/analysis-b0koBM
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
hans-thomas authored Aug 30, 2023
2 parents 994109b + ab81f36 commit f69f7f4
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions src/Models/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,47 @@

namespace Hans\Lyra\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Collection;

/**
* @property int $id
* @property int $number
* @property int $token
* @property int $transaction_id
* @property Collection $items
*/
class Invoice extends Model
{
/**
* @property int $id
* @property int $number
* @property int $token
* @property int $transaction_id
* @property Collection $items
* The attributes that are mass assignable.
*
* @var array<string>
*/
class Invoice extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array<string>
*/
protected $fillable = [
'number',
'token',
'transaction_id',
];
protected $fillable = [
'number',
'token',
'transaction_id',
];

/**
* Perform any actions required after the model boots.
*
* @return void
*/
protected static function booted()
{
self::creating(fn (self $model) => $model->number = generate_unique_invoice_number());
}
/**
* Perform any actions required after the model boots.
*
* @return void
*/
protected static function booted()
{
self::creating(fn (self $model) => $model->number = generate_unique_invoice_number());
}

/**
* Relationship's definition with Invoicable.
*
* @return HasMany
*/
public function items(): HasMany
{
return $this->hasMany(Invoicable::class)->latest();
}
/**
* Relationship's definition with Invoicable.
*
* @return HasMany
*/
public function items(): HasMany
{
return $this->hasMany(Invoicable::class)->latest();
}
}

0 comments on commit f69f7f4

Please sign in to comment.