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

InvalidRepositoryPathException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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