Completed
Push — master ( 65f177...9533f0 )
by Freek
06:12 queued 03:58
created

secondArgumentMissing()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Spatie\Fractal\Exceptions;
4
5
use InvalidArgumentException;
6
7
class InvalidFractalHelperArgument extends InvalidArgumentException
8
{
9
    public static function secondArgumentMissing()
10
    {
11
        return new static('The second argument should be a callable or extend `League\\Fractal\\TransformerAbstract`');
12
    }
13
14
    public static function tooManyArguments(array $arguments)
15
    {
16
        $argumentCount = count($arguments);
17
18
        return new static("You passed {$argumentCount} to `fractal()`. The maximum amount of arguments is 3.");
19
    }
20
21
    public static function invalidTransformer()
22
    {
23
        return new static('The second argument should be a callable or extend `League\\Fractal\\TransformerAbstract`');
24
    }
25
}
26