Snippet::getCurrentVersion()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: jgulledge
5
 * Date: 10/9/2017
6
 * Time: 4:06 PM
7
 */
8
9
namespace LCI\Blend\Blendable;
10
11
12
class Snippet extends Element
13
{
14
15
    /** @var string  */
16
    protected $opt_cache_key = 'elements/snippets';
17
18
    /** @var string ~ the xPDO class name */
19
    protected $xpdo_simple_object_class = 'modSnippet';
20
21
    /**
22
     * @return \LCI\Blend\Blendable\Snippet
23
     */
24
    public function getCurrentVersion()
25
    {
26
        /** @var \LCI\Blend\Blendable\Snippet $snippet */
27
        $snippet = new self($this->modx, $this->blender, $this->getFieldName());
28
        return $snippet
29
            ->setSeedsDir($this->getSeedsDir());
30
    }
31
}
32