Completed
Push — master ( c332a7...d97910 )
by Adeniyi
07:05 queued 02:31
created

DataAlreadyExistException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A errorMessage() 0 4 1
1
<?php
2
/**
3
 * Exception for user already exist
4
 *
5
 * @package Ibonly\PotatoORM\DataAlreadyExistException
6
 * @author  Ibraheem ADENIYI <[email protected]>
7
 * @license MIT <https://opensource.org/licenses/MIT>
8
 */
9
10
namespace Ibonly\PotatoORM;
11
12
use Exception;
13
14
class DataAlreadyExistException extends Exception
15
{
16
    public function __construct()
17
    {
18
        parent::__construct("Data already exist in database");
19
    }
20
21
    /**
22
     * Get error message
23
     *
24
     * @return string
25
     */
26
    public function errorMessage()
27
    {
28
        return "Error: " . $this->getMessage();
29
    }
30
}