Make lines short to pass phpcs in files under includes/db/
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sun, 27 Sep 2015 08:15:12 +0000 (11:15 +0300)
committerUmherirrender <umherirrender_de.wp@web.de>
Sun, 27 Sep 2015 15:59:23 +0000 (15:59 +0000)
Bug: T102614
Change-Id: I95ec0f9bdfc23e0d10d24534801fe5d6609ed0cb

includes/db/DatabaseMysqlBase.php
includes/db/DatabaseSqlite.php
includes/db/loadbalancer/LoadBalancer.php

index 160c354..5be96fa 100644 (file)
@@ -940,7 +940,8 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                                $value = $this->mDefaultBigSelects;
                        }
                } elseif ( $this->mDefaultBigSelects === null ) {
-                       $this->mDefaultBigSelects = (bool)$this->selectField( false, '@@sql_big_selects', '', __METHOD__ );
+                       $this->mDefaultBigSelects =
+                               (bool)$this->selectField( false, '@@sql_big_selects', '', __METHOD__ );
                }
                $encValue = $value ? '1' : '0';
                $this->query( "SET sql_big_selects=$encValue", __METHOD__ );
index 0a7629e..e909597 100644 (file)
@@ -799,15 +799,21 @@ class DatabaseSqlite extends DatabaseBase {
                        return (int)$s;
                } elseif ( strpos( $s, "\0" ) !== false ) {
                        // SQLite doesn't support \0 in strings, so use the hex representation as a workaround.
-                       // This is a known limitation of SQLite's mprintf function which PDO should work around,
-                       // but doesn't. I have reported this to php.net as bug #63419:
+                       // This is a known limitation of SQLite's mprintf function which PDO
+                       // should work around, but doesn't. I have reported this to php.net as bug #63419:
                        // https://bugs.php.net/bug.php?id=63419
                        // There was already a similar report for SQLite3::escapeString, bug #62361:
                        // https://bugs.php.net/bug.php?id=62361
                        // There is an additional bug regarding sorting this data after insert
                        // on older versions of sqlite shipped with ubuntu 12.04
                        // https://phabricator.wikimedia.org/T74367
-                       wfDebugLog( __CLASS__, __FUNCTION__ . ': Quoting value containing null byte. For consistency all binary data should have been first processed with self::encodeBlob()' );
+                       wfDebugLog(
+                               __CLASS__,
+                               __FUNCTION__ .
+                                       ': Quoting value containing null byte. ' .
+                                       'For consistency all binary data should have been ' .
+                                       'first processed with self::encodeBlob()'
+                       );
                        return "x'" . bin2hex( $s ) . "'";
                } else {
                        return $this->mConn->quote( $s );
index cdd3d4c..e794fa0 100644 (file)
@@ -839,7 +839,9 @@ class LoadBalancer {
                                "Connection error: {last_error} ({db_server})",
                                $context
                        );
-                       $conn->reportConnectionError( "{$this->mLastError} ({$context['db_server']})" ); // throws DBConnectionError
+
+                       // throws DBConnectionError
+                       $conn->reportConnectionError( "{$this->mLastError} ({$context['db_server']})" );
                }
 
                return false; /* not reached */