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

LogsTable::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
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\LogsTable as WPLogsTable;
16
17
/**
18
 * Logs table.
19
 *
20
 * @author Beñat Espiña <[email protected]>
21
 */
22
class LogsTable implements Component
23
{
24
    /**
25
     * The storage.
26
     *
27
     * @var Storage
28
     */
29
    private $storage;
30
31
    /**
32
     * The form type name.
33
     *
34
     * @var string
35
     */
36
    private $formType;
37
38
    /**
39
     * Constructor.
40
     *
41
     * @param string  $formType The form type name
42
     * @param Storage $storage  The storage
43
     */
44
    public function __construct($formType, Storage $storage)
45
    {
46
        $this->formType = $formType;
47
        $this->storage = $storage;
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function load()
54
    {
55
        return new WPLogsTable($this->formType, $this->storage);
56
    }
57
}
58