FormatHelper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 7
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A formatData() 0 5 1
1
<?php
2
3
namespace App\Helper;
4
5
/**
6
 * Class FormatHelper
7
 * @package App\Helper
8
 * @author Lars <[email protected]> Riße
9
 */
10
class FormatHelper
11
{
12
    public static function formatData($data, $success = true, $status = 200)
13
    {
14
        $content = array("success" => $success, "data" => $data);
15
16
        return response($content, $status);
0 ignored issues
show
Bug introduced by
$content of type array is incompatible with the type string expected by parameter $content of response(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

16
        return response(/** @scrutinizer ignore-type */ $content, $status);
Loading history...
17
    }
18
}