Completed
Push — master ( 5444fa...96b4a5 )
by Freek
03:22 queued 01:35
created

Response   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 2
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A headers() 0 8 2
1
<?php
2
3
namespace Spatie\Fractal;
4
5
use Illuminate\Http\JsonResponse;
6
7
class Response extends JsonResponse
8
{
9
    /**
10
     * Set multiple headers at once.
11
     *
12
     * @param  array $headers
13
     *
14
     * @return self
15
     */
16
    public function headers($headers)
17
    {
18
        foreach ($headers as $key => $value) {
19
            $this->header($key, $value);
20
        }
21
22
        return $this;
23
    }
24
}
25