Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Commit fbee62c

Browse files
committed
Updated code do fix phpcs checks
1 parent 964ce76 commit fbee62c

23 files changed

+83
-44
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
},
1818
"require-dev": {
1919
"phpunit/phpunit": "^5.3",
20-
"symfony/var-dumper": "^3.0",
2120
"codacy/coverage": "dev-master",
21+
"squizlabs/php_codesniffer": "^2.0",
22+
"symfony/var-dumper": "^3.0",
2223
"jms/serializer": "^1.1",
2324
"predis/predis": "^1.0",
2425
"mongodb/mongodb": "^1.0.0",

ruleset.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="HelloFresh">
3+
<description>Coding standard based on PSR-2 with some additions.</description>
4+
5+
<!-- Include the whole PSR-2 standard -->
6+
<rule ref="PSR2"/>
7+
</ruleset>

src/CommandBus/Exception/MissingHandlerException.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
<?php
2-
/**
3-
* Created by PhpStorm.
4-
* User: ilelis
5-
* Date: 20/06/16
6-
* Time: 14:53
7-
*/
82

93
namespace HelloFresh\Engine\CommandBus\Exception;
104

src/Domain/DomainMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct($id, $version, $payload, \DateTimeImmutable $recorde
4242
}
4343

4444
/**
45-
* {@inheritDoc}
45+
* @return AggregateIdInterface
4646
*/
4747
public function getId()
4848
{

src/Domain/StreamName.php

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

55
use Assert\Assertion;
66

7-
87
/**
98
* Class StreamName
109
*

src/EventDispatcher/EventListenerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ interface EventListenerInterface
1313
* @param callable $callable The callable that will be called when the event happens
1414
*/
1515
public function addListener($eventName, callable $callable);
16-
}
16+
}

src/EventSourcing/AggregateRepository.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,4 @@ protected function determineStreamName(StreamName $streamName = null)
125125

126126
return $streamName;
127127
}
128-
129128
}

src/EventSourcing/AggregateRootTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getUncommittedEvents()
3939
*
4040
* @param EventStream $historyEvents
4141
*
42-
* @throws \RuntimeException
42+
* @param null $version
4343
*/
4444
public function replay(EventStream $historyEvents, $version = null)
4545
{

src/EventStore/Adapter/MongoAdapter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public function fromVersion(StreamName $streamName, AggregateIdInterface $aggreg
5757
}
5858

5959
$collection = $this->getCollection($streamName);
60-
$serializedEvents = $collection->find($query)->sort(['version' => \MongoCollection::ASCENDING]);;
60+
$serializedEvents = $collection
61+
->find($query)
62+
->sort(['version' => \MongoCollection::ASCENDING]);
6163

6264
return $this->processEvents($serializedEvents);
6365
}

src/EventStore/Adapter/Schema/DbalSchema.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ public static function createSchema(Connection $connection)
3030
}
3131

3232
/**
33+
* @param Schema $schema
3334
* @param string $table
35+
* @throws \Doctrine\DBAL\Schema\SchemaException
3436
*/
3537
public static function addToSchema(Schema $schema, $table)
3638
{

0 commit comments

Comments
 (0)