Passed
Push — main ( ef2030...a17612 )
by Tan
15:25 queued 13:15
created

ConfigFileException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
eloc 3
c 1
b 1
f 0
dl 0
loc 10
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A platformFile() 0 3 1
A settingFile() 0 3 1
1
<?php
2
3
namespace CSlant\TelegramGitNotifier\Exceptions;
4
5
final class ConfigFileException extends TelegramGitNotifierException
6
{
7
    public static function settingFile(?string $settingFile = null): self
8
    {
9
        return new self('Something went wrong while reading settings file. Check your settings file path: ' . ($settingFile ?? 'null'));
10
    }
11
12
    public static function platformFile(?string $platform = null, ?string $platformFile = null): self
13
    {
14
        return new self('Something went wrong while reading platform file. Check your platform file path: ' . ($platformFile ?? 'null') . ' for platform: ' . ($platform ?? 'null'));
15
    }
16
}
17