Completed
Pull Request — develop (#230)
by Franck
07:45
created

SlideLayout   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 31
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
/**
3
 * This file is part of PHPPresentation - A pure PHP library for reading and writing
4
 * presentations documents.
5
 *
6
 * PHPPresentation is free software distributed under the terms of the GNU Lesser
7
 * General Public License version 3 as published by the Free Software Foundation.
8
 *
9
 * For the full copyright and license information, please read the LICENSE
10
 * file that was distributed with this source code. For the full list of
11
 * contributors, visit https://github.com/PHPOffice/PHPPresentation/contributors.
12
 *
13
 * @link        https://github.com/PHPOffice/PHPPresentation
14
 * @copyright   2009-2015 PHPPresentation contributors
15
 * @license     http://www.gnu.org/licenses/lgpl.txt LGPL version 3
16
 */
17
namespace PhpOffice\PhpPresentation\Slide;
18
19
use PhpOffice\PhpPresentation\ComparableInterface;
20
use PhpOffice\PhpPresentation\ShapeContainerInterface;
21
22
class SlideLayout extends AbstractSlide implements ComparableInterface, ShapeContainerInterface
23
{
24
    protected $slideMaster;
25
    /**
26
     * Slide relation ID (should not be used by user code!)
27
     *
28
     * @var string
29
     */
30
    public $relationId;
31
    /**
32
     * Slide layout NR (should not be used by user code!)
33
     *
34
     * @var int
35
     */
36
    public $layoutNr;
37
38
    /**
39
     * Create a new slideLayout
40
     *
41
     * @param SlideMaster $pSlideMaster
42
     */
43 191
    public function __construct(SlideMaster $pSlideMaster)
44
    {
45
        // Set parent
46 191
        $this->slideMaster = $pSlideMaster;
47
        // Shape collection
48 191
        $this->shapeCollection = new \ArrayObject();
49
        // Set identifier
50 191
        $this->identifier = md5(rand(0, 9999) . time());
51 191
    }
52
}
53