Completed
Push — master ( 5e98ad...5c516d )
by Alexey
04:03
created

SocialHelper::checkAppAccess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Social helper
5
 *
6
 * @author Alexey Krupskiy <[email protected]>
7
 * @link http://inji.ru/
8
 * @copyright 2015 Alexey Krupskiy
9
 * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
10
 */
11
12
namespace Users;
13
14
class SocialHelper extends \Object
15
{
16
    public static function getObject()
17
    {
18
        $class = get_called_class();
19
        $class = substr($class, strrpos($class, '\\') + 1);
20
        $object = Social::get($class, 'object_name');
21
        return $object;
22
    }
23
24
    public static function getConfig()
25
    {
26
        $object = static::getObject();
27
        $configs = [];
28
        foreach ($object->configs as $config) {
29
            $configs[$config->name] = $config->value;
30
        }
31
        return $configs;
32
    }
33
34
    public static function checkAppAccess()
35
    {
36
        return false;
37
    }
38
39
}
40