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

Shareable::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
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