Working on the documentation #33
ci.yaml
on: push
Coding Standard & Static Analysis
25s
Matrix: Unittests
Annotations
21 warnings
Coding Standard & Static Analysis:
src/Aggregate/AbstractEventSourcedAggregate.php#L58
Escaped Mutant for Mutator "IfNegation":
@@ @@
$this->reflectionClass = new ReflectionClass($this);
}
$domainEventsProperty = $this->findDomainEventsProperty($this->reflectionClass);
- if ($domainEventsProperty->isPrivate()) {
+ if (!$domainEventsProperty->isPrivate()) {
$domainEventsProperty->setAccessible(true);
}
$events = $domainEventsProperty->getValue($this);
|
Coding Standard & Static Analysis:
src/Aggregate/AbstractEventSourcedAggregate.php#L85
Escaped Mutant for Mutator "UnwrapUcFirst":
@@ @@
protected function getEventNameFromEvent(object $event): string
{
$eventClass = get_class($event);
- $eventName = ucfirst(substr($eventClass, strrpos($eventClass, '\\') + 1));
+ $eventName = substr($eventClass, strrpos($eventClass, '\\') + 1);
if (!empty(static::EVENT_METHOD_SUFFIX)) {
$eventName = substr($eventName, 0, -strlen(static::EVENT_METHOD_SUFFIX));
}
|
Coding Standard & Static Analysis:
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L97
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
}
protected function extractAggregate(ReflectionClass $reflectionClass, object $aggregate): AggregateData
{
- $this->assertAggregateHasAttributes($reflectionClass);
+
$attributes = $this->getAttributes($reflectionClass);
/** @var EventSourcedAggregate $aggregateAttribute */
$aggregateAttribute = $attributes[0]->newInstance();
|
Coding Standard & Static Analysis:
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L102
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
$attributes = $this->getAttributes($reflectionClass);
/** @var EventSourcedAggregate $aggregateAttribute */
$aggregateAttribute = $attributes[0]->newInstance();
- $properties = ['identifierProperty' => $aggregateAttribute->identifierProperty, 'versionProperty' => $aggregateAttribute->versionProperty, 'domainEventProperty' => $aggregateAttribute->domainEventProperty];
+ $properties = ['versionProperty' => $aggregateAttribute->versionProperty, 'domainEventProperty' => $aggregateAttribute->domainEventProperty];
foreach ($properties as $name) {
$this->assertPropertyHasName($reflectionClass, $name);
}
|
Coding Standard & Static Analysis:
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L108
Escaped Mutant for Mutator "Foreach_":
@@ @@
/** @var EventSourcedAggregate $aggregateAttribute */
$aggregateAttribute = $attributes[0]->newInstance();
$properties = ['identifierProperty' => $aggregateAttribute->identifierProperty, 'versionProperty' => $aggregateAttribute->versionProperty, 'domainEventProperty' => $aggregateAttribute->domainEventProperty];
- foreach ($properties as $name) {
+ foreach ([] as $name) {
$this->assertPropertyHasName($reflectionClass, $name);
}
$aggregateType = $this->extractAggregateTypeFromAggregate($aggregate, $aggregateAttribute, $reflectionClass);
|
Coding Standard & Static Analysis:
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L109
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$aggregateAttribute = $attributes[0]->newInstance();
$properties = ['identifierProperty' => $aggregateAttribute->identifierProperty, 'versionProperty' => $aggregateAttribute->versionProperty, 'domainEventProperty' => $aggregateAttribute->domainEventProperty];
foreach ($properties as $name) {
- $this->assertPropertyHasName($reflectionClass, $name);
+
}
$aggregateType = $this->extractAggregateTypeFromAggregate($aggregate, $aggregateAttribute, $reflectionClass);
return new AggregateData(aggregateId: (string) $reflectionClass->getProperty($aggregateAttribute->identifierProperty)->getValue($aggregate), aggregateType: $aggregateType, version: (int) $reflectionClass->getProperty($aggregateAttribute->versionProperty)->getValue($aggregate), events: $reflectionClass->getProperty($aggregateAttribute->domainEventProperty)->getValue($aggregate));
|
Coding Standard & Static Analysis:
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L115
Escaped Mutant for Mutator "CastString":
@@ @@
$this->assertPropertyHasName($reflectionClass, $name);
}
$aggregateType = $this->extractAggregateTypeFromAggregate($aggregate, $aggregateAttribute, $reflectionClass);
- return new AggregateData(aggregateId: (string) $reflectionClass->getProperty($aggregateAttribute->identifierProperty)->getValue($aggregate), aggregateType: $aggregateType, version: (int) $reflectionClass->getProperty($aggregateAttribute->versionProperty)->getValue($aggregate), events: $reflectionClass->getProperty($aggregateAttribute->domainEventProperty)->getValue($aggregate));
+ return new AggregateData(aggregateId: $reflectionClass->getProperty($aggregateAttribute->identifierProperty)->getValue($aggregate), aggregateType: $aggregateType, version: (int) $reflectionClass->getProperty($aggregateAttribute->versionProperty)->getValue($aggregate), events: $reflectionClass->getProperty($aggregateAttribute->domainEventProperty)->getValue($aggregate));
}
protected function extractAggregateId(ReflectionClass $reflectionClass, object $aggregate): string
{
|
Coding Standard & Static Analysis:
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L119
Escaped Mutant for Mutator "CastInt":
@@ @@
$this->assertPropertyHasName($reflectionClass, $name);
}
$aggregateType = $this->extractAggregateTypeFromAggregate($aggregate, $aggregateAttribute, $reflectionClass);
- return new AggregateData(aggregateId: (string) $reflectionClass->getProperty($aggregateAttribute->identifierProperty)->getValue($aggregate), aggregateType: $aggregateType, version: (int) $reflectionClass->getProperty($aggregateAttribute->versionProperty)->getValue($aggregate), events: $reflectionClass->getProperty($aggregateAttribute->domainEventProperty)->getValue($aggregate));
+ return new AggregateData(aggregateId: (string) $reflectionClass->getProperty($aggregateAttribute->identifierProperty)->getValue($aggregate), aggregateType: $aggregateType, version: $reflectionClass->getProperty($aggregateAttribute->versionProperty)->getValue($aggregate), events: $reflectionClass->getProperty($aggregateAttribute->domainEventProperty)->getValue($aggregate));
}
protected function extractAggregateId(ReflectionClass $reflectionClass, object $aggregate): string
{
|
Coding Standard & Static Analysis:
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L132
Escaped Mutant for Mutator "CastString":
@@ @@
protected function extractAggregateId(ReflectionClass $reflectionClass, object $aggregate): string
{
$property = $this->findPropertyWithRequiredAttribute($reflectionClass, AggregateIdentifier::class);
- return (string) $this->getValueFromAttribute($property, AggregateIdentifier::class, $aggregate);
+ return $this->getValueFromAttribute($property, AggregateIdentifier::class, $aggregate);
}
protected function extractAggregateType(ReflectionClass $reflectionClass, object $aggregate): string
{
|
Coding Standard & Static Analysis:
src/Repository/AggregateExtractor/InterfaceBasedExtractor.php#L34
Escaped Mutant for Mutator "InstanceOf_":
@@ @@
}
protected function getAggregateTypeFromAggregate(object $aggregate): string
{
- if ($aggregate instanceof TypeProvidingAggregateInterface) {
+ if (true) {
return $aggregate->getAggregateType();
}
return get_class($aggregate);
}
}
|
Unittests (8.2)
Codecov: Failed to properly create commit: The process '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov' failed with exit code 1
|
Unittests (8.2):
src/Aggregate/AbstractEventSourcedAggregate.php#L58
Escaped Mutant for Mutator "IfNegation":
@@ @@
$this->reflectionClass = new ReflectionClass($this);
}
$domainEventsProperty = $this->findDomainEventsProperty($this->reflectionClass);
- if ($domainEventsProperty->isPrivate()) {
+ if (!$domainEventsProperty->isPrivate()) {
$domainEventsProperty->setAccessible(true);
}
$events = $domainEventsProperty->getValue($this);
|
Unittests (8.2):
src/Aggregate/AbstractEventSourcedAggregate.php#L85
Escaped Mutant for Mutator "UnwrapUcFirst":
@@ @@
protected function getEventNameFromEvent(object $event): string
{
$eventClass = get_class($event);
- $eventName = ucfirst(substr($eventClass, strrpos($eventClass, '\\') + 1));
+ $eventName = substr($eventClass, strrpos($eventClass, '\\') + 1);
if (!empty(static::EVENT_METHOD_SUFFIX)) {
$eventName = substr($eventName, 0, -strlen(static::EVENT_METHOD_SUFFIX));
}
|
Unittests (8.2):
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L97
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
}
protected function extractAggregate(ReflectionClass $reflectionClass, object $aggregate): AggregateData
{
- $this->assertAggregateHasAttributes($reflectionClass);
+
$attributes = $this->getAttributes($reflectionClass);
/** @var EventSourcedAggregate $aggregateAttribute */
$aggregateAttribute = $attributes[0]->newInstance();
|
Unittests (8.2):
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L102
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
$attributes = $this->getAttributes($reflectionClass);
/** @var EventSourcedAggregate $aggregateAttribute */
$aggregateAttribute = $attributes[0]->newInstance();
- $properties = ['identifierProperty' => $aggregateAttribute->identifierProperty, 'versionProperty' => $aggregateAttribute->versionProperty, 'domainEventProperty' => $aggregateAttribute->domainEventProperty];
+ $properties = ['versionProperty' => $aggregateAttribute->versionProperty, 'domainEventProperty' => $aggregateAttribute->domainEventProperty];
foreach ($properties as $name) {
$this->assertPropertyHasName($reflectionClass, $name);
}
|
Unittests (8.2):
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L108
Escaped Mutant for Mutator "Foreach_":
@@ @@
/** @var EventSourcedAggregate $aggregateAttribute */
$aggregateAttribute = $attributes[0]->newInstance();
$properties = ['identifierProperty' => $aggregateAttribute->identifierProperty, 'versionProperty' => $aggregateAttribute->versionProperty, 'domainEventProperty' => $aggregateAttribute->domainEventProperty];
- foreach ($properties as $name) {
+ foreach ([] as $name) {
$this->assertPropertyHasName($reflectionClass, $name);
}
$aggregateType = $this->extractAggregateTypeFromAggregate($aggregate, $aggregateAttribute, $reflectionClass);
|
Unittests (8.2):
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L109
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$aggregateAttribute = $attributes[0]->newInstance();
$properties = ['identifierProperty' => $aggregateAttribute->identifierProperty, 'versionProperty' => $aggregateAttribute->versionProperty, 'domainEventProperty' => $aggregateAttribute->domainEventProperty];
foreach ($properties as $name) {
- $this->assertPropertyHasName($reflectionClass, $name);
+
}
$aggregateType = $this->extractAggregateTypeFromAggregate($aggregate, $aggregateAttribute, $reflectionClass);
return new AggregateData(aggregateId: (string) $reflectionClass->getProperty($aggregateAttribute->identifierProperty)->getValue($aggregate), aggregateType: $aggregateType, version: (int) $reflectionClass->getProperty($aggregateAttribute->versionProperty)->getValue($aggregate), events: $reflectionClass->getProperty($aggregateAttribute->domainEventProperty)->getValue($aggregate));
|
Unittests (8.2):
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L115
Escaped Mutant for Mutator "CastString":
@@ @@
$this->assertPropertyHasName($reflectionClass, $name);
}
$aggregateType = $this->extractAggregateTypeFromAggregate($aggregate, $aggregateAttribute, $reflectionClass);
- return new AggregateData(aggregateId: (string) $reflectionClass->getProperty($aggregateAttribute->identifierProperty)->getValue($aggregate), aggregateType: $aggregateType, version: (int) $reflectionClass->getProperty($aggregateAttribute->versionProperty)->getValue($aggregate), events: $reflectionClass->getProperty($aggregateAttribute->domainEventProperty)->getValue($aggregate));
+ return new AggregateData(aggregateId: $reflectionClass->getProperty($aggregateAttribute->identifierProperty)->getValue($aggregate), aggregateType: $aggregateType, version: (int) $reflectionClass->getProperty($aggregateAttribute->versionProperty)->getValue($aggregate), events: $reflectionClass->getProperty($aggregateAttribute->domainEventProperty)->getValue($aggregate));
}
protected function extractAggregateId(ReflectionClass $reflectionClass, object $aggregate): string
{
|
Unittests (8.2):
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L119
Escaped Mutant for Mutator "CastInt":
@@ @@
$this->assertPropertyHasName($reflectionClass, $name);
}
$aggregateType = $this->extractAggregateTypeFromAggregate($aggregate, $aggregateAttribute, $reflectionClass);
- return new AggregateData(aggregateId: (string) $reflectionClass->getProperty($aggregateAttribute->identifierProperty)->getValue($aggregate), aggregateType: $aggregateType, version: (int) $reflectionClass->getProperty($aggregateAttribute->versionProperty)->getValue($aggregate), events: $reflectionClass->getProperty($aggregateAttribute->domainEventProperty)->getValue($aggregate));
+ return new AggregateData(aggregateId: (string) $reflectionClass->getProperty($aggregateAttribute->identifierProperty)->getValue($aggregate), aggregateType: $aggregateType, version: $reflectionClass->getProperty($aggregateAttribute->versionProperty)->getValue($aggregate), events: $reflectionClass->getProperty($aggregateAttribute->domainEventProperty)->getValue($aggregate));
}
protected function extractAggregateId(ReflectionClass $reflectionClass, object $aggregate): string
{
|
Unittests (8.2):
src/Repository/AggregateExtractor/AttributeBasedExtractor.php#L132
Escaped Mutant for Mutator "CastString":
@@ @@
protected function extractAggregateId(ReflectionClass $reflectionClass, object $aggregate): string
{
$property = $this->findPropertyWithRequiredAttribute($reflectionClass, AggregateIdentifier::class);
- return (string) $this->getValueFromAttribute($property, AggregateIdentifier::class, $aggregate);
+ return $this->getValueFromAttribute($property, AggregateIdentifier::class, $aggregate);
}
protected function extractAggregateType(ReflectionClass $reflectionClass, object $aggregate): string
{
|
Unittests (8.2):
src/Repository/AggregateExtractor/InterfaceBasedExtractor.php#L34
Escaped Mutant for Mutator "InstanceOf_":
@@ @@
}
protected function getAggregateTypeFromAggregate(object $aggregate): string
{
- if ($aggregate instanceof TypeProvidingAggregateInterface) {
+ if (true) {
return $aggregate->getAggregateType();
}
return get_class($aggregate);
}
}
|