Completed
Push — master ( 1092e2...11ab51 )
by Alexander
06:55
created

InvalidTransformerException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Flugg\Responder\Exceptions;
4
5
use Illuminate\Database\Eloquent\Model;
6
use RuntimeException;
7
8
/**
9
 * An exception thrown when the given serializer is not a valid serializer class.
10
 *
11
 * @package flugger/laravel-responder
12
 * @author  Alexander Tømmerås <[email protected]>
13
 * @license The MIT License
14
 */
15
class InvalidTransformerException extends RuntimeException
16
{
17
    /**
18
     * InvalidSerializerException constructor.
19
     *
20
     * @param Model $model
21
     */
22
    public function __construct(Model $model)
23
    {
24
        return parent::__construct('The given transformer does not exist for model [' . get_class($model) . '].');
0 ignored issues
show
Bug introduced by
Constructors do not have meaningful return values, anything that is returned from here is discarded. Are you sure this is correct?
Loading history...
25
    }
26
}