Errors   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getModelNotFound() 0 6 1
1
<?php
2
3
namespace SoliDry\Helpers;
4
5
use SoliDry\Extension\JSONApiInterface;
6
7
/**
8
 * Class Errors
9
 *
10
 * @package SoliDry\Helpers
11
 */
12
class Errors
13
{
14
15
    /**
16
     * @param string $entity
17
     * @param $id
18
     * @return array
19
     */
20
    public function getModelNotFound(string $entity, $id): array
21
    {
22
        return [
23
            [
24
                JSONApiInterface::ERROR_TITLE => 'Database object ' . $entity . ' with $id = ' . $id .
25
                    ' - not found.',
26
            ],
27
        ];
28
    }
29
}