@@ -13,10 +13,10 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |