Completed
Push — master ( 654a3a...0d91ac )
by Arman
20s queued 16s
created

PaginatorException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A missingRequiredParams() 0 8 1
1
<?php
2
3
/**
4
 * Quantum PHP Framework
5
 *
6
 * An open source software development framework for PHP
7
 *
8
 * @package Quantum
9
 * @author Arman Ag. <[email protected]>
10
 * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
11
 * @link http://quantum.softberg.org/
12
 * @since 2.9.7
13
 */
14
15
namespace Quantum\Paginator\Exceptions;
16
17
use Quantum\App\Exceptions\BaseException;
18
19
/**
20
 * Class PaginatorException
21
 * @package Quantum\Paginator
22
 */
23
class PaginatorException extends BaseException
24
{
25
    /**
26
     * @param string $type
27
     * @param array $missingParams
28
     * @return PaginatorException
29
     */
30
    public static function missingRequiredParams(string $type, array $missingParams): PaginatorException
31
    {
32
        return new static(
33
            t('exception.paginator_missing_params', [
34
                ucfirst($type),
35
                implode(', ', $missingParams)
36
            ]),
37
            E_WARNING
38
        );
39
    }
40
}