Completed
Pull Request — master (#2)
by Beñat
02:35
created

FormsTable::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the WPSymfonyForm plugin.
5
 *
6
 * Copyright (c) 2015-2016 LIN3S <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace LIN3S\WPSymfonyForm\Admin\Views\Components;
13
14
use LIN3S\WPSymfonyForm\Admin\Storage\Storage;
15
use LIN3S\WPSymfonyForm\Admin\Views\Components\WpListTables\FormsTable as WPFormsTable;
16
17
/**
18
 * Forms table.
19
 *
20
 * @author Beñat Espiña <[email protected]>
21
 */
22
class FormsTable implements Component
23
{
24
    /**
25
     * The storage.
26
     *
27
     * @var Storage
28
     */
29
    private $storage;
30
31
    /**
32
     * Constructor.
33
     *
34
     * @param Storage $storage The storage
35
     */
36
    public function __construct(Storage $storage)
37
    {
38
        $this->storage = $storage;
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function load()
45
    {
46
        return new WPFormsTable($this->storage);
47
    }
48
}
49