Issues (924)

classes/class-admin.php (14 issues)

1
<?php
2
/**
3
 * LSX_Sharing_Admin
4
 *
5
 * @package lsx-sharing
6
 */
7
8
namespace lsx\sharing\classes;
9
10
/**
11
 * LSX Sharing admin class.
12
 *
13
 * @package lsx-sharing
14
 */
15
class Admin {
16
17
18
    /**
19
     * Holds class instance.
20
     *
21
     * @var object \lsx\sharing\classes\Admin()
22
     */
23
    protected static $instance = null;
0 ignored issues
show
Expected 1 blank line(s) before first member var; 2 found
Loading history...
24
25
    /**
26
     * Holds Settings Theme Instance
27
     *
28
     * @var object \lsx\sharing\classes\admin\Settings_Theme()
29
     */
30
    public $settings_theme = false;
31
32
    /**
33
     * Holds Settings Instance
34
     *
35
     * @var object \lsx\sharing\classes\admin\Settings()
36
     */
37
    public $settings = false;
38
39
    /**
40
     * Constructor.
41
     */
42
    public function __construct() {
0 ignored issues
show
Expected 2 blank lines before function; 1 found
Loading history...
43
         $this->load_classes();
0 ignored issues
show
Found precision alignment of 1 spaces.
Loading history...
44
    }
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
45
46
    /**
47
     * Return an instance of this class.
48
     *
49
     * @since 1.0.0
50
     *
51
     * @return object \lsx\sharing\Admin()    A single instance of this class.
52
     */
53
    public static function get_instance() {
54
         // If the single instance hasn't been set, set it now.
0 ignored issues
show
Found precision alignment of 1 spaces.
Loading history...
55
        if ( null === self::$instance ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
56
            self::$instance = new self();
57
        }
0 ignored issues
show
No blank line found after control structure
Loading history...
58
        return self::$instance;
59
    }
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
60
61
    /**
62
     * Loads the plugin functions.
63
     */
64
    private function load_classes() {
65
         include_once LSX_SHARING_PATH . '/classes/admin/class-settings-theme.php';
0 ignored issues
show
Found precision alignment of 1 spaces.
Loading history...
66
        $this->settings_theme = \lsx\sharing\classes\admin\Settings_Theme::get_instance();
67
        include_once LSX_SHARING_PATH . '/classes/admin/class-settings.php';
68
        $this->settings = \lsx\sharing\classes\admin\Settings::get_instance();
69
    }
0 ignored issues
show
Expected 2 blank lines after function; 0 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
70
}
71