move inline use statements to file headers
two type hints introduced earlier on this branch referenced classes by their fully-qualified names inline. hoist them to the top-of-file use block per backend-context.md PHP rules.
This commit is contained in:
parent
3a1e91cc4f
commit
db93871194
2 changed files with 4 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ use App\ScheduledNode\UseCases\GetTodaysSchedule;
|
||||||
use App\ScheduledNode\UseCases\GetTodaysScheduleRequest;
|
use App\ScheduledNode\UseCases\GetTodaysScheduleRequest;
|
||||||
use App\Text\Text;
|
use App\Text\Text;
|
||||||
use App\User\UseCases\CreateUserDto;
|
use App\User\UseCases\CreateUserDto;
|
||||||
|
use App\User\User;
|
||||||
use App\ValueObjects\EmailAddress;
|
use App\ValueObjects\EmailAddress;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use DomainException;
|
use DomainException;
|
||||||
|
|
@ -29,7 +30,7 @@ class GetTodaysScheduleTest extends TestCase
|
||||||
|
|
||||||
private GetTodaysSchedule $useCase;
|
private GetTodaysSchedule $useCase;
|
||||||
|
|
||||||
private \App\User\User $user;
|
private User $user;
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ use App\User\UseCases\CreateUserDto;
|
||||||
use App\User\User;
|
use App\User\User;
|
||||||
use App\ValueObjects\EmailAddress;
|
use App\ValueObjects\EmailAddress;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
use Slim\Psr7\Factory\ServerRequestFactory;
|
use Slim\Psr7\Factory\ServerRequestFactory;
|
||||||
use Slim\Psr7\Response;
|
use Slim\Psr7\Response;
|
||||||
use Tests\Fakes\FakeNodeRepository;
|
use Tests\Fakes\FakeNodeRepository;
|
||||||
|
|
@ -55,7 +56,7 @@ class TextControllerTest extends TestCase
|
||||||
$this->controller = new TextController($this->textRepo);
|
$this->controller = new TextController($this->textRepo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function makeRequest(?User $user): \Psr\Http\Message\ServerRequestInterface
|
private function makeRequest(?User $user): ServerRequestInterface
|
||||||
{
|
{
|
||||||
$request = new ServerRequestFactory()
|
$request = new ServerRequestFactory()
|
||||||
->createServerRequest('GET', 'http://localhost/texts');
|
->createServerRequest('GET', 'http://localhost/texts');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue