AggregateRootRepositoryInstanciationFailed   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 3
c 2
b 1
f 0
dl 0
loc 10
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A aggregateRootClassIsNotValid() 0 3 1
A aggregateRootClassDoesNotExist() 0 3 1
1
<?php
2
3
namespace Chocofamily\LaravelEventSauce\Exceptions;
4
5
use Exception;
6
7
class AggregateRootRepositoryInstanciationFailed extends Exception
8
{
9
    public static function aggregateRootClassDoesNotExist()
10
    {
11
        return new static('You have to set an aggregate root before the repository can be initialized.');
12
    }
13
14
    public static function aggregateRootClassIsNotValid()
15
    {
16
        return new static('Not a valid aggregate root class');
17
    }
18
}
19