for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Fomvasss\Variable\Models;
use Illuminate\Database\Eloquent\Model;
class Variable extends Model
{
public $table = 'variables';
public $timestamps = false;
public $guarded = ['id'];
public function __construct(array $attributes = [])
parent::__construct($attributes);
$this->setTable(config('variables.table_name'));
config
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$this->setTable(/** @scrutinizer ignore-call */ config('variables.table_name'));
}
protected static function booted()
static::saved(function ($model) {
$model
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
static::saved(function (/** @scrutinizer ignore-unused */ $model) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
if (config('variables.cache.autoclear')) {
if (/** @scrutinizer ignore-call */ config('variables.cache.autoclear')) {
app(\Fomvasss\Variable\VariableManagerContract::class)->cacheClear();
app
/** @scrutinizer ignore-call */
});
public function byLangcode($query, ?string $langcode = null)
return $query->when($langcode, function ($q) use ($langcode) {
$q->where('langcode', $langcode);