EmptyDatabaseException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Exception for no records in database
4
 *
5
 * @package Ibonly\PotatoORM\EmptyDatabaseException
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 EmptyDatabaseException extends Exception
15
{
16
    public function __construct()
17
    {
18
        parent::__construct("No record found in database");
19
    }
20
21
    /**
22
     * Get the error message
23
     *
24
     * @return string
25
     */
26
    public function errorMessage()
27
    {
28
        return "Error: " . $this->getMessage();
29
    }
30
}