Completed
Push — master ( 29547f...5e0db9 )
by Matthew
02:17
created

Company::all()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Matt
5
 * Date: 20/04/2016
6
 * Time: 2:32 PM
7
 */
8
9
namespace Freshdesk\Resources;
10
11
use Freshdesk\Resources\Traits\AllTrait;
12
use Freshdesk\Resources\Traits\CreateTrait;
13
use Freshdesk\Resources\Traits\DeleteTrait;
14
use Freshdesk\Resources\Traits\UpdateTrait;
15
use Freshdesk\Resources\Traits\ViewTrait;
16
17
/**
18
 * Class CompanyApi
19
 * @internal
20
 * @package Freshdesk
21
 */
22 View Code Duplication
class Company extends AbstractResource
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
23
{
24
25
    use AllTrait, CreateTrait, ViewTrait, UpdateTrait, DeleteTrait;
26
27
    /**
28
     * The resource endpoint
29
     *
30
     * @var string
31
     */
32
    protected $endpoint = '/companies';
33
34
    /**
35
     * List resource fields
36
     *
37
     * @param array|null $query
38
     * @return mixed|null
39
     * @throws \Freshdesk\Exceptions\AccessDeniedException
40
     * @throws \Freshdesk\Exceptions\ApiException
41
     * @throws \Freshdesk\Exceptions\AuthenticationException
42
     * @throws \Freshdesk\Exceptions\ConflictingStateException
43
     * @throws \Freshdesk\Exceptions\NotFoundException
44
     * @throws \Freshdesk\Exceptions\RateLimitExceededException
45
     * @throws \Freshdesk\Exceptions\UnsupportedContentTypeException
46
     * @throws \Freshdesk\Exceptions\MethodNotAllowedException
47
     * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException
48
     * @throws \Freshdesk\Exceptions\ValidationException
49
     */
50
    public function fields(array $query = null)
51
    {
52
        return $this->api->request('GET', '/company_fields', null, $query);
53
    }
54
55
}