Passed
Push — master ( a9e365...6c4de8 )
by Paul
02:25
created
src/Config.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,9 @@
 block discarded – undo
65 65
 			trailingslashit( dirname( ABSPATH )),
66 66
 		]);
67 67
 		foreach( (array) $configLocations as $location ) {
68
-			if( !file_exists( $location . $configYaml ))continue;
68
+			if( !file_exists( $location . $configYaml )) {
69
+				continue;
70
+			}
69 71
 			return $location . $configYaml;
70 72
 		}
71 73
 		return $this->app->path( 'defaults.yml' );
Please login to merge, or discard this patch.
src/Settings.php 1 patch
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -105,7 +105,9 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public function register( $metaboxes = [] )
107 107
 	{
108
-		if( get_current_screen()->id != $this->hook )return;
108
+		if( get_current_screen()->id != $this->hook ) {
109
+			return;
110
+		}
109 111
 		foreach( parent::register() as $metabox ) {
110 112
 			new SettingsMetaBox( $metabox );
111 113
 		}
@@ -172,7 +174,9 @@  discard block
 block discarded – undo
172 174
 	{
173 175
 		if( filter_input( INPUT_GET, 'page' ) !== static::ID
174 176
 			|| filter_input( INPUT_GET, 'action' ) !== 'reset'
175
-		)return;
177
+		) {
178
+			return;
179
+		}
176 180
 		if( wp_verify_nonce( filter_input( INPUT_GET, '_wpnonce' ), $this->hook )) {
177 181
 			update_option( static::ID, $this->getDefaults() );
178 182
 			return add_settings_error( static::ID, 'reset', __( 'Settings reset to defaults.', 'pollux' ), 'updated' );
@@ -186,7 +190,8 @@  discard block
 block discarded – undo
186 190
 	 */
187 191
 	protected function filterArrayByKey( array $array, $key )
188 192
 	{
189
-		return array_filter( $array, function( $value ) use( $key ) {
193
+		return array_filter( $array, function( $value ) use( $key )
194
+		{
190 195
 			return !empty( $value[$key] );
191 196
 		});
192 197
 	}
@@ -198,8 +203,10 @@  discard block
 block discarded – undo
198 203
 	{
199 204
 		$metaboxes = $this->filterArrayByKey( $this->metaboxes, 'slug' );
200 205
 
201
-		array_walk( $metaboxes, function( &$metabox ) {
202
-			$fields = array_map( function( $field ) {
206
+		array_walk( $metaboxes, function( &$metabox )
207
+		{
208
+			$fields = array_map( function( $field )
209
+			{
203 210
 				$field = wp_parse_args( $field, ['std' => ''] );
204 211
 				return [$field['slug'] => $field['std']];
205 212
 			}, $this->filterArrayByKey( $metabox['fields'], 'slug' ));
Please login to merge, or discard this patch.