Passed
Push — develop ( 9b34d5...d2e65e )
by Paul
02:50
created
src/PostType/Columns.php 1 patch
Spacing   +12 added lines, -12 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
 		}
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 	protected function getColumnThumbnail( $postId )
53 53
 	{
54 54
 		if( has_post_thumbnail( $postId ) ) {
55
-			list( $src, $width, $height ) = wp_get_attachment_image_src( get_post_thumbnail_id( $postId ), [96, 48] );
55
+			list( $src, $width, $height ) = wp_get_attachment_image_src( get_post_thumbnail_id( $postId ), [ 96, 48 ] );
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.