for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TestMonitor\DoneDone\Actions;
use TestMonitor\DoneDone\Resources\Project;
use TestMonitor\DoneDone\Transforms\TransformsProjects;
trait ManagesProjects
{
use TransformsProjects;
/**
* Get a list of of projects.
*
* @param int $accountId
* @return Project[]
*/
public function projects(int $accountId): array
$result = $this->get("{$accountId}/internal-projects");
get()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
/** @scrutinizer ignore-call */
return array_map(function ($project) {
return $this->fromDoneDoneProject($project);
}, is_array($result) ? $result : []);
}
* Get a single project.
* @param int $id
* @return Project
public function project(int $accountId, int $id): Project
$result = $this->get("{$accountId}/internal-projects/{$id}");
return $this->fromDoneDoneProject($result);