Skip to content

Commit 7bc19f4

Browse files
committed
updates for phpcs
1 parent 603f7bc commit 7bc19f4

File tree

9 files changed

+43
-7
lines changed

9 files changed

+43
-7
lines changed

admin/class-shifter-admin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function __construct( $plugin_name, $version ) {
6060
public function notice_shifter_dashboard_timer() {
6161
$bootup_filename = '../.bootup';
6262
$hard_limit = 180;
63-
if ( $_ENV['SHIFTER_LOCAL'] ) {
63+
if ( empty( getenv( 'SHIFTER_LOCAL' ) ) ) {
6464
return;
6565
}
6666

@@ -94,6 +94,7 @@ public function notice_shifter_dashboard_timer() {
9494
* @param string $old_value Old Value.
9595
* @param string $value Value.
9696
*/
97+
// phpcs:ignore
9798
public function option_cache_flush( $option, $old_value = '', $value = '' ) {
9899
if ( ! empty( $option ) ) {
99100
wp_cache_delete( $option, 'options' );
@@ -142,6 +143,7 @@ function shifter_heartbert_getajax() {
142143
* @since 1.0.0
143144
* @param string $email_address Email address.
144145
*/
146+
// phpcs:ignore
145147
public function shifter_mail_from( $email_address ) {
146148
return 'wordpress@app.getshifter.io';
147149
}

admin/index.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
<?php /** Silence is golden.
1+
<?php
2+
/** Silence is golden.
3+
4+
* @package Shifter
5+
* @subpackage Shifter/admin
6+
*/

api/class-shifter-api.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ private function build_args() {
155155
* Notify Login
156156
*
157157
* @since 1.2.0
158+
* @param string $username Username.
158159
*/
159160
public function notify_login( $username ) {
160161
$result = $this->call_update_active_user( true, $username );
@@ -164,6 +165,7 @@ public function notify_login( $username ) {
164165
* Notify Logout
165166
*
166167
* @since 1.2.0
168+
* @param int $user_id User ID.
167169
*/
168170
public function notify_logout( $user_id ) {
169171
$user = get_user_by( 'ID', $user_id );
@@ -174,6 +176,8 @@ public function notify_logout( $user_id ) {
174176
* Call Update Active User
175177
*
176178
* @since 1.2.0
179+
* @param bool $append Append.
180+
* @param string $username Username.
177181
*/
178182
private function call_update_active_user( $append, $username ) {
179183
if ( $this->access_token_is_expired() ) {

api/index.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
<?php /** Silence is golden.
1+
<?php
2+
/** Silence is golden.
3+
4+
* @package Shifter
5+
* @subpackage Shifter/api
6+
*/

global/index.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
<?php /** Silence is golden.
1+
<?php
2+
/** Silence is golden.
3+
4+
* @package Shifter
5+
* @subpackage Shifter/global
6+
*/

includes/index.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
<?php /** Silence is golden.
1+
<?php
2+
/** Silence is golden.
3+
4+
* @package Shifter
5+
* @subpackage Shifter/includes
6+
*/

index.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
<?php /** Silence is golden.
1+
<?php
2+
/** Silence is golden.
3+
4+
* @package Shifter
5+
*/

public/index.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
<?php /** Silence is golden.
1+
<?php
2+
/** Silence is golden.
3+
4+
* @package Shifter
5+
* @subpackage Shifter/public
6+
*/

shifter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ function run_shifter() {
9595

9696
add_filter(
9797
'sanitize_file_name',
98+
// phpcs:ignore
9899
function ( $filename, $filename_raw ) {
99100
return preg_replace( '/[\x00-\x1F]/', '', $filename );
100101
},

0 commit comments

Comments
 (0)