Passed
Push — feature/rebusify ( 639d49...fe0687 )
by Paul
04:51
created
plugin/Controllers/RebusifyController.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
      * @return void
14 14
      * @action site-reviews/review/created
15 15
      */
16
-    public function onCreated(Review $review)
16
+    public function onCreated( Review $review )
17 17
     {
18
-        if ($this->canProceed($review) && 'publish' === $review->status) {
19
-            $result = glsr(Rebusify::class)->sendReview($review);
18
+        if( $this->canProceed( $review ) && 'publish' === $review->status ) {
19
+            $result = glsr( Rebusify::class )->sendReview( $review );
20 20
             // @todo
21 21
         }
22 22
     }
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
      * @return void
27 27
      * @action site-reviews/review/reverted
28 28
      */
29
-    public function onReverted(Review $review)
29
+    public function onReverted( Review $review )
30 30
     {
31
-        if ($this->canProceed($review) && 'publish' === $review->status) {
32
-            $result = glsr(Rebusify::class)->sendReview($review);
31
+        if( $this->canProceed( $review ) && 'publish' === $review->status ) {
32
+            $result = glsr( Rebusify::class )->sendReview( $review );
33 33
             // @todo
34 34
         }
35 35
     }
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
      * @return void
40 40
      * @action site-reviews/review/saved
41 41
      */
42
-    public function onSaved(Review $review)
42
+    public function onSaved( Review $review )
43 43
     {
44
-        if ($this->canProceed($review) && 'publish' === $review->status) {
45
-            $result = glsr(Rebusify::class)->sendReview($review);
44
+        if( $this->canProceed( $review ) && 'publish' === $review->status ) {
45
+            $result = glsr( Rebusify::class )->sendReview( $review );
46 46
             // @todo
47 47
         }
48 48
     }
@@ -56,23 +56,23 @@  discard block
 block discarded – undo
56 56
      * @return void
57 57
      * @action updated_postmeta
58 58
      */
59
-    public function onUpdatedMeta($metaId, $postId, $metaKey, $metaValue)
59
+    public function onUpdatedMeta( $metaId, $postId, $metaKey, $metaValue )
60 60
     {
61
-        if (!$this->isReviewPostId($postId) 
62
-            || !$this->canProceed($review) 
63
-            || '_response' !== $metaKey) {
61
+        if( !$this->isReviewPostId( $postId ) 
62
+            || !$this->canProceed( $review ) 
63
+            || '_response' !== $metaKey ) {
64 64
             return;
65 65
         }
66
-        $review = glsr_get_review($postId);
67
-        $result = glsr(Rebusify::class)->sendReviewResponse($review);
66
+        $review = glsr_get_review( $postId );
67
+        $result = glsr( Rebusify::class )->sendReviewResponse( $review );
68 68
         // @todo
69 69
     }
70 70
 
71 71
     /**
72 72
      * @return bool
73 73
      */
74
-    protected function canProceed(Review $review)
74
+    protected function canProceed( Review $review )
75 75
     {
76
-        return glsr(OptionManager::class)->getBool('settings.general.support.rebusify');
76
+        return glsr( OptionManager::class )->getBool( 'settings.general.support.rebusify' );
77 77
     }
78 78
 }
Please login to merge, or discard this patch.