Passed
Push — master ( 49c8f0...cb0d56 )
by Paul
12:43 queued 06:16
created
plugin/Modules/Session.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,9 @@  discard block
 block discarded – undo
150 150
 		if( !empty( $sessions )) {
151 151
 			$now = time();
152 152
 			foreach( $sessions as $session ) {
153
-				if( $now <= $session->expiration )continue;
153
+				if( $now <= $session->expiration ) {
154
+					continue;
155
+				}
154 156
 				$expiredSessions[] = $session->name;
155 157
 				$expiredSessions[] = str_replace( '_expires_', '_', $session->name );
156 158
 			}
@@ -193,7 +195,9 @@  discard block
 block discarded – undo
193 195
 	 */
194 196
 	protected function setCookie()
195 197
 	{
196
-		if( headers_sent() )return;
198
+		if( headers_sent() ) {
199
+			return;
200
+		}
197 201
 		$cookie = $this->sessionId.static::DELIMITER.$this->expiryTimestamp.static::DELIMITER.$this->expiryTimestampReset;
198 202
 		$cookiePath = preg_replace( '|https?://[^/]+|i', '', trailingslashit( (string)get_option( 'home' )));
199 203
 		setcookie( static::SESSION_COOKIE, $cookie, $this->expiryTimestamp, $cookiePath );
Please login to merge, or discard this patch.
plugin/Modules/Notification.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	public function send( Review $review )
45 45
 	{
46
-		if( empty( $this->types ))return;
46
+		if( empty( $this->types )) {
47
+			return;
48
+		}
47 49
 		$this->review = $review;
48 50
 		$args = [
49 51
 			'link' => $this->getLink(),
@@ -146,7 +148,9 @@  discard block
 block discarded – undo
146 148
 	protected function sendToEmail( array $args )
147 149
 	{
148 150
 		$email = $this->buildEmail( $args );
149
-		if( !$this->email )return;
151
+		if( !$this->email ) {
152
+			return;
153
+		}
150 154
 		if( empty( $email->to )) {
151 155
 			glsr_log()->error( 'Email notification was not sent (missing email address)' );
152 156
 			return;
@@ -161,7 +165,9 @@  discard block
 block discarded – undo
161 165
 	 */
162 166
 	protected function sendToSlack( array $args )
163 167
 	{
164
-		if( !$this->slack )return;
168
+		if( !$this->slack ) {
169
+			return;
170
+		}
165 171
 		$notification = $this->buildSlackNotification( $args );
166 172
 		$result = $notification->send();
167 173
 		if( is_wp_error( $result )) {
Please login to merge, or discard this patch.