Passed
Pull Request — master (#88)
by
unknown
03:22
created

SupportVectorMachineException::missingVarPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Phpml\Exception;
6
7
class SupportVectorMachineException extends \Exception
8
{
9
10
    /**
11
     * @param string $binPath
12
     *
13
     * @return SupportVectorMachineException
14
     */
15
    public static function missingBinPath(string $binPath)
16
    {
17
        return new self(sprintf('Bin path "%s" missing.', $binPath));
18
    }
19
20
    /**
21
     * @param string $trainFile
22
     *
23
     * @return SupportVectorMachineException
24
     */
25
    public static function missingTrainFile(string $trainFile)
26
    {
27
        return new self(sprintf('Train file "%s" missing.', $trainFile));
28
    }
29
30
    /**
31
     * @param string $predictFile
32
     *
33
     * @return SupportVectorMachineException
34
     */
35
    public static function missingPredictFile(string $predictFile)
36
    {
37
        return new self(sprintf('Predict file "%s" missing.', $predictFile));
38
    }
39
40
    /**
41
     * @param string $varPath
42
     *
43
     * @return SupportVectorMachineException
44
     */
45
    public static function missingVarPath(string $varPath)
46
    {
47
        return new self(sprintf('Var path "%s" missing.', $varPath));
48
    }
49
}
50