Skip to content

Commit 55ef3d0

Browse files
committed
Few more changes.
1 parent c91c510 commit 55ef3d0

File tree

5 files changed

+51
-51
lines changed

5 files changed

+51
-51
lines changed

core/display/SQLFormat.php

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -729,9 +729,9 @@ class SQLFormat {
729729
/**
730730
* Get stats about the token cache
731731
*
732-
* @return Array An array containing the keys 'hits', 'misses', 'entries', and 'size' in bytes
732+
* @return array An array containing the keys 'hits', 'misses', 'entries', and 'size' in bytes
733733
*/
734-
public static function getCacheStats() {
734+
public static function getCacheStats() : array {
735735
return array(
736736
'hits' => self::$cache_hits,
737737
'misses' => self::$cache_misses,
@@ -783,10 +783,10 @@ protected static function init() {
783783
* Return the next token and token type in a SQL string.
784784
* Quoted strings, comments, reserved words, whitespace, and punctuation are all their own tokens.
785785
*
786-
* @param String $string The SQL string
786+
* @param string $string The SQL string
787787
* @param array $previous The result of the previous getNextToken() call
788788
*
789-
* @return Array An associative array containing the type and value of the token.
789+
* @return array An associative array containing the type and value of the token.
790790
*/
791791
protected static function getNextToken( $string, $previous = null ) {
792792
// Whitespace
@@ -931,9 +931,9 @@ protected static function getQuotedString( $string ) {
931931
* Takes a SQL string and breaks it into tokens.
932932
* Each token is an associative array with type and value.
933933
*
934-
* @param String $string The SQL string
934+
* @param string $string The SQL string
935935
*
936-
* @return Array An array of tokens.
936+
* @return array An array of tokens.
937937
*/
938938
protected static function tokenize( $string ) {
939939
self::init();
@@ -1002,10 +1002,10 @@ protected static function tokenize( $string ) {
10021002
/**
10031003
* Format the whitespace in a SQL string to make it easier to read.
10041004
*
1005-
* @param String $string The SQL string
1005+
* @param string $string The SQL string
10061006
* @param boolean $highlight If true, syntax highlighting will also be performed
10071007
*
1008-
* @return String The SQL string with HTML styles and formatting wrapped in a <pre> tag
1008+
* @return string The SQL string with HTML styles and formatting wrapped in a <pre> tag
10091009
*/
10101010
public static function format( $string, $highlight = true ) {
10111011
// This variable will be populated with formatted html
@@ -1291,9 +1291,9 @@ public static function format( $string, $highlight = true ) {
12911291
/**
12921292
* Add syntax highlighting to a SQL string
12931293
*
1294-
* @param String $string The SQL string
1294+
* @param string $string The SQL string
12951295
*
1296-
* @return String The SQL string with HTML styles applied
1296+
* @return string The SQL string with HTML styles applied
12971297
*/
12981298
public static function highlight( $string ) {
12991299
$tokens = self::tokenize( $string );
@@ -1311,9 +1311,9 @@ public static function highlight( $string ) {
13111311
* Split a SQL string into multiple queries.
13121312
* Uses ";" as a query delimiter.
13131313
*
1314-
* @param String $string The SQL string
1314+
* @param string $string The SQL string
13151315
*
1316-
* @return Array An array of individual query strings without trailing semicolons
1316+
* @return array An array of individual query strings without trailing semicolons
13171317
*/
13181318
public static function splitQuery( $string ) {
13191319
$queries = array();
@@ -1351,9 +1351,9 @@ public static function splitQuery( $string ) {
13511351
/**
13521352
* Remove all comments from a SQL string
13531353
*
1354-
* @param String $string The SQL string
1354+
* @param string $string The SQL string
13551355
*
1356-
* @return String The SQL string without comments
1356+
* @return string The SQL string without comments
13571357
*/
13581358
public static function removeComments( $string ) {
13591359
$result = '';
@@ -1376,9 +1376,9 @@ public static function removeComments( $string ) {
13761376
/**
13771377
* Compress a query by collapsing white space and removing comments
13781378
*
1379-
* @param String $string The SQL string
1379+
* @param string $string The SQL string
13801380
*
1381-
* @return String The SQL string without comments
1381+
* @return string The SQL string without comments
13821382
*/
13831383
public static function compress( $string ) {
13841384
$result = '';
@@ -1417,9 +1417,9 @@ public static function compress( $string ) {
14171417
/**
14181418
* Highlights a token depending on its type.
14191419
*
1420-
* @param Array $token An associative array containing type and value.
1420+
* @param array $token An associative array containing type and value.
14211421
*
1422-
* @return String HTML code of the highlighted token.
1422+
* @return string HTML code of the highlighted token.
14231423
*/
14241424
protected static function highlightToken( $token ) {
14251425
$type = $token[ self::TOKEN_TYPE ];
@@ -1462,9 +1462,9 @@ protected static function highlightToken( $token ) {
14621462
/**
14631463
* Highlights a quoted string
14641464
*
1465-
* @param String $value The token's value
1465+
* @param string $value The token's value
14661466
*
1467-
* @return String HTML code of the highlighted token.
1467+
* @return string HTML code of the highlighted token.
14681468
*/
14691469
protected static function highlightQuote( $value ) {
14701470
if ( self::is_cli() ) {
@@ -1477,9 +1477,9 @@ protected static function highlightQuote( $value ) {
14771477
/**
14781478
* Highlights a backtick quoted string
14791479
*
1480-
* @param String $value The token's value
1480+
* @param string $value The token's value
14811481
*
1482-
* @return String HTML code of the highlighted token.
1482+
* @return string HTML code of the highlighted token.
14831483
*/
14841484
protected static function highlightBacktickQuote( $value ) {
14851485
if ( self::is_cli() ) {
@@ -1492,9 +1492,9 @@ protected static function highlightBacktickQuote( $value ) {
14921492
/**
14931493
* Highlights a reserved word
14941494
*
1495-
* @param String $value The token's value
1495+
* @param string $value The token's value
14961496
*
1497-
* @return String HTML code of the highlighted token.
1497+
* @return string HTML code of the highlighted token.
14981498
*/
14991499
protected static function highlightReservedWord( $value ) {
15001500
if ( self::is_cli() ) {
@@ -1507,9 +1507,9 @@ protected static function highlightReservedWord( $value ) {
15071507
/**
15081508
* Highlights a boundary token
15091509
*
1510-
* @param String $value The token's value
1510+
* @param string $value The token's value
15111511
*
1512-
* @return String HTML code of the highlighted token.
1512+
* @return string HTML code of the highlighted token.
15131513
*/
15141514
protected static function highlightBoundary( $value ) {
15151515
if ( $value === '(' || $value === ')' ) {
@@ -1526,9 +1526,9 @@ protected static function highlightBoundary( $value ) {
15261526
/**
15271527
* Highlights a number
15281528
*
1529-
* @param String $value The token's value
1529+
* @param string $value The token's value
15301530
*
1531-
* @return String HTML code of the highlighted token.
1531+
* @return string HTML code of the highlighted token.
15321532
*/
15331533
protected static function highlightNumber( $value ) {
15341534
if ( self::is_cli() ) {
@@ -1541,9 +1541,9 @@ protected static function highlightNumber( $value ) {
15411541
/**
15421542
* Highlights an error
15431543
*
1544-
* @param String $value The token's value
1544+
* @param string $value The token's value
15451545
*
1546-
* @return String HTML code of the highlighted token.
1546+
* @return string HTML code of the highlighted token.
15471547
*/
15481548
protected static function highlightError( $value ) {
15491549
if ( self::is_cli() ) {
@@ -1556,9 +1556,9 @@ protected static function highlightError( $value ) {
15561556
/**
15571557
* Highlights a comment
15581558
*
1559-
* @param String $value The token's value
1559+
* @param string $value The token's value
15601560
*
1561-
* @return String HTML code of the highlighted token.
1561+
* @return string HTML code of the highlighted token.
15621562
*/
15631563
protected static function highlightComment( $value ) {
15641564
if ( self::is_cli() ) {
@@ -1571,9 +1571,9 @@ protected static function highlightComment( $value ) {
15711571
/**
15721572
* Highlights a word token
15731573
*
1574-
* @param String $value The token's value
1574+
* @param string $value The token's value
15751575
*
1576-
* @return String HTML code of the highlighted token.
1576+
* @return string HTML code of the highlighted token.
15771577
*/
15781578
protected static function highlightWord( $value ) {
15791579
if ( self::is_cli() ) {
@@ -1586,9 +1586,9 @@ protected static function highlightWord( $value ) {
15861586
/**
15871587
* Highlights a variable token
15881588
*
1589-
* @param String $value The token's value
1589+
* @param string $value The token's value
15901590
*
1591-
* @return String HTML code of the highlighted token.
1591+
* @return string HTML code of the highlighted token.
15921592
*/
15931593
protected static function highlightVariable( $value ) {
15941594
if ( self::is_cli() ) {
@@ -1601,9 +1601,9 @@ protected static function highlightVariable( $value ) {
16011601
/**
16021602
* Helper function for building regular expressions for reserved words and boundary characters
16031603
*
1604-
* @param String $a The string to be quoted
1604+
* @param string $a The string to be quoted
16051605
*
1606-
* @return String The quoted string
1606+
* @return string The quoted string
16071607
*/
16081608
private static function quote_regex( $a ) {
16091609
return preg_quote( $a, '/' );
@@ -1612,9 +1612,9 @@ private static function quote_regex( $a ) {
16121612
/**
16131613
* Helper function for building string output
16141614
*
1615-
* @param String $string The string to be quoted
1615+
* @param string $string The string to be quoted
16161616
*
1617-
* @return String The quoted string
1617+
* @return string The quoted string
16181618
*/
16191619
private static function output( $string ) {
16201620
if ( self::is_cli() ) {

core/main/Panel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function add_column( $name, $class = '', $style = '', $reset = false ) {
8383

8484
public function table_init_standard() {
8585
$this->add_column( __( "Name", "debugpress" ), '', '', true );
86-
$this->add_column( __( "Value", "debugpress" ), '', '' );
86+
$this->add_column( __( "Value", "debugpress" ) );
8787
}
8888

8989
public function table_init_right() {
@@ -126,7 +126,7 @@ public function table_row( $data ) {
126126
}
127127

128128
public function list_defines( $defines, $subtitle = '' ) {
129-
$this->block_header( true );
129+
$this->block_header();
130130

131131
if ( $subtitle != '' ) {
132132
$this->sub_title( $subtitle );
@@ -144,7 +144,7 @@ public function list_defines( $defines, $subtitle = '' ) {
144144
}
145145

146146
public function list_array( $data, $subtitle = '' ) {
147-
$this->block_header( true );
147+
$this->block_header();
148148

149149
if ( $subtitle != '' ) {
150150
$this->sub_title( $subtitle );
@@ -164,7 +164,7 @@ public function list_array( $data, $subtitle = '' ) {
164164
}
165165

166166
public function list_properties( $object, $properties = array(), $subtitle = '' ) {
167-
$this->block_header( true );
167+
$this->block_header();
168168

169169
if ( $subtitle != '' ) {
170170
$this->sub_title( $subtitle );

core/panel/HTTP.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ public function single() {
1313
$this->title( __( "Logged HTTP API Requests", "debugpress" ), true );
1414
$this->block_header( true );
1515
$this->add_column( __( "URL", "debugpress" ), "", "", true );
16-
$this->add_column( __( "Request", "debugpress" ), "", "" );
17-
$this->add_column( __( "Response", "debugpress" ), "", "" );
18-
$this->add_column( __( "Time", "debugpress" ), "", "" );
16+
$this->add_column( __( "Request", "debugpress" ) );
17+
$this->add_column( __( "Response", "debugpress" ) );
18+
$this->add_column( __( "Time", "debugpress" ) );
1919
$this->table_head();
2020
foreach ( debugpress_tracker()->httpapi as $request ) {
2121
$this->render_request( $request );

core/panel/Store.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ public function single() {
1414
$this->title( __( "Stored objects and other data", "debugpress" ), true );
1515
$this->block_header( true );
1616
$this->add_column( __( "Time", "debugpress" ), "", "", true );
17-
$this->add_column( __( "Title", "debugpress" ), "", "" );
18-
$this->add_column( __( "Logged Data", "debugpress" ), "", "" );
19-
$this->add_column( __( "Caller", "debugpress" ), "", "" );
17+
$this->add_column( __( "Title", "debugpress" ) );
18+
$this->add_column( __( "Logged Data", "debugpress" ) );
19+
$this->add_column( __( "Caller", "debugpress" ) );
2020
$this->table_head();
2121
foreach ( debugpress_tracker()->logged as $item ) {
2222
$this->render_item( $item );

core/panel/Tools.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function right() {
8686
$this->block_header( true );
8787
$this->sub_title( __( "Google PageSpeed Insights", "debugpress" ) );
8888
echo '<p>' . __( "Run the current page in the Google PageSpeed Insights test tool.", "debugpress" ) . '</p>';
89-
echo '<a target="_blank" rel="noopener" href="' . $this->_google_pagespeed_url( 'mobile' ) . '" class="debugpress-button-action">' . __( "Run Mobile Test", "debugpress" ) . '</a>';
89+
echo '<a target="_blank" rel="noopener" href="' . $this->_google_pagespeed_url() . '" class="debugpress-button-action">' . __( "Run Mobile Test", "debugpress" ) . '</a>';
9090
echo '<a target="_blank" rel="noopener" href="' . $this->_google_pagespeed_url( 'desktop' ) . '" class="debugpress-button-action">' . __( "Run Desktop Test", "debugpress" ) . '</a>';
9191
$this->block_footer();
9292

0 commit comments

Comments
 (0)