Test Failed
Pull Request — main (#9)
by
unknown
12:20
created

TasksException::invalidCronExpression()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 1
cts 1
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of BlitzPHP Tasks.
7
 *
8
 * (c) 2025 Dimitri Sitchet Tomkeu <[email protected]>
9
 *
10
 * For the full copyright and license information, please view
11
 * the LICENSE file that was distributed with this source code.
12
 */
13
14
namespace BlitzPHP\Tasks\Exceptions;
15
16
use RuntimeException;
17
18
/**
19
 * @credit <a href="https://tasks.codeigniter.com">CodeIgniter4 - CodeIgniter\Tasks\Exceptions\TasksException</a>
20
 */
21
final class TasksException extends RuntimeException
22
{
23
    public static function invalidTaskType(string $type): self
24
    {
25
        return new self(lang('Tasks.invalidTaskType', [$type]));
26
    }
27
28
    public static function invalidCronExpression(string $string): self
29
    {
30 2
        return new self(lang('Tasks.invalidCronExpression', [$string]));
31
    }
32
}
33