Skip to content

Commit 3ea110a

Browse files
authored
Merge pull request #17 from ppavlovic/master
BootstrapAbstract implements BootstrapInterface and an abstract class
2 parents 6f013e4 + 7255121 commit 3ea110a

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/Bootstrap/BootstrapAbstract.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use G4\CleanCore\Request\Request;
66

7-
class BootstrapAbstract
7+
abstract class BootstrapAbstract implements BootstrapInterface
88
{
99
protected Request $request;
1010

@@ -18,4 +18,11 @@ public function getRequest(): Request
1818
{
1919
return $this->request;
2020
}
21+
22+
abstract public function init();
23+
24+
public function getAllowedMedia()
25+
{
26+
return [];
27+
}
2128
}

src/Bootstrap/Factory.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ class Factory
1616

1717
public function initBootstrap(): void
1818
{
19-
if (!$this->bootstrap instanceof BootstrapInterface) {
2019
$this
2120
->constructFullBootstrapName()
2221
->bootstrapFactory();
2322
}
24-
}
2523

2624
public function getBootstrap(): BootstrapInterface
2725
{

src/Factory/UseCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class UseCase
1212

1313
private ?Response $response = null;
1414

15-
private UseCaseAbstract $useCase;
15+
private ?UseCaseAbstract $useCase = null;
1616

1717
private ?string $useCaseName = null;
1818

0 commit comments

Comments
 (0)