for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace VGirol\JsonApiFaker\Factory;
use VGirol\JsonApiFaker\Factory\JsonapiFactory;
/**
* Add "jsonapi" member to a factory.
*/
trait HasJsonapi
{
* The jsonapi object
*
* @var JsonapiFactory
public $jsonapi;
* Sets the jsonapi object.
* @param JsonapiFactory $jsonapi
* @return static
public function setJsonapi($jsonapi)
$this->jsonapi = $jsonapi;
return $this;
}
* Fill the "jsonapi" object with fake members and values.
* @param integer $countMeta The number of meta members to generate.
public function fakeJsonapi(int $countMeta = 5)
$countMeta
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function fakeJsonapi(/** @scrutinizer ignore-unused */ int $countMeta = 5)
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->setJsonapi((new JsonapiFactory)->fake());
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.