Completed
Pull Request — develop (#100)
by
unknown
03:44
created

InvalidRepositoryPathException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 3
crap 1
1
<?php
2
/**
3
 * GitElephant - An abstraction layer for git written in PHP
4
 * Copyright (C) 2013  Matteo Giachino
5
 *
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program.  If not, see [http://www.gnu.org/licenses/].
18
 */
19
20
namespace GitElephant\Exception;
21
22
/**
23
 * Class InvalidRepositoryPathException
24
 *
25
 * @package GitElephant\Exception
26
 */
27
class InvalidRepositoryPathException extends \Exception
28
{
29
    protected $messageTpl = 'The path provided (%s) is not a valid git repository path';
30
31
    /**
32
     * @param string     $message  repository path
33
     * @param int        $code     code
34
     * @param \Exception $previous previous
35
     */
36 1
    public function __construct($message = "", $code = 0, \Exception $previous = null)
37
    {
38 1
        parent::__construct(sprintf($this->messageTpl, $message), $code, $previous);
39 1
    }
40
}
41