@@ -15,6 +15,5 @@ |
||
15 | 15 | exit; |
16 | 16 | } |
17 | 17 | |
18 | -class ClientException extends \Exception |
|
19 | -{ |
|
18 | +class ClientException extends \Exception { |
|
20 | 19 | } |
@@ -90,7 +90,7 @@ |
||
90 | 90 | |
91 | 91 | $unschedule_expiration = wp_unschedule_hook( $this->hook_name ); |
92 | 92 | |
93 | - if ( false === $unschedule_expiration ){ |
|
93 | + if ( false === $unschedule_expiration ) { |
|
94 | 94 | $this->logging->log( sprintf( 'Could not unschedule event for %s', $this->hook_name ), __METHOD__, 'error' ); |
95 | 95 | return false; |
96 | 96 | } |
@@ -17,6 +17,5 @@ |
||
17 | 17 | exit; |
18 | 18 | } |
19 | 19 | |
20 | -class ConfigException extends \Exception |
|
21 | -{ |
|
20 | +class ConfigException extends \Exception { |
|
22 | 21 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | $new_role = add_role( $new_role_slug, $role_display_name, $capabilities ); |
168 | 168 | |
169 | - if ( ! $new_role ){ |
|
169 | + if ( ! $new_role ) { |
|
170 | 170 | |
171 | 171 | return new WP_Error( |
172 | 172 | 'add_role_failed', |
@@ -181,9 +181,9 @@ discard block |
||
181 | 181 | |
182 | 182 | $remove_caps = $this->config->get_setting( 'caps/remove' ); |
183 | 183 | |
184 | - if ( ! empty( $remove_caps ) ){ |
|
184 | + if ( ! empty( $remove_caps ) ) { |
|
185 | 185 | |
186 | - foreach ( $remove_caps as $remove_cap => $description ){ |
|
186 | + foreach ( $remove_caps as $remove_cap => $description ) { |
|
187 | 187 | $new_role->remove_cap( $remove_cap ); |
188 | 188 | $this->logging->log( 'Capability '. $remove_cap .' removed from role.', __METHOD__, 'info' ); |
189 | 189 | } |
@@ -122,7 +122,7 @@ |
||
122 | 122 | // Before logging-in support, let's make sure the site isn't locked-down or that this request is flagged |
123 | 123 | $is_verified = $security_checks->verify( $user_identifier ); |
124 | 124 | |
125 | - if ( ! $is_verified || is_wp_error( $is_verified ) ){ |
|
125 | + if ( ! $is_verified || is_wp_error( $is_verified ) ) { |
|
126 | 126 | |
127 | 127 | /** |
128 | 128 | * Runs after the identifier fails security checks |
@@ -81,13 +81,13 @@ |
||
81 | 81 | |
82 | 82 | $e_keys = $this->encryption->generate_keys(); |
83 | 83 | |
84 | - if ( is_wp_error( $e_keys ) ){ |
|
84 | + if ( is_wp_error( $e_keys ) ) { |
|
85 | 85 | return $e_keys; |
86 | 86 | } |
87 | 87 | |
88 | 88 | $nonce = $this->encryption->get_nonce(); |
89 | 89 | |
90 | - if ( is_wp_error( $nonce ) ){ |
|
90 | + if ( is_wp_error( $nonce ) ) { |
|
91 | 91 | return $nonce; |
92 | 92 | } |
93 | 93 |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | $user_identifier = $passed_user_identifier; |
85 | 85 | |
86 | - if ( $this->in_lockdown() ){ |
|
86 | + if ( $this->in_lockdown() ) { |
|
87 | 87 | |
88 | 88 | $this->logging->log( 'Site is in lockdown mode, aborting login.', __METHOD__, 'error' ); |
89 | 89 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $approved = $this->check_approved_identifier( $secret_id ); |
112 | 112 | |
113 | 113 | // Don't lock-down the site, since there could have been errors related to remote validation |
114 | - if ( is_wp_error( $approved ) ){ |
|
114 | + if ( is_wp_error( $approved ) ) { |
|
115 | 115 | |
116 | 116 | $this->logging->log( |
117 | 117 | sprintf( |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | |
303 | 303 | $notified = $this->report_lockdown(); |
304 | 304 | |
305 | - if ( is_wp_error( $notified ) ){ |
|
305 | + if ( is_wp_error( $notified ) ) { |
|
306 | 306 | $this->logging->log( sprintf( 'Could not notify TrustedLogin (%s)', $notified->get_error_message() ), __METHOD__, 'error' ); |
307 | 307 | } |
308 | 308 | |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | * |
356 | 356 | * @return int|false Int: in lockdown. The value returned is the timestamp when lockdown ends. False: not in lockdown, or overridden by a constant. |
357 | 357 | */ |
358 | - public function in_lockdown(){ |
|
358 | + public function in_lockdown() { |
|
359 | 359 | |
360 | 360 | if ( $this->in_local_development() ) { |
361 | 361 | return false; |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | * reduce boilerplate code that a simple Logger that does the same thing with |
16 | 16 | * messages regardless of the error level has to implement. |
17 | 17 | */ |
18 | -abstract class AbstractLogger implements LoggerInterface |
|
19 | -{ |
|
18 | +abstract class AbstractLogger implements LoggerInterface { |
|
20 | 19 | /** |
21 | 20 | * System is unusable. |
22 | 21 | * |
@@ -25,8 +24,7 @@ discard block |
||
25 | 24 | * |
26 | 25 | * @return void |
27 | 26 | */ |
28 | - public function emergency($message, array $context = array()) |
|
29 | - { |
|
27 | + public function emergency($message, array $context = array()) { |
|
30 | 28 | $this->log(LogLevel::EMERGENCY, $message, $context); |
31 | 29 | } |
32 | 30 | |
@@ -41,8 +39,7 @@ discard block |
||
41 | 39 | * |
42 | 40 | * @return void |
43 | 41 | */ |
44 | - public function alert($message, array $context = array()) |
|
45 | - { |
|
42 | + public function alert($message, array $context = array()) { |
|
46 | 43 | $this->log(LogLevel::ALERT, $message, $context); |
47 | 44 | } |
48 | 45 | |
@@ -56,8 +53,7 @@ discard block |
||
56 | 53 | * |
57 | 54 | * @return void |
58 | 55 | */ |
59 | - public function critical($message, array $context = array()) |
|
60 | - { |
|
56 | + public function critical($message, array $context = array()) { |
|
61 | 57 | $this->log(LogLevel::CRITICAL, $message, $context); |
62 | 58 | } |
63 | 59 | |
@@ -70,8 +66,7 @@ discard block |
||
70 | 66 | * |
71 | 67 | * @return void |
72 | 68 | */ |
73 | - public function error($message, array $context = array()) |
|
74 | - { |
|
69 | + public function error($message, array $context = array()) { |
|
75 | 70 | $this->log(LogLevel::ERROR, $message, $context); |
76 | 71 | } |
77 | 72 | |
@@ -86,8 +81,7 @@ discard block |
||
86 | 81 | * |
87 | 82 | * @return void |
88 | 83 | */ |
89 | - public function warning($message, array $context = array()) |
|
90 | - { |
|
84 | + public function warning($message, array $context = array()) { |
|
91 | 85 | $this->log(LogLevel::WARNING, $message, $context); |
92 | 86 | } |
93 | 87 | |
@@ -99,8 +93,7 @@ discard block |
||
99 | 93 | * |
100 | 94 | * @return void |
101 | 95 | */ |
102 | - public function notice($message, array $context = array()) |
|
103 | - { |
|
96 | + public function notice($message, array $context = array()) { |
|
104 | 97 | $this->log(LogLevel::NOTICE, $message, $context); |
105 | 98 | } |
106 | 99 | |
@@ -114,8 +107,7 @@ discard block |
||
114 | 107 | * |
115 | 108 | * @return void |
116 | 109 | */ |
117 | - public function info($message, array $context = array()) |
|
118 | - { |
|
110 | + public function info($message, array $context = array()) { |
|
119 | 111 | $this->log(LogLevel::INFO, $message, $context); |
120 | 112 | } |
121 | 113 | |
@@ -127,8 +119,7 @@ discard block |
||
127 | 119 | * |
128 | 120 | * @return void |
129 | 121 | */ |
130 | - public function debug($message, array $context = array()) |
|
131 | - { |
|
122 | + public function debug($message, array $context = array()) { |
|
132 | 123 | $this->log(LogLevel::DEBUG, $message, $context); |
133 | 124 | } |
134 | 125 | } |
@@ -8,6 +8,5 @@ |
||
8 | 8 | |
9 | 9 | namespace GravityView\Psr\Log; |
10 | 10 | |
11 | -class InvalidArgumentException extends \InvalidArgumentException |
|
12 | -{ |
|
11 | +class InvalidArgumentException extends \InvalidArgumentException { |
|
13 | 12 | } |