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

DataAlreadyExistException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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
}