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

Response::headers()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 8
rs 9.4285
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