Consumer::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * The MIT License
4
 * Copyright (c) 2007 Andy Smith
5
 */
6
namespace Abraham\TwitterOAuth;
7
8
class Consumer
9
{
10
    /** @var string  */
11
    public $key;
12
    /** @var string  */
13
    public $secret;
14
    /** @var string|null  */
15
    public $callbackUrl;
16
17
    /**
18
     * @param string $key
19
     * @param string $secret
20
     * @param null $callbackUrl
21
     */
22
    public function __construct($key, $secret, $callbackUrl = null)
23
    {
24
        $this->key = $key;
25
        $this->secret = $secret;
26
        $this->callbackUrl = $callbackUrl;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function __toString()
33
    {
34
        return "Consumer[key=$this->key,secret=$this->secret]";
35
    }
36
}
37