Sns   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 16
ccs 0
cts 4
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __get() 0 7 2
1
<?php
2
3
namespace EasyIM\TencentIM\Sns;
4
5
use EasyIM\Kernel\Exceptions\InvalidArgumentException;
6
7
/**
8
 * Class Sns
9
 *
10
 * @package EasyIM\TencentIM\Sns
11
 * @author  longing <[email protected]>
12
 */
13
class Sns extends Client
14
{
15
    /**
16
     *
17
     * @param string $property
18
     *
19
     * @return mixed
20
     * @throws InvalidArgumentException
21
     */
22
    public function __get(string $property)
23
    {
24
        if (isset($this->app["sns.{$property}"])) {
25
            return $this->app["sns.{$property}"];
26
        }
27
28
        throw new InvalidArgumentException(sprintf('No Sns service named "%s".', $property));
29
    }
30
}
31