@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public static function get_instance() |
22 | 22 | { |
23 | - if( null === static::$instance ) |
|
23 | + if (null === static::$instance) |
|
24 | 24 | { |
25 | 25 | static::$instance = new static(); |
26 | 26 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | public function add_page($args) |
37 | 37 | { |
38 | 38 | $slug = $args['slug']; |
39 | - if(array_key_exists($slug,$this->pages)) |
|
39 | + if (array_key_exists($slug, $this->pages)) |
|
40 | 40 | { |
41 | 41 | throw new \RuntimeException("A page with slug '$slug' has already been registered"); |
42 | 42 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function get_page($slug) |
54 | 54 | { |
55 | - if(!array_key_exists($slug,$this->pages)) |
|
55 | + if (!array_key_exists($slug, $this->pages)) |
|
56 | 56 | { |
57 | 57 | throw new \RuntimeException("The page '$slug' does not exist"); |
58 | 58 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | public function add_child_page($args) |
68 | 68 | { |
69 | 69 | $parent_slug = $args['parent_slug']; |
70 | - if(!array_key_exists($parent_slug, $this->child_pages)) |
|
70 | + if (!array_key_exists($parent_slug, $this->child_pages)) |
|
71 | 71 | { |
72 | 72 | $this->child_pages[$parent_slug] = array(); |
73 | 73 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function get_child_page($slug, $parent_slug) |
86 | 86 | { |
87 | - if(!array_key_exists($parent_slug, $this->child_pages) || |
|
87 | + if (!array_key_exists($parent_slug, $this->child_pages) || |
|
88 | 88 | !array_key_exists($slug, $this->child_pages[$parent_slug])) |
89 | 89 | { |
90 | 90 | throw new \RuntimeException("The child page '$slug' does not exist for the parent '$parent_slug'"); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | public function register_scripts() |
99 | 99 | { |
100 | 100 | \wp_register_style('amarkal-settings', \Amarkal\Core\Utility::path_to_url(__DIR__.'/assets/css/dist/amarkal-settings.min.css')); |
101 | - \wp_register_script('amarkal-settings',\Amarkal\Core\Utility::path_to_url(__DIR__.'/assets/js/dist/amarkal-settings.min.js'),array('amarkal-ui')); |
|
101 | + \wp_register_script('amarkal-settings', \Amarkal\Core\Utility::path_to_url(__DIR__.'/assets/js/dist/amarkal-settings.min.js'), array('amarkal-ui')); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | private function init() |
116 | 116 | { |
117 | - \add_action('admin_init',array($this,'register_scripts')); |
|
117 | + \add_action('admin_init', array($this, 'register_scripts')); |
|
118 | 118 | |
119 | 119 | $rh = RequestHandler::get_instance(); |
120 | 120 | $rh->init(); |