Passed
Pull Request — master (#16)
by Glynn
02:35
created
src/Page/Menu_Page.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @param View $view  View
100 100
 	 * @return self
101 101
 	 */
102
-	public function set_view( View $view ): self {
102
+	public function set_view(View $view): self {
103 103
 		$this->view = $view;
104 104
 		return $this;
105 105
 	}
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 	 * @return string
116 116
 	 */
117 117
 	public function slug(): string {
118
-		if ( $this->page_slug === null ) {
119
-			throw Page_Exception::undefined_property( 'page_slug', $this );
118
+		if ($this->page_slug === null) {
119
+			throw Page_Exception::undefined_property('page_slug', $this);
120 120
 		}
121 121
 		return $this->page_slug;
122 122
 	}
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
 	 * @return string
126 126
 	 */
127 127
 	public function menu_title(): string {
128
-		if ( $this->menu_title === null ) {
129
-			throw Page_Exception::undefined_property( 'menu_title', $this );
128
+		if ($this->menu_title === null) {
129
+			throw Page_Exception::undefined_property('menu_title', $this);
130 130
 		}
131 131
 		return $this->menu_title;
132 132
 	}
@@ -160,16 +160,16 @@  discard block
 block discarded – undo
160 160
 	 * @throws Page_Exception code 201 if template not defined.
161 161
 	 */
162 162
 	public function render_view(): callable {
163
-		if ( null === $this->view ) {
164
-			throw Page_Exception::view_not_set( $this );
163
+		if (null === $this->view) {
164
+			throw Page_Exception::view_not_set($this);
165 165
 		}
166 166
 
167
-		if ( null === $this->view_template ) {
168
-			throw Page_Exception::undefined_property( 'view_template', $this );
167
+		if (null === $this->view_template) {
168
+			throw Page_Exception::undefined_property('view_template', $this);
169 169
 		}
170 170
 
171 171
 		return function() {
172
-			$this->view->render( $this->view_template, $this->view_data );
172
+			$this->view->render($this->view_template, $this->view_data);
173 173
 		};
174 174
 
175 175
 	}
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	 * @return void
182 182
 	 * @codeCoverageIgnore This can be tested as it does nothing and is extended only
183 183
 	 */
184
-	public function enqueue( Page $page ): void {
184
+	public function enqueue(Page $page): void {
185 185
 		// Do nothing.
186 186
 		// Can be extended in any child class that extends.
187 187
 	}
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	 * @return void
194 194
 	 * @codeCoverageIgnore This can be tested as it does nothing and is extended only
195 195
 	 */
196
-	public function load( Page $page ): void {
196
+	public function load(Page $page): void {
197 197
 		// Do nothing.
198 198
 		// Can be extended in any child class that extends.
199 199
 	}
Please login to merge, or discard this patch.
src/Page/Page.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,12 +58,12 @@
 block discarded – undo
58 58
 	 * @param Page $page
59 59
 	 * @return void
60 60
 	 */
61
-	public function enqueue( Page $page ): void;
61
+	public function enqueue(Page $page): void;
62 62
 
63 63
 	/**
64 64
 	 * @param Page $page
65 65
 	 * @return void
66 66
 	 */
67
-	public function load( Page $page ): void;
67
+	public function load(Page $page): void;
68 68
 
69 69
 }
Please login to merge, or discard this patch.