@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | protected function getContractsPath(): string |
33 | 33 | { |
34 | - return dirname(__FILE__) . '/../../../contracts'; |
|
34 | + return dirname(__FILE__).'/../../../contracts'; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | public static abstract function fail(string $message); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | $dtoClass = CommentsPostHeaderDto::class; |
20 | 20 | $dql = "select new $dtoClass(p.id, p.title, p.tags, p.version) from $headerClass p"; |
21 | 21 | if ($from != null) { |
22 | - $dql = $dql . " where p.createdAt >= :from"; |
|
22 | + $dql = $dql." where p.createdAt >= :from"; |
|
23 | 23 | } |
24 | 24 | $query = $this->getEntityManager()->createQuery($dql); |
25 | 25 | if ($from != null) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | if ($value == null) { |
103 | 103 | return null; |
104 | 104 | } |
105 | - return is_string($value) ? $value : (string)$value; |
|
105 | + return is_string($value) ? $value : (string) $value; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | if ($nullable) { |
117 | 117 | return null; |
118 | 118 | } |
119 | - $name = call_user_func(get_called_class() . '::getName'); |
|
119 | + $name = call_user_func(get_called_class().'::getName'); |
|
120 | 120 | throw new RuntimeException("Event $name requires a field '$fieldName' to be present"); |
121 | 121 | } |
122 | 122 | return $this->data[$fieldName]; |
@@ -39,7 +39,7 @@ |
||
39 | 39 | |
40 | 40 | public function getEventName(): string |
41 | 41 | { |
42 | - return call_user_func($this->inboundEventClass . '::getName'); |
|
42 | + return call_user_func($this->inboundEventClass.'::getName'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function __construct(array $data) |
19 | 19 | { |
20 | - parent::__construct( $data); |
|
20 | + parent::__construct($data); |
|
21 | 21 | $this->oldLogin = $this->string('oldLogin'); |
22 | 22 | $this->newLogin = $this->string('newLogin'); |
23 | 23 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function __construct(array $data) |
20 | 20 | { |
21 | - parent::__construct( $data); |
|
21 | + parent::__construct($data); |
|
22 | 22 | $this->postId = $this->ulid('postId'); |
23 | 23 | $this->comments = [$this->array('comment')]; |
24 | 24 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public function createTransaction($func): TransactionInterface |
21 | 21 | { |
22 | 22 | $em = $this->getEntityManager(); |
23 | - if(!$em->isOpen()) { |
|
23 | + if (!$em->isOpen()) { |
|
24 | 24 | $em = $this->managerRegistry->resetManager($this->getManagerName()); |
25 | 25 | } |
26 | 26 | return new DoctrineTransaction($em, $func); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * @param $func |
24 | 24 | * @return TransactionInterface |
25 | 25 | */ |
26 | - public function createTransaction($func): TransactionInterface |
|
26 | + public function createTransaction($func): TransactionInterface |
|
27 | 27 | { |
28 | 28 | $em = $this->getEntityManager(); |
29 | 29 | if(!$em->isOpen()) { |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | ) |
23 | 23 | { |
24 | 24 | $this->subscribedHandlers = Collection::from($this->subscribe()) |
25 | - ->map(function ($handlerMethodName, $eventClass) { |
|
25 | + ->map(function($handlerMethodName, $eventClass) { |
|
26 | 26 | return EventHandlerReference::create($handlerMethodName, $eventClass); |
27 | 27 | }) |
28 | 28 | ->realize(); |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | { |
59 | 59 | return $this |
60 | 60 | ->subscribedHandlers |
61 | - ->filter(function ($ref) use ($event) { |
|
61 | + ->filter(function($ref) use ($event) { |
|
62 | 62 | return $ref->getEventName() == $event->getName(); |
63 | - })->map(function ($value) { |
|
63 | + })->map(function($value) { |
|
64 | 64 | return $value; |
65 | 65 | })->toArray(); |
66 | 66 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @param CreateNewPostDto $newPost |
16 | 16 | * @return Ulid |
17 | 17 | */ |
18 | - public function createPost(CreateNewPostDto $newPost): Ulid |
|
18 | + public function createPost(CreateNewPostDto $newPost): Ulid |
|
19 | 19 | { |
20 | 20 | $id = new Ulid(); |
21 | 21 | $em = $this->getEntityManager(); |