@@ -53,8 +53,7 @@ discard block |
||
53 | 53 | $hash = md5( $errno.$errstr.$errfile.$errline ); |
54 | 54 | if( array_key_exists( $hash, $this->errors )) { |
55 | 55 | $this->errors[$hash]['count']++; |
56 | - } |
|
57 | - else { |
|
56 | + } else { |
|
58 | 57 | $this->errors[$hash] = array( |
59 | 58 | "errno" => $errno, |
60 | 59 | "message" => $errstr, |
@@ -119,7 +118,9 @@ discard block |
||
119 | 118 | */ |
120 | 119 | public function initProfiler() |
121 | 120 | { |
122 | - if( func_get_arg(0) != static::DEBUG )return; |
|
121 | + if( func_get_arg(0) != static::DEBUG ) { |
|
122 | + return; |
|
123 | + } |
|
123 | 124 | $this->profiler->trace( func_get_arg(1) ); |
124 | 125 | } |
125 | 126 | |
@@ -140,7 +141,9 @@ discard block |
||
140 | 141 | public function render( $view, array $data = array() ) |
141 | 142 | { |
142 | 143 | $file = $this->path( sprintf( 'views/%s.php', str_replace( '.php', '', $view ))); |
143 | - if( !file_exists( $file ))return; |
|
144 | + if( !file_exists( $file )) { |
|
145 | + return; |
|
146 | + } |
|
144 | 147 | extract( $data ); |
145 | 148 | include $file; |
146 | 149 | } |
@@ -13,9 +13,13 @@ |
||
13 | 13 | ]; |
14 | 14 | foreach( $namespaces as $prefix => $base_dir ) { |
15 | 15 | $len = strlen( $prefix ); |
16 | - if( strncmp( $prefix, $class, $len ) !== 0 )continue; |
|
16 | + if( strncmp( $prefix, $class, $len ) !== 0 ) { |
|
17 | + continue; |
|
18 | + } |
|
17 | 19 | $file = $base_dir . str_replace( '\\', '/', substr( $class, $len )).'.php'; |
18 | - if( !file_exists( $file ))continue; |
|
20 | + if( !file_exists( $file )) { |
|
21 | + continue; |
|
22 | + } |
|
19 | 23 | require $file; |
20 | 24 | break; |
21 | 25 | } |
@@ -59,7 +59,9 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function deactivate( $plugin ) |
61 | 61 | { |
62 | - if( static::isValid() )return; |
|
62 | + if( static::isValid() ) { |
|
63 | + return; |
|
64 | + } |
|
63 | 65 | $pluginName = plugin_basename( dirname( realpath( __FILE__ )).'/'.static::BASENAME ); |
64 | 66 | if( $plugin == $pluginName ) { |
65 | 67 | $this->redirect(); //exit |
@@ -101,8 +103,7 @@ discard block |
||
101 | 103 | sprintf( $messages[1], $messages[3] ), |
102 | 104 | sprintf( $messages[2], PHP_VERSION ) |
103 | 105 | ); |
104 | - } |
|
105 | - else if( !static::isWpValid() ) { |
|
106 | + } else if( !static::isWpValid() ) { |
|
106 | 107 | printf( $noticeTemplate, |
107 | 108 | $messages[0], |
108 | 109 | sprintf( $messages[1], $messages[4] ), |