Completed
Push — master ( fa76da...5eff2a )
by Mr
02:04
created

Error::allowed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 4
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 6
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Resova\Models;
4
5
use Resova\Model;
6
7
class Error extends Model
8
{
9
10
    /**
11
     * List of allowed fields
12
     *
13
     * @return array
14
     */
15
    public function allowed(): array
16
    {
17
        return [
18
            'type'              => 'string', // type of error returned. Can be: 'api_error', 'authentication_error', 'not_found_error', 'validation_error' or 'rate_limit_error'.
19
            'message'           => 'string', // A message providing more details about the error.
20
            'validation_failed' => 'string', // For validation errors this will provide details on what validation failed.
21
        ];
22
    }
23
}
24