@@ -41,7 +41,9 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function send( Review $review ) |
| 43 | 43 | { |
| 44 | - if( empty( $this->types ))return; |
|
| 44 | + if( empty( $this->types )) { |
|
| 45 | + return; |
|
| 46 | + } |
|
| 45 | 47 | $this->review = $review; |
| 46 | 48 | $args = [ |
| 47 | 49 | 'link' => $this->getLink(), |
@@ -35,7 +35,9 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function compose( Review $review, array $notification ) |
| 37 | 37 | { |
| 38 | - if( empty( $this->endpoint ))return; |
|
| 38 | + if( empty( $this->endpoint )) { |
|
| 39 | + return; |
|
| 40 | + } |
|
| 39 | 41 | $this->review = $review; |
| 40 | 42 | $args = shortcode_atts( glsr( SlackDefaults::class )->defaults(), $notification ); |
| 41 | 43 | $notification = [ |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | glsr( Session::class )->set( $command->form_id.'message', __( 'Your review has been submitted!', 'site-reviews' )); |
| 24 | 24 | glsr( Notification::class )->send( $review ); |
| 25 | 25 | do_action( 'site-reviews/local/review/submitted', $review ); |
| 26 | - if( $command->ajax_request )return; |
|
| 26 | + if( $command->ajax_request ) { |
|
| 27 | + return; |
|
| 28 | + } |
|
| 27 | 29 | if( empty( $command->referer )) { |
| 28 | 30 | glsr_log()->warning( 'The form referer ($_SERVER[REQUEST_URI]) was empty.' )->info( $command ); |
| 29 | 31 | $command->referer = home_url(); |