Passed
Push — develop ( 58bbcd...d3905b )
by Paul
02:49
created
src/Helper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 	 */
14 14
 	public function buildClassName( $name, $path = '' )
15 15
 	{
16
-		$className = array_map( 'ucfirst', array_map( 'strtolower', preg_split( '/[-_]/', $name )));
16
+		$className = array_map( 'ucfirst', array_map( 'strtolower', preg_split( '/[-_]/', $name ) ) );
17 17
 		$className = implode( '', $className );
18 18
 		return !empty( $path )
19
-			? str_replace( '\\\\', '\\', sprintf( '%s\%s', $path, $className ))
19
+			? str_replace( '\\\\', '\\', sprintf( '%s\%s', $path, $className ) )
20 20
 			: $className;
21 21
 	}
22 22
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 */
28 28
 	public function buildMethodName( $name, $prefix = 'get' )
29 29
 	{
30
-		return lcfirst( $this->buildClassName( $prefix . '-' . $name ));
30
+		return lcfirst( $this->buildClassName( $prefix . '-' . $name ) );
31 31
 	}
32 32
 
33 33
 	/**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function startsWith( $needle, $haystack )
78 78
 	{
79
-		return substr( $haystack, 0, strlen( $needle )) === $needle;
79
+		return substr( $haystack, 0, strlen( $needle ) ) === $needle;
80 80
 	}
81 81
 
82 82
 	/**
Please login to merge, or discard this patch.
src/Controller.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	 */
27 27
 	public function filterWordPressFooter( $text )
28 28
 	{
29
-		if( $this->app->config['remove_wordpress_footer'] )return;
29
+		if( $this->app->config[ 'remove_wordpress_footer' ] )return;
30 30
 		return $text;
31 31
 	}
32 32
 
@@ -43,17 +43,17 @@  discard block
 block discarded – undo
43 43
 
44 44
 		wp_enqueue_style( 'pollux/main.css',
45 45
 			$this->app->url( 'assets/main.css' ),
46
-			apply_filters( 'pollux/enqueue/css/deps', [] ),
46
+			apply_filters( 'pollux/enqueue/css/deps', [ ] ),
47 47
 			$this->app->version
48 48
 		);
49 49
 		wp_enqueue_script( 'pollux/main.js',
50 50
 			$this->app->url( 'assets/main.js' ),
51
-			apply_filters( 'pollux/enqueue/js/deps', [] ),
51
+			apply_filters( 'pollux/enqueue/js/deps', [ ] ),
52 52
 			$this->app->version
53 53
 		);
54 54
 		wp_localize_script( 'pollux/main.js',
55 55
 			apply_filters( 'pollux/enqueue/js/localize/name', $this->app->id ),
56
-			apply_filters( 'pollux/enqueue/js/localize/variables', [] )
56
+			apply_filters( 'pollux/enqueue/js/localize/variables', [ ] )
57 57
 		);
58 58
 	}
59 59
 
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function removeDashboardWidgets()
65 65
 	{
66
-		if( !$this->app->config['remove_dashboard_widgets'] )return;
66
+		if( !$this->app->config[ 'remove_dashboard_widgets' ] )return;
67 67
 		$widgets = apply_filters( 'pollux/dashoard/widgets', [
68 68
 			'dashboard_primary',
69 69
 			'dashboard_quick_press',
70
-		]);
70
+		] );
71 71
 		foreach( $widgets as $widget ) {
72 72
 			remove_meta_box( $widget, 'dashboard', 'normal' );
73 73
 		}
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function removeWordPressMenu()
81 81
 	{
82
-		if( !$this->app->config['remove_wordpress_menu'] )return;
82
+		if( !$this->app->config[ 'remove_wordpress_menu' ] )return;
83 83
 		global $wp_admin_bar;
84 84
 		$wp_admin_bar->remove_menu( 'wp-logo' );
85 85
 	}
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 */
90 90
 	protected function registerArchiveAssets( WP_Screen $screen )
91 91
 	{
92
-		if(( new Helper )->endsWith( '_archive', $screen->id ) && $screen->pagenow == 'edit.php' ) {
92
+		if( ( new Helper )->endsWith( '_archive', $screen->id ) && $screen->pagenow == 'edit.php' ) {
93 93
 			wp_enqueue_script( 'common' );
94 94
 			wp_enqueue_script( 'editor-expand' );
95 95
 			wp_enqueue_script( 'post' );
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	protected function registerSettingsAssets( WP_Screen $screen )
108 108
 	{
109
-		if( $screen->id == sprintf( 'toplevel_page_%s', Settings::id() )) {
109
+		if( $screen->id == sprintf( 'toplevel_page_%s', Settings::id() ) ) {
110 110
 			wp_enqueue_script( 'common' );
111 111
 			wp_enqueue_script( 'postbox' );
112 112
 			wp_enqueue_script( 'wp-lists' );
Please login to merge, or discard this patch.