-
Notifications
You must be signed in to change notification settings - Fork 0
x: Added phpstan rules to verify access between layers in hexagonal arch… #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
krchiper
wants to merge
2
commits into
main
Choose a base branch
from
x-add-hexagonal-access-rules
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,10 @@ | |
{ | ||
"name": "Frederik Hørgreen", | ||
"homepage": "https://github.com/frederikhs" | ||
}, | ||
{ | ||
"name": "Kim Winther Carlsen", | ||
"homepage": "https://github.com/krchiper" | ||
} | ||
], | ||
"config": { | ||
|
@@ -41,6 +45,11 @@ | |
"Hiper\\PHPStan\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Test\\": "tests/test-fixtures" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. eneste jeg tænker er om namespace ikke skal være Test\Fixtures\DDD så de var adskilt fra class const reglens fixtures. I samme omfang kunne de også flyttes til en undermappe under test-fixtures (men de har ikke namespace så behøver ikke namespace ændring |
||
} | ||
}, | ||
"scripts": { | ||
"phpstan": "phpstan analyse", | ||
"phpunit": "phpunit tests" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
<?php | ||
|
||
namespace Hiper\PHPStan\Rules; | ||
|
||
use PhpParser\Node; | ||
use PhpParser\Node\Name\FullyQualified; | ||
use PHPStan\Analyser\Scope; | ||
use PHPStan\Rules\IdentifierRuleError; | ||
use PHPStan\Rules\Rule; | ||
use PHPStan\Rules\RuleErrorBuilder; | ||
|
||
/** | ||
* @implements Rule<FullyQualified> | ||
*/ | ||
class DomainDrivenDesignRule implements Rule { | ||
#[\Override] | ||
public function getNodeType(): string { | ||
return FullyQualified::class; | ||
} | ||
|
||
#[\Override] | ||
public function processNode(Node $node, Scope $scope): array { | ||
$currentFile = $scope->getFile(); | ||
|
||
if (str_contains($currentFile, '/Domain/')) { | ||
return $this->domainRule($node, $scope); | ||
} | ||
|
||
if (str_contains($currentFile, '/Application/')) { | ||
return $this->applicationRule($node); | ||
} | ||
|
||
return []; | ||
} | ||
|
||
/** | ||
* @param FullyQualified $node | ||
* | ||
* @return list<IdentifierRuleError> | ||
*/ | ||
protected function domainRule(Node $node, Scope $scope): array { | ||
$usedClass = $node->toCodeString(); | ||
|
||
if (str_contains($usedClass, '\\Infrastructures\\') || str_contains($usedClass, '\\Infrastructure\\')) { | ||
return [ | ||
RuleErrorBuilder::message('The Domain layer must not reference ' . $usedClass . ' from the Infrastructure layer.') | ||
->identifier('ddd.domainAccessInfrastructureViolation') | ||
->build(), | ||
]; | ||
} | ||
|
||
if (str_contains($usedClass, '\\Applications\\') || str_contains($usedClass, '\\Application\\')) { | ||
return [ | ||
RuleErrorBuilder::message('The Domain layer must not reference ' . $usedClass . ' from the Application layer.') | ||
->identifier('ddd.domainAccessApplicationViolation') | ||
->build(), | ||
]; | ||
} | ||
|
||
$currentFile = $scope->getFile(); | ||
if (str_contains($currentFile, '/Models/') || str_contains($currentFile, '/Model/')) { | ||
if (str_contains($usedClass, '\\Repositories\\') || str_contains($usedClass, '\\Repository\\')) { | ||
return [ | ||
RuleErrorBuilder::message('The Domain Model layer must not reference ' . $usedClass . ' from the Domain Repository layer.') | ||
->identifier('ddd.domainModelAccessDomainRepositoryViolation') | ||
->build(), | ||
]; | ||
} | ||
|
||
if (str_contains($usedClass, '\\Services\\') || str_contains($usedClass, '\\Service\\')) { | ||
return [ | ||
RuleErrorBuilder::message('The Domain Model layer must not reference ' . $usedClass . ' from the Domain Service layer.') | ||
->identifier('ddd.domainModelAccessDomainServiceViolation') | ||
->build(), | ||
]; | ||
} | ||
} | ||
if (str_contains($currentFile, '/Repositories/') || str_contains($currentFile, '/Repository/')) { | ||
if (str_contains($usedClass, '\\Repositories\\') || str_contains($usedClass, '\\Repository\\')) { | ||
return [ | ||
RuleErrorBuilder::message('The Domain Reposity layer must not reference ' . $usedClass . ' from the Domain Repository layer.') | ||
->identifier('ddd.domainRepositoryAccessDomainRepositoryViolation') | ||
->build(), | ||
]; | ||
} | ||
if (str_contains($usedClass, '\\Services\\') || str_contains($usedClass, '\\Service\\')) { | ||
return [ | ||
RuleErrorBuilder::message('The Domain Reposity layer must not reference ' . $usedClass . ' from the Domain Service layer.') | ||
->identifier('ddd.domainRepositoryAccessDomainServiceViolation') | ||
->build(), | ||
]; | ||
} | ||
} | ||
if (str_contains($currentFile, '/Services/') || str_contains($currentFile, '/Service/')) { | ||
if (str_contains($usedClass, '\\Repositories\\') || str_contains($usedClass, '\\Repository\\')) { | ||
return [ | ||
RuleErrorBuilder::message('The Domain Service layer must not reference ' . $usedClass . ' from the Domain Repository layer.') | ||
->identifier('ddd.domainServiceAccessDomainRepositoryViolation') | ||
->build(), | ||
]; | ||
} | ||
} | ||
|
||
return []; | ||
} | ||
|
||
/** | ||
* @param FullyQualified $node | ||
* | ||
* @return list<IdentifierRuleError> | ||
*/ | ||
protected function applicationRule(Node $node): array { | ||
$usedClass = $node->toCodeString(); | ||
if (str_contains($usedClass, '\\Infrastructures\\') || str_contains($usedClass, '\\Infrastructure\\')) { | ||
return [ | ||
RuleErrorBuilder::message('The Application layer must not reference ' . $usedClass . ' from the Infrastructure layer.') | ||
->identifier('ddd.applicationAccessInfrastructure') | ||
->build(), | ||
]; | ||
} | ||
|
||
return []; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php declare(strict_types=1); | ||
|
||
use Hiper\PHPStan\Rules\DomainDrivenDesignRule; | ||
use PHPStan\Rules\Rule; | ||
use PHPStan\Testing\RuleTestCase; | ||
use PHPUnit\Framework\Attributes\DataProvider; | ||
|
||
/** | ||
* @phpstan-type FixturePaths string[] | ||
* @phpstan-type ExpectedError array{0: string, 1: int, 2?: string|null} | ||
* @phpstan-type ExpectedErrors list<ExpectedError> | ||
* @phpstan-type Fixture array{0: FixturePaths, 1: ExpectedErrors} | ||
* @phpstan-type Fixtures Fixture[] | ||
* | ||
* @extends RuleTestCase<DomainDrivenDesignRule> | ||
*/ | ||
class DomainDrivenDesignRuleTest extends RuleTestCase { | ||
protected function getRule(): Rule { | ||
return new DomainDrivenDesignRule(); | ||
} | ||
|
||
/** @return Fixtures */ | ||
public static function fixtureProvider(): array { | ||
return [ | ||
[[__DIR__ . '/test-fixtures/Application/Service/ApplicationClassThatAccessDomain.php'], []], | ||
[[__DIR__ . '/test-fixtures/Application/Service/ApplicationClassThatAccessRepository.php'], []], | ||
[[__DIR__ . '/test-fixtures/Application/Service/ApplicationClassThatAccessService.php'], []], | ||
[[__DIR__ . '/test-fixtures/Application/Service/ApplicationClassThatAccessApplication.php'], []], | ||
[[__DIR__ . '/test-fixtures/Application/Service/ApplicationClassThatAccessInfrastructure.php'], [['The Application layer must not reference \\Test\\Infrastructure\\Infrastructure from the Infrastructure layer.', 8]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Models/DomainClassThatAccessDomain.php'], []], | ||
[[__DIR__ . '/test-fixtures/Domain/Models/DomainClassThatAccessApplication.php'], [['The Domain layer must not reference \\Test\\Application\\Service\\ApplicationClassThatAccessDomain from the Application layer.', 8]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Models/DomainClassThatAccessService.php'], [['The Domain Model layer must not reference \\Test\\Domain\\Service\\ServiceClassThatAccessDomain from the Domain Service layer.', 8]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Models/DomainClassThatAccessRepository.php'], [['The Domain Model layer must not reference \\Test\\Domain\\Repositories\\RepositoryClassThatAccessDomain from the Domain Repository layer.', 8]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Models/DomainClassThatAccessInfrastructure.php'], [['The Domain layer must not reference \\Test\\Infrastructure\\Infrastructure from the Infrastructure layer.', 8]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Repositories/RepositoryClassThatAccessDomain.php'], []], | ||
[[__DIR__ . '/test-fixtures/Domain/Repositories/RepositoryClassThatAccessRepository.php'], [['The Domain Reposity layer must not reference \\Test\\Domain\\Repositories\\RepositoryClassThatAccessDomain from the Domain Repository layer.', 6]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Repositories/RepositoryClassThatAccessService.php'], [['The Domain Reposity layer must not reference \\Test\\Domain\\Service\\ServiceClassThatAccessDomain from the Domain Service layer.', 8]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Repositories/RepositoryClassThatAccessApplication.php'], [['The Domain layer must not reference \\Test\\Application\\Service\\ApplicationClassThatAccessDomain from the Application layer.', 8]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Repositories/RepositoryClassThatAccessInfrastructure.php'], [['The Domain layer must not reference \\Test\\Infrastructure\\Infrastructure from the Infrastructure layer.', 8]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Service/ServiceClassThatAccessDomain.php'], []], | ||
[[__DIR__ . '/test-fixtures/Domain/Service/ServiceClassThatAccessRepository.php'], [['The Domain Service layer must not reference \\Test\Domain\Repositories\RepositoryClassThatAccessDomain from the Domain Repository layer.', 8]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Service/ServiceClassThatAccessService.php'], []], | ||
[[__DIR__ . '/test-fixtures/Domain/Service/ServiceClassThatAccessApplication.php'], [['The Domain layer must not reference \\Test\\Application\Service\\ApplicationClassThatAccessDomain from the Application layer.', 8]]], | ||
[[__DIR__ . '/test-fixtures/Domain/Service/ServiceClassThatAccessInfrastructure.php'], [['The Domain layer must not reference \\Test\\Infrastructure\\Infrastructure from the Infrastructure layer.', 8]]], | ||
]; | ||
} | ||
|
||
/** | ||
* @param FixturePaths $paths_to_fixture | ||
* @param ExpectedErrors $expected_errors | ||
*/ | ||
#[DataProvider('fixtureProvider')] | ||
public function testDomainDrivenDesignRules(array $paths_to_fixture, array $expected_errors): void { | ||
$this->analyse($paths_to_fixture, $expected_errors); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
tests/test-fixtures/Application/Service/ApplicationClassThatAccessApplication.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Test\Application\Service; | ||
|
||
class ApplicationClassThatAccessApplication { | ||
public function __construct(ApplicationClassThatAccessApplication $_) { | ||
|
||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
tests/test-fixtures/Application/Service/ApplicationClassThatAccessDomain.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Test\Application\Service; | ||
|
||
class ApplicationClassThatAccessDomain { | ||
public function __construct(ApplicationClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Application/Service/ApplicationClassThatAccessInfrastructure.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Application\Service; | ||
|
||
use Test\Infrastructure\Infrastructure; | ||
|
||
class ApplicationClassThatAccessInfrastructure { | ||
public function __construct(Infrastructure $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Application/Service/ApplicationClassThatAccessRepository.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Application\Service; | ||
|
||
use Test\Domain\Repositories\ServiceClasssThatAccessDomain; | ||
|
||
class ApplicationClassThatAccessRepository { | ||
public function __construct(ServiceClasssThatAccessDomain $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Application/Service/ApplicationClassThatAccessService.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Application\Service; | ||
|
||
use Test\Domain\Service\ServiceClassThatAccessDomain; | ||
|
||
class ApplicationClassThatAccessService { | ||
public function __construct(ServiceClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Domain/Models/DomainClassThatAccessApplication.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Models; | ||
|
||
use Test\Application\Service\ApplicationClassThatAccessDomain; | ||
|
||
class DomainClassThatAccessApplication { | ||
public function __construct(ApplicationClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
tests/test-fixtures/Domain/Models/DomainClassThatAccessDomain.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Models; | ||
|
||
class DomainClassThatAccessDomain { | ||
public function __construct(DomainClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Domain/Models/DomainClassThatAccessInfrastructure.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Models; | ||
|
||
use Test\Infrastructure\Infrastructure; | ||
|
||
class DomainClassThatAccessInfrastructure { | ||
public function __construct(Infrastructure $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Domain/Models/DomainClassThatAccessRepository.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Models; | ||
|
||
use Test\Domain\Repositories\RepositoryClassThatAccessDomain; | ||
|
||
class DomainClassThatAccessRepository { | ||
public function __construct(RepositoryClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Domain/Models/DomainClassThatAccessService.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Models; | ||
|
||
use Test\Domain\Service\ServiceClassThatAccessDomain; | ||
|
||
class DomainClassThatAccessService { | ||
public function __construct(ServiceClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Domain/Repositories/RepositoryClassThatAccessApplication.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Repositories; | ||
|
||
use Test\Application\Service\ApplicationClassThatAccessDomain; | ||
|
||
class RepositoryClassThatAccessApplication { | ||
public function __construct(ApplicationClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Domain/Repositories/RepositoryClassThatAccessDomain.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Repositories; | ||
|
||
use Test\Domain\Models\DomainClassThatAccessDomain; | ||
|
||
class RepositoryClassThatAccessDomain { | ||
public function __construct(DomainClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Domain/Repositories/RepositoryClassThatAccessInfrastructure.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Repositories; | ||
|
||
use Test\Infrastructure\Infrastructure; | ||
|
||
class RepositoryClassThatAccessInfrastructure { | ||
public function __construct(Infrastructure $_) { | ||
|
||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
tests/test-fixtures/Domain/Repositories/RepositoryClassThatAccessRepository.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Repositories; | ||
|
||
class RepositoryClassThatAccessRepository { | ||
public function __construct(RepositoryClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Domain/Repositories/RepositoryClassThatAccessService.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Repositories; | ||
|
||
use Test\Domain\Service\ServiceClassThatAccessDomain; | ||
|
||
class RepositoryClassThatAccessService { | ||
public function __construct(ServiceClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/test-fixtures/Domain/Service/ServiceClassThatAccessApplication.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Test\Domain\Service; | ||
|
||
use Test\Application\Service\ApplicationClassThatAccessDomain; | ||
|
||
class ServiceClassThatAccessApplication { | ||
public function __construct(ApplicationClassThatAccessDomain $_) { | ||
|
||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
husk også at tilføje dig selv til CODEOWNERS filen @
.github/CODEOWNERS
. Med stjerne på repo og evt med overskrivning påsrc/Rules/DomainDrivenDesignRule.php
samt fixtures