for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Orkhanahmadov\LaravelCurrencylayer\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Currency extends Model
{
protected $table = 'currencylayer_currencies';
public $timestamps = false;
protected $fillable = [
'name',
'code',
];
public function rates(): HasMany
return $this->hasMany(Rate::class, 'source_currency_id');
}
public function rate(Currency $target, $date = null)
$date
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function rate(Currency $target, /** @scrutinizer ignore-unused */ $date = null)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return $this->targetRates()->where('target_currency_id', $target->id)->orderByDesc('rate_for')->first();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.