Completed
Push — master ( 56a90a...da2227 )
by Hong
02:29
created

Shareable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
c 2
b 0
f 1
lcom 0
cbo 2
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
1
<?php
2
/**
3
 * Phossa Project
4
 *
5
 * PHP version 5.4
6
 *
7
 * @category  Library
8
 * @package   Phossa2\Shared
9
 * @copyright Copyright (c) 2016 phossa.com
10
 * @license   http://mit-license.org/ MIT License
11
 * @link      http://www.phossa.com/
12
 */
13
/*# declare(strict_types=1); */
14
15
namespace Phossa2\Shared\Shareable;
16
17
use Phossa2\Shared\Base\ObjectAbstract;
18
19
/**
20
 * Shareable
21
 *
22
 * @package Phossa2\Shared
23
 * @author  Hong Zhang <[email protected]>
24
 * @see     ObjectAbstract
25
 * @see     ShareableInterface
26
 * @version 2.0.10
27
 * @since   2.0.10 added
28
 */
29
class Shareable extends ObjectAbstract implements ShareableInterface
30
{
31
    use ShareableTrait;
32
33
    /**
34
     * minimum constructor
35
     *
36
     * @param  string $scope
37
     * @access public
38
     */
39
    public function __construct(/*# string */ $scope = '')
40
    {
41
        // add scope if not empty
42
        if ('' !== $scope) {
43
            $this->addScope($scope);
44
        }
45
    }
46
}
47