Completed
Push — develop ( a47963...24fb5b )
by Paul
03:05
created
src/MetaBox/SiteMetaManager.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 	public function __construct()
21 21
 	{
22
-		$this->options = get_option( Settings::id(), [] );
22
+		$this->options = get_option( Settings::id(), [ ] );
23 23
 	}
24 24
 
25 25
 	/**
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 	{
31 31
 		$args = array_pad( $args, 2, null );
32 32
 		$group = $this->$group;
33
-		if( is_object( $group )) {
33
+		if( is_object( $group ) ) {
34 34
 			return $group;
35 35
 		}
36
-		return $this->get( $group, $args[0], $args[1] );
36
+		return $this->get( $group, $args[ 0 ], $args[ 1 ] );
37 37
 	}
38 38
 
39 39
 	/**
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
 		if( $group == 'all' ) {
46 46
 			return (object) $this->options;
47 47
 		}
48
-		if( empty( $group )) {
48
+		if( empty( $group ) ) {
49 49
 			$group = $this->getDefaultGroup();
50 50
 		}
51
-		if( is_array( $group )) {
51
+		if( is_array( $group ) ) {
52 52
 			$group = reset( $group );
53 53
 		}
54
-		return isset( $this->options[$group] )
55
-			? $this->options[$group]
54
+		return isset( $this->options[ $group ] )
55
+			? $this->options[ $group ]
56 56
 			: null;
57 57
 	}
58 58
 
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
 		if( func_num_args() < 1 ) {
68 68
 			return $this->all;
69 69
 		}
70
-		if( is_string( $group )) {
70
+		if( is_string( $group ) ) {
71 71
 			$group = $this->$group;
72 72
 		}
73
-		if( !is_array( $group )) {
73
+		if( !is_array( $group ) ) {
74 74
 			return $fallback;
75 75
 		}
76
-		if( is_null( $key )) {
76
+		if( is_null( $key ) ) {
77 77
 			return $group;
78 78
 		}
79 79
 		return $this->getValue( $group, $key, $fallback );
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 	 */
95 95
 	protected function getValue( array $group, $key, $fallback )
96 96
 	{
97
-		if( !array_key_exists( $key, $group )) {
97
+		if( !array_key_exists( $key, $group ) ) {
98 98
 			return $fallback;
99 99
 		}
100
-		return empty( $group[$key] ) && !is_null( $fallback )
100
+		return empty( $group[ $key ] ) && !is_null( $fallback )
101 101
 			? $fallback
102
-			: $group[$key];
102
+			: $group[ $key ];
103 103
 	}
104 104
 }
Please login to merge, or discard this patch.
src/PostType/Columns.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	/**
15 15
 	 * @var array
16 16
 	 */
17
-	public $columns = [];
17
+	public $columns = [ ];
18 18
 
19 19
 	/**
20 20
 	 * @var void
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 	public function initColumns()
23 23
 	{
24 24
 		foreach( $this->types as $type => $args ) {
25
-			add_action( "manage_{$type}_posts_custom_column", [$this, 'printColumnValue'], 10, 2 );
25
+			add_action( "manage_{$type}_posts_custom_column", [ $this, 'printColumnValue' ], 10, 2 );
26 26
 			add_filter( "manage_{$type}_posts_columns", function( $columns ) use( $args ) {
27
-				return count( $args['columns'] ) > 1
28
-					? $args['columns']
27
+				return count( $args[ 'columns' ] ) > 1
28
+					? $args[ 'columns' ]
29 29
 					: $columns;
30 30
 			});
31 31
 		}
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 		if( has_post_thumbnail( $postId ) ) {
55 55
 			list( $src, $width, $height ) = wp_get_attachment_image_src( get_post_thumbnail_id( $postId ), 'thumbnail' );
56 56
 			$thumbnail = sprintf( '<img src="%s" alt="%s" width="%s" height="%s">',
57
-				esc_url( set_url_scheme( $src )),
58
-				esc_attr( get_the_title( $postId )),
57
+				esc_url( set_url_scheme( $src ) ),
58
+				esc_attr( get_the_title( $postId ) ),
59 59
 				$width,
60 60
 				$height
61 61
 			);
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
 	protected function getColumnMedia()
72 72
 	{
73 73
 		return count( PostMeta::get( 'media', [
74
-			'fallback' => [],
74
+			'fallback' => [ ],
75 75
 			'single' => false,
76
-		]));
76
+		] ) );
77 77
 	}
78 78
 
79 79
 	/**
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 	protected function normalizeColumns( array $columns )
92 92
 	{
93 93
 		$columns = array_flip( $columns );
94
-		$columns = array_merge( $columns, array_intersect_key( $this->columns, $columns ));
95
-		return ['cb' => '<input type="checkbox">'] + $columns;
94
+		$columns = array_merge( $columns, array_intersect_key( $this->columns, $columns ) );
95
+		return [ 'cb' => '<input type="checkbox">' ] + $columns;
96 96
 	}
97 97
 
98 98
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		$defaults = [
104 104
 			'author' => __( 'Author', 'pollux' ),
105 105
 			'categories' => __( 'Categories', 'pollux' ),
106
-			'comments' => sprintf( '<span class="vers comment-grey-bubble" title="%1$s"><span class="screen-reader-text">%1$s</span></span>', __( 'Comments', 'pollux' )),
106
+			'comments' => sprintf( '<span class="vers comment-grey-bubble" title="%1$s"><span class="screen-reader-text">%1$s</span></span>', __( 'Comments', 'pollux' ) ),
107 107
 			'date' => __( 'Date', 'pollux' ),
108 108
 			'media' => __( 'Media', 'pollux' ),
109 109
 			'slug' => __( 'Slug', 'pollux' ),
Please login to merge, or discard this patch.