Passed
Push — feature/rebusify ( 103190...b1503f )
by Paul
05:08 queued 13s
created
plugin/Controllers/WelcomeController.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
      * @return array
13 13
      * @filter plugin_action_links_site-reviews/site-reviews.php
14 14
      */
15
-    public function filterActionLinks(array $links)
15
+    public function filterActionLinks( array $links )
16 16
     {
17
-        $links['welcome'] = glsr(Builder::class)->a(__('About', 'site-reviews'), [
18
-            'href' => admin_url('edit.php?post_type='.Application::POST_TYPE.'&page=welcome'),
19
-        ]);
17
+        $links['welcome'] = glsr( Builder::class )->a( __( 'About', 'site-reviews' ), [
18
+            'href' => admin_url( 'edit.php?post_type='.Application::POST_TYPE.'&page=welcome' ),
19
+        ] );
20 20
         return $links;
21 21
     }
22 22
 
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
      * @return string
25 25
      * @filter admin_title
26 26
      */
27
-    public function filterAdminTitle($title)
27
+    public function filterAdminTitle( $title )
28 28
     {
29 29
         return Application::POST_TYPE.'_page_welcome' == glsr_current_screen()->id
30
-            ? sprintf(__('Welcome to %s — WordPress', 'site-reviews'), glsr()->name)
30
+            ? sprintf( __( 'Welcome to %s — WordPress', 'site-reviews' ), glsr()->name )
31 31
             : $title;
32 32
     }
33 33
 
@@ -36,17 +36,17 @@  discard block
 block discarded – undo
36 36
      * @return string
37 37
      * @filter admin_footer_text
38 38
      */
39
-    public function filterFooterText($text)
39
+    public function filterFooterText( $text )
40 40
     {
41
-        if (Application::POST_TYPE.'_page_welcome' != glsr_current_screen()->id) {
41
+        if( Application::POST_TYPE.'_page_welcome' != glsr_current_screen()->id ) {
42 42
             return $text;
43 43
         }
44 44
         $url = 'https://wordpress.org/support/view/plugin-reviews/site-reviews?filter=5#new-post';
45
-        return wp_kses_post(sprintf(
46
-            __('Please rate %s on %s and help us spread the word. Thank you so much!', 'site-reviews'),
45
+        return wp_kses_post( sprintf(
46
+            __( 'Please rate %s on %s and help us spread the word. Thank you so much!', 'site-reviews' ),
47 47
             '<strong>'.glsr()->name.'</strong> <a href="'.$url.'" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a>',
48 48
             '<a href="'.$url.'" target="_blank">wordpress.org</a>'
49
-        ));
49
+        ) );
50 50
     }
51 51
 
52 52
     /**
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
      * @return void
56 56
      * @action activated_plugin
57 57
      */
58
-    public function redirectOnActivation($plugin, $isNetworkActivation)
58
+    public function redirectOnActivation( $plugin, $isNetworkActivation )
59 59
     {
60
-        if (!$isNetworkActivation
60
+        if( !$isNetworkActivation
61 61
             && 'cli' !== php_sapi_name()
62
-            && $plugin === plugin_basename(glsr()->file)) {
63
-            wp_safe_redirect(admin_url('edit.php?post_type='.Application::POST_TYPE.'&page=welcome'));
62
+            && $plugin === plugin_basename( glsr()->file ) ) {
63
+            wp_safe_redirect( admin_url( 'edit.php?post_type='.Application::POST_TYPE.'&page=welcome' ) );
64 64
             exit;
65 65
         }
66 66
     }
@@ -71,14 +71,14 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function registerPage()
73 73
     {
74
-        add_submenu_page('edit.php?post_type='.Application::POST_TYPE,
75
-            sprintf(__('Welcome to %s', 'site-reviews'), glsr()->name),
74
+        add_submenu_page( 'edit.php?post_type='.Application::POST_TYPE,
75
+            sprintf( __( 'Welcome to %s', 'site-reviews' ), glsr()->name ),
76 76
             glsr()->name,
77
-            glsr()->getPermission('welcome'),
77
+            glsr()->getPermission( 'welcome' ),
78 78
             'welcome',
79 79
             [$this, 'renderPage']
80 80
         );
81
-        remove_submenu_page('edit.php?post_type='.Application::POST_TYPE, 'welcome');
81
+        remove_submenu_page( 'edit.php?post_type='.Application::POST_TYPE, 'welcome' );
82 82
     }
83 83
 
84 84
     /**
@@ -88,18 +88,18 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function renderPage()
90 90
     {
91
-        $tabs = apply_filters('site-reviews/addon/welcome/tabs', [
92
-            'getting-started' => __('Getting Started', 'site-reviews'),
93
-            'whatsnew' => __('What\'s New', 'site-reviews'),
94
-            'support' => __('Support', 'site-reviews'),
95
-        ]);
96
-        glsr()->render('pages/welcome/index', [
91
+        $tabs = apply_filters( 'site-reviews/addon/welcome/tabs', [
92
+            'getting-started' => __( 'Getting Started', 'site-reviews' ),
93
+            'whatsnew' => __( 'What\'s New', 'site-reviews' ),
94
+            'support' => __( 'Support', 'site-reviews' ),
95
+        ] );
96
+        glsr()->render( 'pages/welcome/index', [
97 97
             'data' => [
98 98
                 'context' => [],
99 99
             ],
100
-            'http_referer' => (string) wp_get_referer(),
100
+            'http_referer' => (string)wp_get_referer(),
101 101
             'tabs' => $tabs,
102
-            'template' => glsr(Template::class),
103
-        ]);
102
+            'template' => glsr( Template::class ),
103
+        ] );
104 104
     }
105 105
 }
Please login to merge, or discard this patch.