Attachment   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A list() 0 8 1
1
<?php
2
3
namespace Groove\Api;
4
5
use Groove\Api;
6
use Groove\Models\Attachment as Model;
7
8
class Attachment extends Api
9
{
10
    /**
11
     * List attachments.
12
     *
13
     * @param  string $messageID
14
     * @return \Illuminate\Support\Collection
15
     */
16
    public function list($messageID)
17
    {
18
        $response = $this->client->get('attachments', ['message' => $messageID]);
19
20
        return collect($response->attachments)->transform(function ($attachment) {
21
            return new Model($attachment, $this->client);
22
        });
23
    }
24
}
25