for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace AbterPhp\Admin\Http\Controllers;
use Opulence\Http\Requests\UploadedFile;
trait ApiDataTrait
{
protected string $problemBaseUrl;
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*
* @param array $data
* @return UploadedFile[]
*/
protected function getFileData(array $data): array
$data
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
protected function getFileData(/** @scrutinizer ignore-unused */ array $data): array
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return [];
}
* @return array
public function getCreateData(): array
return $this->getSharedData();
public function getUpdateData(): array
public function getSharedData(): array
// @phan-suppress-next-line PhanUndeclaredProperty
return $this->request->getJsonBody();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.