File tree Expand file tree Collapse file tree 5 files changed +11
-6
lines changed
src/Shared/Types/Domain/Scalar Expand file tree Collapse file tree 5 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 22
33use CodelyTv \CodingStyle ;
44use PhpCsFixer \Fixer \ClassNotation \FinalClassFixer ;
5+ use PhpCsFixer \Fixer \ClassNotation \SelfStaticAccessorFixer ;
56use Symplify \EasyCodingStandard \Config \ECSConfig ;
67
78return function (ECSConfig $ ecsConfig ): void {
1314 FinalClassFixer::class => [
1415 __DIR__ . '/src/Shared/Types/Domain/ ' ,
1516 ],
16- \ PhpCsFixer \ Fixer \ ClassNotation \ SelfStaticAccessorFixer::class => [
17+ SelfStaticAccessorFixer::class => [
1718 __DIR__ . '/src/Shared/Types/Domain/ ' ,
1819 ],
1920 ]);
Original file line number Diff line number Diff line change @@ -68,3 +68,7 @@ install: ## Install dependencies
6868.PHONY : test
6969test : # # Execute unit test
7070 $(DOCKER_COMPOSE_RUN ) php bin/phpunit
71+
72+ .PHONY : ecs
73+ ecs : # # Run ecs
74+ $(DOCKER_COMPOSE_RUN ) ./vendor/bin/ecs check --fix
Original file line number Diff line number Diff line change @@ -18,22 +18,22 @@ public function __construct(int $value)
1818
1919 public static function createFromInt (int $ value )
2020 {
21- return new static ($ value );
21+ return new static ($ value );
2222 }
2323
2424 public function value (): int
2525 {
2626 return $ this ->value ;
2727 }
2828
29- protected function guard (int $ value ): void
29+ protected function guard (int $ value ): void
3030 {
3131 Assert::integer ($ value , 'It \'s not integer value ' );
3232 }
3333
3434 public static function random (): static
3535 {
36- return new static (self ::randomValue ());
36+ return new static (self ::randomValue ());
3737 }
3838
3939 protected static function randomValue (): int
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public static function createFromInt(int $value)
1515
1616 public static function random (): static
1717 {
18- return new static (static ::randomValue ());
18+ return new static (static ::randomValue ());
1919 }
2020
2121 protected function guard (int $ value ): void
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public static function create(string $value): static
3636 return new static ($ value );
3737 }
3838
39- public static function random (): StringValue
39+ public static function random (): self
4040 {
4141 return new static (static ::randomValue ());
4242 }
You can’t perform that action at this time.
0 commit comments