for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ByTIC\DocumentGenerator\PdfLetters\Models\Stats;
use ByTIC\DocumentGenerator\Tests\Fixtures\Models\PdfLetters\PdfLetter;
use Nip\Records\AbstractModels\Record;
use Nip\Records\Traits\AbstractTrait\RecordsTrait as AbstractRecordsTrait;
/**
* Class StatsTrait
* @package ByTIC\DocumentGenerator\PdfLetters\Models\Stats
*
* @method StatTrait getNew
*/
trait StatsTrait
{
use AbstractRecordsTrait;
* @param PdfLetter|Record $letter
public function compileForLetter($letter)
$letter
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function compileForLetter(/** @scrutinizer ignore-unused */ $letter)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
}
* @param $letter
* @param $related
* @param $value
* @return StatTrait
public function create($letter, $related, $value)
$stat = $this->getNew();
$stat->populateFromLetter($letter);
$stat->populateFromRelated($related);
$stat->value = $value;
$stat->insert();
insert()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$stat->/** @scrutinizer ignore-call */
insert();
return $stat;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.