Factory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 28
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A createForPermanentToken() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the zibios/wrike-bundle package.
5
 *
6
 * (c) Zbigniew Ślązak
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zibios\Bundle\WrikeBundle\Api;
13
14
use Zibios\WrikePhpSdk\ApiFactory;
15
16
/**
17
 * Factory.
18
 */
19
class Factory
20
{
21
    /**
22
     * Create Api instance.
23
     *
24
     * @throws \InvalidArgumentException
25
     *
26
     * @return \Zibios\WrikePhpLibrary\Api
27
     */
28 2
    public static function create()
29
    {
30 2
        return ApiFactory::create();
31
    }
32
33
    /**
34
     * Create Api instance with access token.
35
     *
36
     * @param string $token
37
     *
38
     * @throws \InvalidArgumentException
39
     *
40
     * @return \Zibios\WrikePhpLibrary\Api
41
     */
42 2
    public static function createForPermanentToken($token)
43
    {
44 2
        return ApiFactory::create($token);
45
    }
46
}
47