Completed
Pull Request — master (#188)
by
unknown
05:54
created

Mysqldump::setTransformTableRowHook()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
0 ignored issues
show
Coding Style introduced by
There must be no blank lines before the file comment
Loading history...
Coding Style introduced by
The PHP open tag does not have a corresponding PHP close tag
Loading history...
Coding Style introduced by
Filename "Mysqldump.php" doesn't match the expected filename "mysqldump.php"
Loading history...
2
3
/**
4
 * PHP version of mysqldump cli that comes with MySQL.
5
 *
6
 * Tags: mysql mysqldump pdo php7 php5 database php sql hhvm mariadb mysql-backup.
7
 *
8
 * @category Library
0 ignored issues
show
Coding Style introduced by
The tag in position 1 should be the @package tag
Loading history...
9
 * @package  Ifsnop\Mysqldump
0 ignored issues
show
Coding Style introduced by
The tag in position 2 should be the @subpackage tag
Loading history...
10
 * @author   Diego Torres <[email protected]>
0 ignored issues
show
Coding Style introduced by
Expected "Squiz Pty Ltd <[email protected]>" for author tag
Loading history...
11
 * @license  http://www.gnu.org/copyleft/gpl.html GNU General Public License
0 ignored issues
show
Coding Style introduced by
The tag in position 4 should be the @copyright tag
Loading history...
12
 * @link     https://github.com/ifsnop/mysqldump-php
13
 *
14
 */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @subpackage tag in file comment
Loading history...
Coding Style introduced by
Missing @copyright tag in file comment
Loading history...
Coding Style introduced by
Additional blank lines found at end of doc comment
Loading history...
15
16
namespace Ifsnop\Mysqldump;
17
18
use Exception;
19
use PDO;
20
use PDOException;
21
22
/**
23
 * Class Mysqldump.
24
 *
25
 * @category Library
0 ignored issues
show
Coding Style Documentation introduced by
@category tag is not allowed in class comment
Loading history...
26
 * @author   Diego Torres <[email protected]>
0 ignored issues
show
Coding Style Documentation introduced by
@author tag is not allowed in class comment
Loading history...
27
 * @license  http://www.gnu.org/copyleft/gpl.html GNU General Public License
0 ignored issues
show
Coding Style Documentation introduced by
@license tag is not allowed in class comment
Loading history...
28
 * @link     https://github.com/ifsnop/mysqldump-php
0 ignored issues
show
Coding Style Documentation introduced by
@link tag is not allowed in class comment
Loading history...
29
 *
30
 */
0 ignored issues
show
Coding Style introduced by
Additional blank lines found at end of doc comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
31
class Mysqldump
32
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class Mysqldump
Loading history...
33
34
    // Same as mysqldump.
35
    const MAXLINESIZE = 1000000;
36
37
    // List of available compression methods as constants.
38
    const GZIP  = 'Gzip';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 2 spaces

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
39
    const BZIP2 = 'Bzip2';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
40
    const NONE  = 'None';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 2 spaces

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
41
    const GZIPSTREAM = 'Gzipstream';
42
43
    // List of available connection strings.
44
    const UTF8    = 'utf8';
45
    const UTF8MB4 = 'utf8mb4';
46
47
    /**
48
     * Database username.
49
     * @var string
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
50
     */
51
    public $user;
52
53
    /**
54
     * Database password.
55
     * @var string
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
56
     */
57
    public $pass;
58
59
    /**
60
     * Connection string for PDO.
61
     * @var string
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
62
     */
63
    public $dsn;
64
65
    /**
66
     * Destination filename, defaults to stdout.
67
     * @var string
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
68
     */
69
    public $fileName = 'php://stdout';
70
71
    // Internal stuff.
72
    private $tables = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "tables" must contain a leading underscore
Loading history...
Coding Style introduced by
You must use "/**" style comments for a member variable comment
Loading history...
Coding Style introduced by
Private member variable "tables" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
73
    private $views = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "views" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "views" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
74
    private $triggers = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "triggers" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "triggers" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
75
    private $procedures = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "procedures" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "procedures" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
76
    private $functions = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "functions" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "functions" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
77
    private $events = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "events" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "events" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
78
    private $dbHandler = null;
0 ignored issues
show
Coding Style introduced by
Private member variable "dbHandler" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "dbHandler" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
79
    private $dbType = "";
0 ignored issues
show
Coding Style introduced by
Private member variable "dbType" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "dbType" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
80
    private $compressManager;
0 ignored issues
show
Coding Style introduced by
Private member variable "compressManager" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "compressManager" must be prefixed with an underscore
Loading history...
81
    private $typeAdapter;
0 ignored issues
show
Coding Style introduced by
Private member variable "typeAdapter" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "typeAdapter" must be prefixed with an underscore
Loading history...
82
    private $dumpSettings = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "dumpSettings" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "dumpSettings" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
83
    private $pdoSettings = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "pdoSettings" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "pdoSettings" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
84
    private $version;
0 ignored issues
show
Coding Style introduced by
Private member variable "version" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "version" must be prefixed with an underscore
Loading history...
85
    private $tableColumnTypes = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "tableColumnTypes" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "tableColumnTypes" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
86
    private $transformTableRowCallable;
0 ignored issues
show
Coding Style introduced by
Private member variable "transformTableRowCallable" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "transformTableRowCallable" must be prefixed with an underscore
Loading history...
87
    private $transformColumnValueCallable;
0 ignored issues
show
Coding Style introduced by
Private member variable "transformColumnValueCallable" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "transformColumnValueCallable" must be prefixed with an underscore
Loading history...
88
    private $infoCallable;
0 ignored issues
show
Coding Style introduced by
Private member variable "infoCallable" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "infoCallable" must be prefixed with an underscore
Loading history...
89
90
    /**
91
     * Database name, parsed from dsn.
92
     * @var string
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
93
     */
94
    private $dbName;
0 ignored issues
show
Coding Style introduced by
Private member variable "dbName" must contain a leading underscore
Loading history...
Coding Style introduced by
Private member variable "dbName" must be prefixed with an underscore
Loading history...
95
96
    /**
97
     * Host name, parsed from dsn.
98
     * @var string
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
99
     */
100
    private $host;
0 ignored issues
show
Coding Style introduced by
Private member variable "host" must contain a leading underscore
Loading history...
Coding Style introduced by
Private member variable "host" must be prefixed with an underscore
Loading history...
101
102
    /**
103
     * Dsn string parsed as an array.
104
     * @var array
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
105
     */
106
    private $dsnArray = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "dsnArray" must contain a leading underscore
Loading history...
Coding Style introduced by
Private member variable "dsnArray" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
107
108
    /**
109
     * Keyed on table name, with the value as the conditions.
110
     * e.g. - 'users' => 'date_registered > NOW() - INTERVAL 6 MONTH'
111
     *
112
     * @var array
113
     */
114
    private $tableWheres = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "tableWheres" must contain a leading underscore
Loading history...
Coding Style introduced by
Private member variable "tableWheres" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
115
    private $tableLimits = array();
0 ignored issues
show
Coding Style introduced by
Private member variable "tableLimits" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "tableLimits" must be prefixed with an underscore
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
116
117
118
    /**
119
     * Constructor of Mysqldump. Note that in the case of an SQLite database
120
     * connection, the filename must be in the $db parameter.
121
     *
122
     * @param string $dsn        PDO DSN connection string
0 ignored issues
show
Coding Style introduced by
Expected 10 spaces after parameter name; 8 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
123
     * @param string $user       SQL account username
0 ignored issues
show
Coding Style introduced by
Expected 9 spaces after parameter name; 7 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
124
     * @param string $pass       SQL account password
0 ignored issues
show
Coding Style introduced by
Expected 9 spaces after parameter name; 7 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
125
     * @param array  $dumpSettings SQL database settings
0 ignored issues
show
introduced by
Parameter comment must end with a full stop
Loading history...
126
     * @param array  $pdoSettings  PDO configured attributes
0 ignored issues
show
introduced by
Parameter comment must end with a full stop
Loading history...
127
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
128
    public function __construct(
0 ignored issues
show
introduced by
Type hint "array" missing for $dumpSettings
Loading history...
introduced by
Type hint "array" missing for $pdoSettings
Loading history...
129
        $dsn = '',
130
        $user = '',
131
        $pass = '',
132
        $dumpSettings = array(),
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
133
        $pdoSettings = array()
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
134
    ) {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on a new line
Loading history...
135
        $dumpSettingsDefault = array(
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
136
            'include-tables' => array(),
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
137
            'exclude-tables' => array(),
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
138
            'compress' => Mysqldump::NONE,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
As per coding style, self should be used for accessing local static members.

This check looks for accesses to local static members using the fully qualified name instead of self::.

<?php

class Certificate {
    const TRIPLEDES_CBC = 'ASDFGHJKL';

    private $key;

    public function __construct()
    {
        $this->key = Certificate::TRIPLEDES_CBC;
    }
}

While this is perfectly valid, the fully qualified name of Certificate::TRIPLEDES_CBC could just as well be replaced by self::TRIPLEDES_CBC. Referencing local members with self:: assured the access will still work when the class is renamed, makes it perfectly clear that the member is in fact local and will usually be shorter.

Loading history...
139
            'init_commands' => array(),
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
140
            'no-data' => array(),
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
141
            'reset-auto-increment' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
142
            'add-drop-database' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
143
            'add-drop-table' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
144
            'add-drop-trigger' => true,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
145
            'add-locks' => true,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
146
            'complete-insert' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
147
            'databases' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
148
            'default-character-set' => Mysqldump::UTF8,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
As per coding style, self should be used for accessing local static members.

This check looks for accesses to local static members using the fully qualified name instead of self::.

<?php

class Certificate {
    const TRIPLEDES_CBC = 'ASDFGHJKL';

    private $key;

    public function __construct()
    {
        $this->key = Certificate::TRIPLEDES_CBC;
    }
}

While this is perfectly valid, the fully qualified name of Certificate::TRIPLEDES_CBC could just as well be replaced by self::TRIPLEDES_CBC. Referencing local members with self:: assured the access will still work when the class is renamed, makes it perfectly clear that the member is in fact local and will usually be shorter.

Loading history...
149
            'disable-keys' => true,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
150
            'extended-insert' => true,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
151
            'events' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
152
            'hex-blob' => true, /* faster than escaped content */
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
Coding Style introduced by
Single line block comment not allowed; use inline ("// text") comment instead
Loading history...
153
            'insert-ignore' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
154
            'net_buffer_length' => self::MAXLINESIZE,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
155
            'no-autocommit' => true,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
156
            'no-create-info' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
157
            'lock-tables' => true,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
158
            'routines' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
159
            'single-transaction' => true,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
160
            'skip-triggers' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
161
            'skip-tz-utc' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
162
            'skip-comments' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
163
            'skip-dump-date' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
164
            'skip-definer' => false,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
165
            'where' => '',
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
166
            /* deprecated */
0 ignored issues
show
Coding Style introduced by
Single line block comment not allowed; use inline ("// text") comment instead
Loading history...
167
            'disable-foreign-keys-check' => true
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 32 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
168
        );
0 ignored issues
show
Coding Style introduced by
The closing parenthesis does not seem to be aligned correctly; expected 31 space(s), but found 8.
Loading history...
169
170
        $pdoSettingsDefault = array(
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
171
            PDO::ATTR_PERSISTENT => true,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 31 spaces, but found 12.
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
172
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 31 spaces, but found 12.
Loading history...
173
        );
0 ignored issues
show
Coding Style introduced by
The closing parenthesis does not seem to be aligned correctly; expected 30 space(s), but found 8.
Loading history...
174
175
        $this->user = $user;
176
        $this->pass = $pass;
177
        $this->parseDsn($dsn);
178
179
        // This drops MYSQL dependency, only use the constant if it's defined.
180
        if ("mysql" === $this->dbType) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal mysql does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
introduced by
The condition 'mysql' === $this->dbType is always false.
Loading history...
181
            $pdoSettingsDefault[PDO::MYSQL_ATTR_USE_BUFFERED_QUERY] = false;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
182
        }
183
184
        $this->pdoSettings = self::array_replace_recursive($pdoSettingsDefault, $pdoSettings);
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 21 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
185
        $this->dumpSettings = self::array_replace_recursive($dumpSettingsDefault, $dumpSettings);
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 20 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
186
        $this->dumpSettings['init_commands'][] = "SET NAMES ".$this->dumpSettings['default-character-set'];
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal SET NAMES does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 107 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
187
188
        if (false === $this->dumpSettings['skip-tz-utc']) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
189
            $this->dumpSettings['init_commands'][] = "SET TIME_ZONE='+00:00'";
190
        }
191
192
        $diff = array_diff(array_keys($this->dumpSettings), array_keys($dumpSettingsDefault));
193
        if (count($diff) > 0) {
194
            throw new Exception("Unexpected value in dumpSettings: (".implode(",", $diff).")");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Unexpected value in dumpSettings: ( does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal , does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal ) does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
195
        }
196
197
        if (!is_array($this->dumpSettings['include-tables']) ||
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
198
            !is_array($this->dumpSettings['exclude-tables'])) {
0 ignored issues
show
Coding Style introduced by
Each line in a multi-line IF statement must begin with a boolean operator
Loading history...
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
Coding Style introduced by
Closing parenthesis of a multi-line IF statement must be on a new line
Loading history...
199
            throw new Exception("Include-tables and exclude-tables should be arrays");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Include-tables and exclude-tables should be arrays does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
200
        }
201
202
        // Dump the same views as tables, mimic mysqldump behaviour
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
203
        $this->dumpSettings['include-views'] = $this->dumpSettings['include-tables'];
204
205
        // Create a new compressManager to manage compressed output
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
206
        $this->compressManager = CompressManagerFactory::create($this->dumpSettings['compress']);
207
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end __construct()
Loading history...
208
209
    /**
210
     * Destructor of Mysqldump. Unsets dbHandlers and database objects.
211
     */
212
    public function __destruct()
213
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
214
        $this->dbHandler = null;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
215
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end __destruct()
Loading history...
216
217
    /**
218
     * Custom array_replace_recursive to be used if PHP < 5.3
219
     * Replaces elements from passed arrays into the first array recursively.
220
     *
221
     * @param array $array1 The array in which elements are replaced
0 ignored issues
show
introduced by
Parameter comment must end with a full stop
Loading history...
222
     * @param array $array2 The array from which elements will be extracted
0 ignored issues
show
introduced by
Parameter comment must end with a full stop
Loading history...
223
     *
224
     * @return array Returns an array, or NULL if an error occurs.
225
     */
226
    public static function array_replace_recursive($array1, $array2)
0 ignored issues
show
Coding Style introduced by
Public method name "Mysqldump::array_replace_recursive" is not in camel caps format
Loading history...
introduced by
Type hint "array" missing for $array1
Loading history...
introduced by
Type hint "array" missing for $array2
Loading history...
Coding Style introduced by
Variable "array1" contains numbers but this is discouraged
Loading history...
Coding Style introduced by
Variable "array2" contains numbers but this is discouraged
Loading history...
227
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
228
        if (function_exists('array_replace_recursive')) {
229
            return array_replace_recursive($array1, $array2);
0 ignored issues
show
Coding Style introduced by
Variable "array1" contains numbers but this is discouraged
Loading history...
Coding Style introduced by
Variable "array2" contains numbers but this is discouraged
Loading history...
230
        }
231
232
        foreach ($array2 as $key => $value) {
0 ignored issues
show
Coding Style introduced by
Variable "array2" contains numbers but this is discouraged
Loading history...
233
            if (is_array($value)) {
234
                $array1[$key] = self::array_replace_recursive($array1[$key], $value);
0 ignored issues
show
Coding Style introduced by
Variable "array1" contains numbers but this is discouraged
Loading history...
235
            } else {
236
                $array1[$key] = $value;
0 ignored issues
show
Coding Style introduced by
Variable "array1" contains numbers but this is discouraged
Loading history...
237
            }
238
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
239
        return $array1;
0 ignored issues
show
Coding Style introduced by
Variable "array1" contains numbers but this is discouraged
Loading history...
240
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end array_replace_recursive()
Loading history...
241
242
    /**
243
     * Keyed by table name, with the value as the conditions:
244
     * e.g. 'users' => 'date_registered > NOW() - INTERVAL 6 MONTH AND deleted=0'
245
     *
246
     * @param array $tableWheres
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
247
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
248
    public function setTableWheres(array $tableWheres)
249
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
250
        $this->tableWheres = $tableWheres;
251
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end setTableWheres()
Loading history...
252
253
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
Coding Style introduced by
Parameter $tableName should have a doc-comment as per coding-style.
Loading history...
254
     * @param $tableName
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter name
Loading history...
255
     *
256
     * @return boolean|mixed
257
     */
258
    public function getTableWhere($tableName)
0 ignored issues
show
introduced by
Type hint "tableName" missing for
Loading history...
259
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
260
        if (!empty($this->tableWheres[$tableName])) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
261
            return $this->tableWheres[$tableName];
262
        } elseif ($this->dumpSettings['where']) {
0 ignored issues
show
Coding Style introduced by
Usage of ELSEIF not allowed; use ELSE IF instead
Loading history...
263
            return $this->dumpSettings['where'];
264
        }
265
266
        return false;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
267
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getTableWhere()
Loading history...
268
269
    /**
270
     * Keyed by table name, with the value as the numeric limit:
271
     * e.g. 'users' => 3000
272
     *
273
     * @param array $tableLimits
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
274
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
275
    public function setTableLimits(array $tableLimits)
276
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
277
        $this->tableLimits = $tableLimits;
278
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end setTableLimits()
Loading history...
279
280
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $tableName should have a doc-comment as per coding-style.
Loading history...
281
     * Returns the LIMIT for the table.  Must be numeric to be returned.
282
     * @param $tableName
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
Coding Style Documentation introduced by
Missing parameter name
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
283
     * @return boolean
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
284
     */
285
    public function getTableLimit($tableName)
0 ignored issues
show
introduced by
Type hint "tableName" missing for
Loading history...
286
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
287
        if (empty($this->tableLimits[$tableName])) {
288
            return false;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
289
        }
290
291
        $limit = $this->tableLimits[$tableName];
292
        if (!is_numeric($limit)) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
293
            return false;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
294
        }
295
296
        return $limit;
297
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getTableLimit()
Loading history...
298
299
    /**
300
     * Parse DSN string and extract dbname value
301
     * Several examples of a DSN string
302
     *   mysql:host=localhost;dbname=testdb
303
     *   mysql:host=localhost;port=3307;dbname=testdb
304
     *   mysql:unix_socket=/tmp/mysql.sock;dbname=testdb
305
     *
306
     * @param string $dsn dsn string to parse
0 ignored issues
show
introduced by
Parameter comment must start with a capital letter
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
307
     * @return boolean
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
308
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
309
    private function parseDsn($dsn)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::parseDsn" must be prefixed with an underscore
Loading history...
310
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
311
        if (empty($dsn) || (false === ($pos = strpos($dsn, ":")))) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
Coding Style Comprehensibility introduced by
The string literal : does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
312
            throw new Exception("Empty DSN string");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Empty DSN string does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
313
        }
314
315
        $this->dsn = $dsn;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
316
        $this->dbType = strtolower(substr($dsn, 0, $pos)); // always returns a string
0 ignored issues
show
Coding Style introduced by
Comments may not appear after statements
Loading history...
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
317
318
        if (empty($this->dbType)) {
319
            throw new Exception("Missing database type from DSN string");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Missing database type from DSN string does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
320
        }
321
322
        $dsn = substr($dsn, $pos + 1);
0 ignored issues
show
Coding Style introduced by
Arithmetic operation must be bracketed
Loading history...
323
324
        foreach (explode(";", $dsn) as $kvp) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
325
            $kvpArr = explode("=", $kvp);
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 33 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style Comprehensibility introduced by
The string literal = does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
326
            $this->dsnArray[strtolower($kvpArr[0])] = $kvpArr[1];
327
        }
328
329
        if (empty($this->dsnArray['host']) &&
330
            empty($this->dsnArray['unix_socket'])) {
0 ignored issues
show
Coding Style introduced by
Each line in a multi-line IF statement must begin with a boolean operator
Loading history...
Coding Style introduced by
Closing parenthesis of a multi-line IF statement must be on a new line
Loading history...
331
            throw new Exception("Missing host from DSN string");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Missing host from DSN string does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
332
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
333
        $this->host = (!empty($this->dsnArray['host'])) ?
0 ignored issues
show
Coding Style introduced by
The value of a boolean operation must not be assigned to a variable
Loading history...
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
Coding Style introduced by
Expected 1 space after "?"; newline found
Loading history...
Coding Style introduced by
Inline IF statements are not allowed
Loading history...
Coding Style introduced by
Inline shorthand IF statement must be declared on a single line
Loading history...
334
            $this->dsnArray['host'] : $this->dsnArray['unix_socket'];
335
336
        if (empty($this->dsnArray['dbname'])) {
337
            throw new Exception("Missing database name from DSN string");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Missing database name from DSN string does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
338
        }
339
340
        $this->dbName = $this->dsnArray['dbname'];
341
342
        return true;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
343
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end parseDsn()
Loading history...
344
345
    /**
346
     * Connect with PDO.
347
     *
348
     * @return null
0 ignored issues
show
introduced by
Function return type is not void, but function has no return statement
Loading history...
349
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
350
    private function connect()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::connect" must be prefixed with an underscore
Loading history...
351
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
352
        // Connecting with PDO.
353
        try {
354
            switch ($this->dbType) {
355
                case 'sqlite':
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 12 spaces, found 16
Loading history...
356
                    $this->dbHandler = @new PDO("sqlite:".$this->dbName, null, null, $this->pdoSettings);
0 ignored issues
show
Coding Style introduced by
Silencing errors is discouraged
Loading history...
Coding Style Comprehensibility introduced by
The string literal sqlite: does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 105 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
357
                    break;
0 ignored issues
show
Coding Style introduced by
Case breaking statement must be indented 4 spaces from SWITCH keyword
Loading history...
Coding Style introduced by
Case breaking statements must be followed by a single blank line
Loading history...
358
                case 'mysql':
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 12 spaces, found 16
Loading history...
359
                case 'pgsql':
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 12 spaces, found 16
Loading history...
360
                case 'dblib':
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 12 spaces, found 16
Loading history...
361
                    $this->dbHandler = @new PDO(
0 ignored issues
show
Coding Style introduced by
Silencing errors is discouraged
Loading history...
362
                        $this->dsn,
363
                        $this->user,
364
                        $this->pass,
365
                        $this->pdoSettings
366
                    );
367
                    // Execute init commands once connected
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
368
                    foreach ($this->dumpSettings['init_commands'] as $stmt) {
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 12 spaces, found 20
Loading history...
369
                        $this->dbHandler->exec($stmt);
370
                    }
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 12 spaces, found 20
Loading history...
Coding Style introduced by
No blank line found after control structure
Loading history...
371
                    // Store server version
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
372
                    $this->version = $this->dbHandler->getAttribute(PDO::ATTR_SERVER_VERSION);
373
                    break;
0 ignored issues
show
Coding Style introduced by
Case breaking statement must be indented 4 spaces from SWITCH keyword
Loading history...
Coding Style introduced by
Case breaking statements must be followed by a single blank line
Loading history...
374
                default:
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 12 spaces, found 16
Loading history...
375
                    throw new Exception("Unsupported database type (".$this->dbType.")");
0 ignored issues
show
Coding Style introduced by
Case breaking statement must be indented 4 spaces from SWITCH keyword
Loading history...
Coding Style Comprehensibility introduced by
The string literal Unsupported database type ( does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal ) does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Bug introduced by
Are you sure $this->dbType of type mixed can be used in concatenation? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

375
                    throw new Exception("Unsupported database type ("./** @scrutinizer ignore-type */ $this->dbType.")");
Loading history...
376
            }
0 ignored issues
show
Coding Style introduced by
End comment for long condition not found; expected "//end switch"
Loading history...
377
        } catch (PDOException $e) {
378
            throw new Exception(
379
                "Connection to ".$this->dbType." failed with message: ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Connection to does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal failed with message: does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
380
                $e->getMessage()
381
            );
382
        }
0 ignored issues
show
Coding Style introduced by
End comment for long condition not found; expected "//end try"
Loading history...
383
384
        if (is_null($this->dbHandler)) {
385
            throw new Exception("Connection to ".$this->dbType."failed");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Connection to does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal failed does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
386
        }
387
388
        $this->dbHandler->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_NATURAL);
389
        $this->typeAdapter = TypeAdapterFactory::create($this->dbType, $this->dbHandler, $this->dumpSettings);
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 110 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
390
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end connect()
Loading history...
391
392
    /**
393
     * Primary function, triggers dumping.
394
     *
395
     * @param string $filename  Name of file to write sql dump to
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
396
     * @return null
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
397
     * @throws \Exception
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
introduced by
Comment missing for @throws tag in function comment
Loading history...
398
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag for "Exception" exception
Loading history...
399
    public function start($filename = '')
400
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
401
        // Output file can be redefined here
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
402
        if (!empty($filename)) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
403
            $this->fileName = $filename;
404
        }
405
406
        // Connect to database
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
407
        $this->connect();
408
409
        // Create output file
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
410
        $this->compressManager->open($this->fileName);
411
412
        // Write some basic info to output file
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
413
        $this->compressManager->write($this->getDumpFileHeader());
414
415
        // Store server settings and use sanner defaults to dump
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
416
        $this->compressManager->write(
417
            $this->typeAdapter->backup_parameters()
418
        );
419
420
        if ($this->dumpSettings['databases']) {
421
            $this->compressManager->write(
422
                $this->typeAdapter->getDatabaseHeader($this->dbName)
423
            );
424
            if ($this->dumpSettings['add-drop-database']) {
425
                $this->compressManager->write(
426
                    $this->typeAdapter->add_drop_database($this->dbName)
427
                );
428
            }
429
        }
430
431
        // Get table, view, trigger, procedures, functions and events structures from
432
        // database.
433
        $this->getDatabaseStructureTables();
434
        $this->getDatabaseStructureViews();
435
        $this->getDatabaseStructureTriggers();
436
        $this->getDatabaseStructureProcedures();
437
        $this->getDatabaseStructureFunctions();
438
        $this->getDatabaseStructureEvents();
439
440
        if ($this->dumpSettings['databases']) {
441
            $this->compressManager->write(
442
                $this->typeAdapter->databases($this->dbName)
443
            );
444
        }
445
446
        // If there still are some tables/views in include-tables array,
447
        // that means that some tables or views weren't found.
448
        // Give proper error and exit.
449
        // This check will be removed once include-tables supports regexps.
450
        if (0 < count($this->dumpSettings['include-tables'])) {
451
            $name = implode(",", $this->dumpSettings['include-tables']);
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal , does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
452
            throw new Exception("Table (".$name.") not found in database");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Table ( does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal ) not found in database does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
453
        }
454
455
        $this->exportTables();
456
        $this->exportTriggers();
457
        $this->exportFunctions();
458
        $this->exportProcedures();
459
        $this->exportViews();
460
        $this->exportEvents();
461
462
        // Restore saved parameters.
463
        $this->compressManager->write(
464
            $this->typeAdapter->restore_parameters()
465
        );
466
        // Write some stats to output file.
467
        $this->compressManager->write($this->getDumpFileFooter());
468
        // Close output file.
469
        $this->compressManager->close();
470
471
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
introduced by
Function return type is not void, but function is returning void here
Loading history...
472
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end start()
Loading history...
473
474
    /**
475
     * Returns header for dump file.
476
     *
477
     * @return string
478
     */
479
    private function getDumpFileHeader()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getDumpFileHeader" must be prefixed with an underscore
Loading history...
480
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
481
        $header = '';
482
        if (!$this->dumpSettings['skip-comments']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
483
            // Some info about software, source and time
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
484
            $header = "-- mysqldump-php https://github.com/ifsnop/mysqldump-php".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- mysqldump-php https:/...om/ifsnop/mysqldump-php does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
485
                    "--".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
486
                    "-- Host: {$this->host}\tDatabase: {$this->dbName}".PHP_EOL.
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $this instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
487
                    "-- ------------------------------------------------------".PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- ---------------------...----------------------- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
488
489
            if (!empty($this->version)) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
490
                $header .= "-- Server version \t".$this->version.PHP_EOL;
491
            }
492
493
            if (!$this->dumpSettings['skip-dump-date']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
494
                $header .= "-- Date: ".date('r').PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- Date: does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
495
            }
496
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
497
        return $header;
498
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getDumpFileHeader()
Loading history...
499
500
    /**
501
     * Returns footer for dump file.
502
     *
503
     * @return string
504
     */
505
    private function getDumpFileFooter()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getDumpFileFooter" must be prefixed with an underscore
Loading history...
506
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
507
        $footer = '';
508
        if (!$this->dumpSettings['skip-comments']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
509
            $footer .= '-- Dump completed';
510
            if (!$this->dumpSettings['skip-dump-date']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
511
                $footer .= ' on: '.date('r');
512
            }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
513
            $footer .= PHP_EOL;
514
        }
515
516
        return $footer;
517
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getDumpFileFooter()
Loading history...
518
519
    /**
520
     * Reads table names from database.
521
     * Fills $this->tables array so they will be dumped later.
522
     *
523
     * @return null
524
     */
525
    private function getDatabaseStructureTables()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getDatabaseStructureTables" must be prefixed with an underscore
Loading history...
526
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
527
        // Listing all tables from database
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
528
        if (empty($this->dumpSettings['include-tables'])) {
529
            // include all tables for now, blacklisting happens later
0 ignored issues
show
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
530
            foreach ($this->dbHandler->query($this->typeAdapter->show_tables($this->dbName)) as $row) {
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 103 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
531
                array_push($this->tables, current($row));
532
            }
533
        } else {
534
            // include only the tables mentioned in include-tables
0 ignored issues
show
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
535
            foreach ($this->dbHandler->query($this->typeAdapter->show_tables($this->dbName)) as $row) {
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 103 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
536
                if (in_array(current($row), $this->dumpSettings['include-tables'], true)) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
537
                    array_push($this->tables, current($row));
538
                    $elem = array_search(
539
                        current($row),
540
                        $this->dumpSettings['include-tables']
541
                    );
542
                    unset($this->dumpSettings['include-tables'][$elem]);
543
                }
544
            }
545
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
546
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
introduced by
Function return type is not void, but function is returning void here
Loading history...
547
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getDatabaseStructureTables()
Loading history...
548
549
    /**
550
     * Reads view names from database.
551
     * Fills $this->tables array so they will be dumped later.
552
     *
553
     * @return null
554
     */
555
    private function getDatabaseStructureViews()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getDatabaseStructureViews" must be prefixed with an underscore
Loading history...
556
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
557
        // Listing all views from database
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
558
        if (empty($this->dumpSettings['include-views'])) {
559
            // include all views for now, blacklisting happens later
0 ignored issues
show
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
560
            foreach ($this->dbHandler->query($this->typeAdapter->show_views($this->dbName)) as $row) {
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 102 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
561
                array_push($this->views, current($row));
562
            }
563
        } else {
564
            // include only the tables mentioned in include-tables
0 ignored issues
show
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
565
            foreach ($this->dbHandler->query($this->typeAdapter->show_views($this->dbName)) as $row) {
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 102 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
566
                if (in_array(current($row), $this->dumpSettings['include-views'], true)) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
567
                    array_push($this->views, current($row));
568
                    $elem = array_search(
569
                        current($row),
570
                        $this->dumpSettings['include-views']
571
                    );
572
                    unset($this->dumpSettings['include-views'][$elem]);
573
                }
574
            }
575
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
576
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
introduced by
Function return type is not void, but function is returning void here
Loading history...
577
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getDatabaseStructureViews()
Loading history...
578
579
    /**
580
     * Reads trigger names from database.
581
     * Fills $this->tables array so they will be dumped later.
582
     *
583
     * @return null
584
     */
585
    private function getDatabaseStructureTriggers()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getDatabaseStructureTriggers" must be prefixed with an underscore
Loading history...
586
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
587
        // Listing all triggers from database
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
588
        if (false === $this->dumpSettings['skip-triggers']) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
589
            foreach ($this->dbHandler->query($this->typeAdapter->show_triggers($this->dbName)) as $row) {
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 105 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
590
                array_push($this->triggers, $row['Trigger']);
591
            }
592
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
593
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
introduced by
Function return type is not void, but function is returning void here
Loading history...
594
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getDatabaseStructureTriggers()
Loading history...
595
596
    /**
597
     * Reads procedure names from database.
598
     * Fills $this->tables array so they will be dumped later.
599
     *
600
     * @return null
601
     */
602
    private function getDatabaseStructureProcedures()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getDatabaseStructureProcedures" must be prefixed with an underscore
Loading history...
603
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
604
        // Listing all procedures from database
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
605
        if ($this->dumpSettings['routines']) {
606
            foreach ($this->dbHandler->query($this->typeAdapter->show_procedures($this->dbName)) as $row) {
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 107 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
607
                array_push($this->procedures, $row['procedure_name']);
608
            }
609
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
610
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
introduced by
Function return type is not void, but function is returning void here
Loading history...
611
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getDatabaseStructureProcedures()
Loading history...
612
613
    /**
614
     * Reads functions names from database.
615
     * Fills $this->tables array so they will be dumped later.
616
     *
617
     * @return null
618
     */
619
    private function getDatabaseStructureFunctions()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getDatabaseStructureFunctions" must be prefixed with an underscore
Loading history...
620
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
621
        // Listing all functions from database
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
622
        if ($this->dumpSettings['routines']) {
623
            foreach ($this->dbHandler->query($this->typeAdapter->show_functions($this->dbName)) as $row) {
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 106 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
624
                array_push($this->functions, $row['function_name']);
625
            }
626
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
627
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
introduced by
Function return type is not void, but function is returning void here
Loading history...
628
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getDatabaseStructureFunctions()
Loading history...
629
630
    /**
631
     * Reads event names from database.
632
     * Fills $this->tables array so they will be dumped later.
633
     *
634
     * @return null
635
     */
636
    private function getDatabaseStructureEvents()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getDatabaseStructureEvents" must be prefixed with an underscore
Loading history...
637
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
638
        // Listing all events from database
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
639
        if ($this->dumpSettings['events']) {
640
            foreach ($this->dbHandler->query($this->typeAdapter->show_events($this->dbName)) as $row) {
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 103 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
641
                array_push($this->events, $row['event_name']);
642
            }
643
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
644
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
introduced by
Function return type is not void, but function is returning void here
Loading history...
645
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getDatabaseStructureEvents()
Loading history...
646
647
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $table should have a doc-comment as per coding-style.
Loading history...
Coding Style introduced by
Parameter $arr should have a doc-comment as per coding-style.
Loading history...
648
     * Compare if $table name matches with a definition inside $arr
649
     * @param $table string
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
Coding Style Documentation introduced by
Missing parameter name
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
650
     * @param $arr array with strings or patterns
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter name
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
651
     * @return boolean
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
652
     */
653
    private function matches($table, $arr)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::matches" must be prefixed with an underscore
Loading history...
introduced by
Type hint "table string" missing for
Loading history...
introduced by
Type hint "array" missing for
Loading history...
654
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
655
        $match = false;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
656
657
        foreach ($arr as $pattern) {
658
            if ('/' != $pattern[0]) {
0 ignored issues
show
Coding Style introduced by
Operator != prohibited; use !== instead
Loading history...
659
                continue;
660
            }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
661
            if (1 == preg_match($pattern, $table)) {
0 ignored issues
show
Coding Style introduced by
Operator == prohibited; use === instead
Loading history...
662
                $match = true;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
663
            }
664
        }
665
666
        return in_array($table, $arr) || $match;
0 ignored issues
show
Coding Style introduced by
Boolean operators are not allowed outside of control structure conditions
Loading history...
667
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end matches()
Loading history...
668
669
    /**
670
     * Exports all the tables selected from database
671
     *
672
     * @return null
0 ignored issues
show
introduced by
Function return type is not void, but function has no return statement
Loading history...
673
     */
674
    private function exportTables()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::exportTables" must be prefixed with an underscore
Loading history...
675
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
676
        // Exporting tables one by one
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
677
        foreach ($this->tables as $table) {
678
            if ($this->matches($table, $this->dumpSettings['exclude-tables'])) {
679
                continue;
680
            }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
681
            $this->getTableStructure($table);
682
            if (false === $this->dumpSettings['no-data']) { // don't break compatibility with old trigger
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 105 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
Coding Style introduced by
Comments may not appear after statements
Loading history...
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
683
                $this->listValues($table);
684
            } elseif (true === $this->dumpSettings['no-data']
0 ignored issues
show
Coding Style introduced by
Usage of ELSEIF not allowed; use ELSE IF instead
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
685
                 || $this->matches($table, $this->dumpSettings['no-data'])) {
0 ignored issues
show
Coding Style introduced by
Multi-line IF statement not indented correctly; expected 16 spaces but found 17
Loading history...
Coding Style introduced by
Closing parenthesis of a multi-line IF statement must be on a new line
Loading history...
686
                continue;
687
            } else {
688
                $this->listValues($table);
689
            }
690
        }
691
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end exportTables()
Loading history...
692
693
    /**
694
     * Exports all the views found in database
695
     *
696
     * @return null
0 ignored issues
show
introduced by
Function return type is not void, but function has no return statement
Loading history...
697
     */
698
    private function exportViews()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::exportViews" must be prefixed with an underscore
Loading history...
699
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
700
        if (false === $this->dumpSettings['no-create-info']) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
701
            // Exporting views one by one
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
702
            foreach ($this->views as $view) {
703
                if ($this->matches($view, $this->dumpSettings['exclude-tables'])) {
704
                    continue;
705
                }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
706
                $this->tableColumnTypes[$view] = $this->getTableColumnTypes($view);
707
                $this->getViewStructureTable($view);
708
            }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
709
            foreach ($this->views as $view) {
710
                if ($this->matches($view, $this->dumpSettings['exclude-tables'])) {
711
                    continue;
712
                }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
713
                $this->getViewStructureView($view);
714
            }
715
        }
716
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end exportViews()
Loading history...
717
718
    /**
719
     * Exports all the triggers found in database
720
     *
721
     * @return null
0 ignored issues
show
introduced by
Function return type is not void, but function has no return statement
Loading history...
722
     */
723
    private function exportTriggers()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::exportTriggers" must be prefixed with an underscore
Loading history...
724
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
725
        // Exporting triggers one by one
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
726
        foreach ($this->triggers as $trigger) {
727
            $this->getTriggerStructure($trigger);
728
        }
729
730
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected //end exportTriggers()
Loading history...
Coding Style introduced by
Function closing brace must go on the next line following the body; found 1 blank lines before brace
Loading history...
731
732
    /**
733
     * Exports all the procedures found in database
734
     *
735
     * @return null
0 ignored issues
show
introduced by
Function return type is not void, but function has no return statement
Loading history...
736
     */
737
    private function exportProcedures()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::exportProcedures" must be prefixed with an underscore
Loading history...
738
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
739
        // Exporting triggers one by one
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
740
        foreach ($this->procedures as $procedure) {
741
            $this->getProcedureStructure($procedure);
742
        }
743
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end exportProcedures()
Loading history...
744
745
    /**
746
     * Exports all the functions found in database
747
     *
748
     * @return null
0 ignored issues
show
introduced by
Function return type is not void, but function has no return statement
Loading history...
749
     */
750
    private function exportFunctions()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::exportFunctions" must be prefixed with an underscore
Loading history...
751
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
752
        // Exporting triggers one by one
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
753
        foreach ($this->functions as $function) {
754
            $this->getFunctionStructure($function);
755
        }
756
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end exportFunctions()
Loading history...
757
758
    /**
759
     * Exports all the events found in database
760
     *
761
     * @return null
0 ignored issues
show
introduced by
Function return type is not void, but function has no return statement
Loading history...
762
     */
763
    private function exportEvents()
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::exportEvents" must be prefixed with an underscore
Loading history...
764
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
765
        // Exporting triggers one by one
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
766
        foreach ($this->events as $event) {
767
            $this->getEventStructure($event);
768
        }
769
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end exportEvents()
Loading history...
770
771
    /**
772
     * Table structure extractor
773
     *
774
     * @todo move specific mysql code to typeAdapter
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 3 spaces but found 1
Loading history...
775
     * @param string $tableName  Name of table to export
0 ignored issues
show
Coding Style introduced by
Parameter tags must be grouped together in a doc comment
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
776
     * @return null
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
777
     */
778
    private function getTableStructure($tableName)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getTableStructure" must be prefixed with an underscore
Loading history...
779
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
780
        if (!$this->dumpSettings['no-create-info']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
781
            $ret = '';
782
            if (!$this->dumpSettings['skip-comments']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
783
                $ret = "--".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
784
                    "-- Table structure for table `$tableName`".PHP_EOL.
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $tableName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
785
                    "--".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
786
            }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
787
            $stmt = $this->typeAdapter->show_create_table($tableName);
788
            foreach ($this->dbHandler->query($stmt) as $r) {
789
                $this->compressManager->write($ret);
790
                if ($this->dumpSettings['add-drop-table']) {
791
                    $this->compressManager->write(
792
                        $this->typeAdapter->drop_table($tableName)
793
                    );
794
                }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
795
                $this->compressManager->write(
796
                    $this->typeAdapter->create_table($r)
797
                );
798
                break;
799
            }
800
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
Coding Style introduced by
End comment for long condition not found; expected "//end if"
Loading history...
801
        $this->tableColumnTypes[$tableName] = $this->getTableColumnTypes($tableName);
802
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
introduced by
Function return type is not void, but function is returning void here
Loading history...
803
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getTableStructure()
Loading history...
804
805
    /**
806
     * Store column types to create data dumps and for Stand-In tables
807
     *
808
     * @param string $tableName  Name of table to export
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
809
     * @return array type column types detailed
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
810
     */
0 ignored issues
show
Coding Style introduced by
There must be no blank lines after the function comment
Loading history...
811
812
    private function getTableColumnTypes($tableName)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
Coding Style introduced by
Private method name "Mysqldump::getTableColumnTypes" must be prefixed with an underscore
Loading history...
813
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
814
        $columnTypes = array();
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
815
        $columns = $this->dbHandler->query(
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
816
            $this->typeAdapter->show_columns($tableName)
817
        );
818
        $columns->setFetchMode(PDO::FETCH_ASSOC);
819
820
        foreach ($columns as $key => $col) {
821
            $types = $this->typeAdapter->parseColumnType($col);
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 22 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
822
            $columnTypes[$col['Field']] = array(
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
823
                'is_numeric'=> $types['is_numeric'],
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 43 spaces, but found 16.
Loading history...
Coding Style introduced by
Expected 1 space before "=>"; 0 found
Loading history...
824
                'is_blob' => $types['is_blob'],
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 43 spaces, but found 16.
Loading history...
825
                'type' => $types['type'],
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 43 spaces, but found 16.
Loading history...
826
                'type_sql' => $col['Type'],
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 43 spaces, but found 16.
Loading history...
827
                'is_virtual' => $types['is_virtual']
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 43 spaces, but found 16.
Loading history...
828
            );
0 ignored issues
show
Coding Style introduced by
The closing parenthesis does not seem to be aligned correctly; expected 42 space(s), but found 12.
Loading history...
829
        }
830
831
        return $columnTypes;
832
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getTableColumnTypes()
Loading history...
833
834
    /**
835
     * View structure extractor, create table (avoids cyclic references)
836
     *
837
     * @todo move mysql specific code to typeAdapter
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 3 spaces but found 1
Loading history...
838
     * @param string $viewName  Name of view to export
0 ignored issues
show
Coding Style introduced by
Parameter tags must be grouped together in a doc comment
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
839
     * @return null
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
introduced by
Function return type is not void, but function has no return statement
Loading history...
840
     */
841
    private function getViewStructureTable($viewName)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getViewStructureTable" must be prefixed with an underscore
Loading history...
842
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
843
        if (!$this->dumpSettings['skip-comments']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
844
            $ret = "--".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
845
                "-- Stand-In structure for view `${viewName}`".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
846
                "--".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
847
            $this->compressManager->write($ret);
848
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
849
        $stmt = $this->typeAdapter->show_create_view($viewName);
850
851
        // create views as tables, to resolve dependencies
0 ignored issues
show
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
852
        foreach ($this->dbHandler->query($stmt) as $r) {
853
            if ($this->dumpSettings['add-drop-table']) {
854
                $this->compressManager->write(
855
                    $this->typeAdapter->drop_view($viewName)
856
                );
857
            }
858
859
            $this->compressManager->write(
860
                $this->createStandInTable($viewName)
861
            );
862
            break;
863
        }
864
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getViewStructureTable()
Loading history...
865
866
    /**
867
     * Write a create table statement for the table Stand-In, show create
868
     * table would return a create algorithm when used on a view
869
     *
870
     * @param string $viewName  Name of view to export
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
871
     * @return string create statement
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
872
     */
873
    public function createStandInTable($viewName)
874
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
875
        $ret = array();
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
876
        foreach ($this->tableColumnTypes[$viewName] as $k => $v) {
877
            $ret[] = "`${k}` ${v['type_sql']}";
878
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
879
        $ret = implode(PHP_EOL.",", $ret);
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal , does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
880
881
        $ret = "CREATE TABLE IF NOT EXISTS `$viewName` (".
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $viewName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
882
            PHP_EOL.$ret.PHP_EOL.");".PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ); does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
883
884
        return $ret;
885
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end createStandInTable()
Loading history...
886
887
    /**
888
     * View structure extractor, create view
889
     *
890
     * @todo move mysql specific code to typeAdapter
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 3 spaces but found 1
Loading history...
891
     * @param string $viewName  Name of view to export
0 ignored issues
show
Coding Style introduced by
Parameter tags must be grouped together in a doc comment
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
892
     * @return null
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
introduced by
Function return type is not void, but function has no return statement
Loading history...
893
     */
894
    private function getViewStructureView($viewName)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getViewStructureView" must be prefixed with an underscore
Loading history...
895
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
896
        if (!$this->dumpSettings['skip-comments']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
897
            $ret = "--".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
898
                "-- View structure for view `${viewName}`".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
899
                "--".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
900
            $this->compressManager->write($ret);
901
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
902
        $stmt = $this->typeAdapter->show_create_view($viewName);
903
904
        // create views, to resolve dependencies
0 ignored issues
show
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
905
        // replacing tables with views
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
906
        foreach ($this->dbHandler->query($stmt) as $r) {
907
            // because we must replace table with view, we should delete it
0 ignored issues
show
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
908
            $this->compressManager->write(
909
                $this->typeAdapter->drop_view($viewName)
910
            );
911
            $this->compressManager->write(
912
                $this->typeAdapter->create_view($r)
913
            );
914
            break;
915
        }
916
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getViewStructureView()
Loading history...
917
918
    /**
919
     * Trigger structure extractor
920
     *
921
     * @param string $triggerName  Name of trigger to export
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
922
     * @return null
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
923
     */
924
    private function getTriggerStructure($triggerName)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getTriggerStructure" must be prefixed with an underscore
Loading history...
925
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
926
        $stmt = $this->typeAdapter->show_create_trigger($triggerName);
927
        foreach ($this->dbHandler->query($stmt) as $r) {
928
            if ($this->dumpSettings['add-drop-trigger']) {
929
                $this->compressManager->write(
930
                    $this->typeAdapter->add_drop_trigger($triggerName)
931
                );
932
            }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
933
            $this->compressManager->write(
934
                $this->typeAdapter->create_trigger($r)
935
            );
936
            return;
0 ignored issues
show
introduced by
Function return type is not void, but function is returning void here
Loading history...
937
        }
938
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getTriggerStructure()
Loading history...
939
940
    /**
941
     * Procedure structure extractor
942
     *
943
     * @param string $procedureName  Name of procedure to export
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
944
     * @return null
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
945
     */
946
    private function getProcedureStructure($procedureName)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getProcedureStructure" must be prefixed with an underscore
Loading history...
947
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
948
        if (!$this->dumpSettings['skip-comments']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
949
            $ret = "--".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
950
                "-- Dumping routines for database '".$this->dbName."'".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
951
                "--".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
952
            $this->compressManager->write($ret);
953
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
954
        $stmt = $this->typeAdapter->show_create_procedure($procedureName);
955
        foreach ($this->dbHandler->query($stmt) as $r) {
956
            $this->compressManager->write(
957
                $this->typeAdapter->create_procedure($r)
958
            );
959
            return;
0 ignored issues
show
introduced by
Function return type is not void, but function is returning void here
Loading history...
960
        }
961
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getProcedureStructure()
Loading history...
962
963
    /**
964
     * Function structure extractor
965
     *
966
     * @param string $functionName  Name of function to export
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
967
     * @return null
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
968
     */
969
    private function getFunctionStructure($functionName)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getFunctionStructure" must be prefixed with an underscore
Loading history...
970
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
971
        if (!$this->dumpSettings['skip-comments']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
972
            $ret = "--".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
973
                "-- Dumping routines for database '".$this->dbName."'".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
974
                "--".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
975
            $this->compressManager->write($ret);
976
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
977
        $stmt = $this->typeAdapter->show_create_function($functionName);
978
        foreach ($this->dbHandler->query($stmt) as $r) {
979
            $this->compressManager->write(
980
                $this->typeAdapter->create_function($r)
981
            );
982
            return;
0 ignored issues
show
introduced by
Function return type is not void, but function is returning void here
Loading history...
983
        }
984
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getFunctionStructure()
Loading history...
985
986
    /**
987
     * Event structure extractor
988
     *
989
     * @param string $eventName  Name of event to export
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
990
     * @return null
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
991
     */
992
    private function getEventStructure($eventName)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::getEventStructure" must be prefixed with an underscore
Loading history...
993
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
994
        if (!$this->dumpSettings['skip-comments']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
995
            $ret = "--".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
996
                "-- Dumping events for database '".$this->dbName."'".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
997
                "--".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
998
            $this->compressManager->write($ret);
999
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
1000
        $stmt = $this->typeAdapter->show_create_event($eventName);
1001
        foreach ($this->dbHandler->query($stmt) as $r) {
1002
            $this->compressManager->write(
1003
                $this->typeAdapter->create_event($r)
1004
            );
1005
            return;
0 ignored issues
show
introduced by
Function return type is not void, but function is returning void here
Loading history...
1006
        }
1007
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getEventStructure()
Loading history...
1008
1009
    /**
1010
     * Prepare values for output
1011
     *
1012
     * @param string $tableName Name of table which contains rows
0 ignored issues
show
introduced by
Parameter comment must end with a full stop
Loading history...
1013
     * @param array $row Associative array of column names and values to be
0 ignored issues
show
Coding Style introduced by
Expected 2 spaces after parameter type; 1 found
Loading history...
Coding Style introduced by
Expected 7 spaces after parameter name; 1 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
1014
     *   quoted
0 ignored issues
show
Coding Style introduced by
Parameter comment not aligned correctly; expected 19 spaces but found 3
Loading history...
1015
     *
1016
     * @return array
1017
     */
1018
    private function prepareColumnValues($tableName, array $row)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::prepareColumnValues" must be prefixed with an underscore
Loading history...
1019
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1020
        $ret = array();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 9 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1021
        $columnTypes = $this->tableColumnTypes[$tableName];
1022
1023
        if ($this->transformTableRowCallable) {
1024
            $row = call_user_func($this->transformTableRowCallable, $tableName, $row);
1025
        }
1026
1027
        foreach ($row as $colName => $colValue) {
1028
            if ($this->transformColumnValueCallable) {
1029
                $colValue = call_user_func($this->transformColumnValueCallable, $tableName, $colName, $colValue, $row);
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 119 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
1030
            }
1031
1032
            $ret[] = $this->escape($colValue, $columnTypes[$colName]);
1033
        }
1034
1035
        return $ret;
1036
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end prepareColumnValues()
Loading history...
1037
1038
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $colValue should have a doc-comment as per coding-style.
Loading history...
Coding Style introduced by
Parameter $colType should have a doc-comment as per coding-style.
Loading history...
1039
     * Escape values with quotes when needed
1040
     *
1041
     * @param string $tableName Name of table which contains rows
0 ignored issues
show
Coding Style introduced by
Doc comment for parameter $tableName does not match actual variable name $colValue
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
1042
     * @param array $row Associative array of column names and values to be quoted
0 ignored issues
show
Coding Style introduced by
Expected 2 spaces after parameter type; 1 found
Loading history...
Coding Style introduced by
Doc comment for parameter $row does not match actual variable name $colType
Loading history...
Coding Style introduced by
Expected 7 spaces after parameter name; 1 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
1043
     *
1044
     * @return string
1045
     */
1046
    private function escape($colValue, $colType)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::escape" must be prefixed with an underscore
Loading history...
introduced by
Type hint "array" missing for $row
Loading history...
1047
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1048
        if (is_null($colValue)) {
1049
            return "NULL";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal NULL does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1050
        } elseif ($this->dumpSettings['hex-blob'] && $colType['is_blob']) {
0 ignored issues
show
Coding Style introduced by
Usage of ELSEIF not allowed; use ELSE IF instead
Loading history...
1051
            if ($colType['type'] == 'bit' || !empty($colValue)) {
0 ignored issues
show
Coding Style introduced by
Operator == prohibited; use === instead
Loading history...
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1052
                return "0x${colValue}";
1053
            } else {
1054
                return "''";
1055
            }
1056
        } elseif ($colType['is_numeric']) {
0 ignored issues
show
Coding Style introduced by
Usage of ELSEIF not allowed; use ELSE IF instead
Loading history...
1057
            return $colValue;
1058
        }
1059
1060
        return $this->dbHandler->quote($colValue);
1061
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end escape()
Loading history...
1062
1063
    /**
1064
     * Set a callable that will be used to transform table rows
1065
     *
1066
     * @param callable $callable
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
1067
     *
1068
     * @return void
1069
     */
1070
    public function setTransformTableRowHook($callable)
0 ignored issues
show
introduced by
Type hint "callable" missing for $callable
Loading history...
1071
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1072
        $this->transformTableRowCallable = $callable;
1073
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end setTransformTableRowHook()
Loading history...
1074
1075
    /**
1076
     * Set a callable that will be used to transform column values
1077
     *
1078
     * @param callable $callable
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
1079
     *
1080
     * @return void
1081
     *
1082
     * @deprecated Use setTransformTableRowHook instead for better performance
1083
     */
1084
    public function setTransformColumnValueHook($callable)
0 ignored issues
show
introduced by
Type hint "callable" missing for $callable
Loading history...
1085
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1086
        $this->transformColumnValueCallable = $callable;
1087
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end setTransformColumnValueHook()
Loading history...
1088
1089
    /**
1090
     * Set a callable that will be used to report dump information
1091
     *
1092
     * @param callable $callable
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
1093
     *
1094
     * @return void
1095
     */
1096
    public function setInfoHook($callable)
0 ignored issues
show
introduced by
Type hint "callable" missing for $callable
Loading history...
1097
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1098
        $this->infoCallable = $callable;
1099
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end setInfoHook()
Loading history...
1100
1101
    /**
1102
     * Table rows extractor
1103
     *
1104
     * @param string $tableName  Name of table to export
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
1105
     *
1106
     * @return null
0 ignored issues
show
introduced by
Function return type is not void, but function has no return statement
Loading history...
1107
     */
1108
    private function listValues($tableName)
0 ignored issues
show
Coding Style introduced by
Private method name "Mysqldump::listValues" must be prefixed with an underscore
Loading history...
1109
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1110
        $this->prepareListValues($tableName);
1111
1112
        $onlyOnce = true;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
1113
        $lineSize = 0;
1114
1115
        // colStmt is used to form a query to obtain row values
0 ignored issues
show
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
1116
        $colStmt = $this->getColumnStmt($tableName);
1117
        // colNames is used to get the name of the columns when using complete-insert
0 ignored issues
show
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
1118
        if ($this->dumpSettings['complete-insert']) {
1119
            $colNames = $this->getColumnNames($tableName);
1120
        }
1121
1122
        $stmt = "SELECT ".implode(",", $colStmt)." FROM `$tableName`";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal SELECT does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal , does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $tableName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1123
1124
        // Table specific conditions override the default 'where'
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
1125
        $condition = $this->getTableWhere($tableName);
1126
1127
        if ($condition) {
1128
            $stmt .= " WHERE {$condition}";
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $condition instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1129
        }
1130
1131
        $limit = $this->getTableLimit($tableName);
1132
1133
        if ($limit) {
1134
            $stmt .= " LIMIT {$limit}";
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $limit instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1135
        }
1136
1137
        $resultSet = $this->dbHandler->query($stmt);
1138
        $resultSet->setFetchMode(PDO::FETCH_ASSOC);
1139
1140
        $ignore = $this->dumpSettings['insert-ignore'] ? '  IGNORE' : '';
0 ignored issues
show
Coding Style introduced by
The value of a comparison must not be assigned to a variable
Loading history...
Coding Style introduced by
Inline IF statements are not allowed
Loading history...
Coding Style introduced by
Inline shorthand IF statement requires brackets around comparison
Loading history...
1141
1142
        $count = 0;
1143
        foreach ($resultSet as $row) {
1144
            $count++;
1145
            $vals = $this->prepareColumnValues($tableName, $row);
1146
            if ($onlyOnce || !$this->dumpSettings['extended-insert']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1147
                if ($this->dumpSettings['complete-insert']) {
1148
                    $lineSize += $this->compressManager->write(
1149
                        "INSERT$ignore INTO `$tableName` (".
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $ignore instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $tableName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1150
                        implode(", ", $colNames).
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal , does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
Comprehensibility Best Practice introduced by
The variable $colNames does not seem to be defined for all execution paths leading up to this point.
Loading history...
1151
                        ") VALUES (".implode(",", $vals).")"
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ) VALUES ( does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal , does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal ) does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1152
                    );
1153
                } else {
1154
                    $lineSize += $this->compressManager->write(
1155
                        "INSERT$ignore INTO `$tableName` VALUES (".implode(",", $vals).")"
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $ignore instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $tableName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
Coding Style Comprehensibility introduced by
The string literal , does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal ) does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1156
                    );
1157
                }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
1158
                $onlyOnce = false;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
1159
            } else {
1160
                $lineSize += $this->compressManager->write(",(".implode(",", $vals).")");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ,( does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal , does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal ) does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1161
            }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
1162
            if (($lineSize > $this->dumpSettings['net_buffer_length']) ||
1163
                    !$this->dumpSettings['extended-insert']) {
0 ignored issues
show
Coding Style introduced by
Multi-line IF statement not indented correctly; expected 16 spaces but found 20
Loading history...
Coding Style introduced by
Each line in a multi-line IF statement must begin with a boolean operator
Loading history...
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
Coding Style introduced by
Closing parenthesis of a multi-line IF statement must be on a new line
Loading history...
1164
                $onlyOnce = true;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
1165
                $lineSize = $this->compressManager->write(";".PHP_EOL);
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1166
            }
1167
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
Coding Style introduced by
End comment for long condition not found; expected "//end foreach"
Loading history...
1168
        $resultSet->closeCursor();
1169
1170
        if (!$onlyOnce) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1171
            $this->compressManager->write(";".PHP_EOL);
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1172
        }
1173
1174
        $this->endListValues($tableName, $count);
1175
1176
        if ($this->infoCallable) {
1177
            call_user_func($this->infoCallable, 'table', array('name' => $tableName, 'rowCount' => $count));
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 108 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
1178
        }
1179
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end listValues()
Loading history...
1180
1181
    /**
1182
     * Table rows extractor, append information prior to dump
1183
     *
1184
     * @param string $tableName  Name of table to export
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
1185
     *
1186
     * @return null
1187
     */
1188
    public function prepareListValues($tableName)
1189
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1190
        if (!$this->dumpSettings['skip-comments']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1191
            $this->compressManager->write(
1192
                "--".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1193
                "-- Dumping data for table `$tableName`".PHP_EOL.
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $tableName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1194
                "--".PHP_EOL.PHP_EOL
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1195
            );
1196
        }
1197
1198
        if ($this->dumpSettings['single-transaction']) {
1199
            $this->dbHandler->exec($this->typeAdapter->setup_transaction());
1200
            $this->dbHandler->exec($this->typeAdapter->start_transaction());
1201
        }
1202
1203
        if ($this->dumpSettings['lock-tables'] && !$this->dumpSettings['single-transaction']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1204
            $this->typeAdapter->lock_table($tableName);
1205
        }
1206
1207
        if ($this->dumpSettings['add-locks']) {
1208
            $this->compressManager->write(
1209
                $this->typeAdapter->start_add_lock_table($tableName)
1210
            );
1211
        }
1212
1213
        if ($this->dumpSettings['disable-keys']) {
1214
            $this->compressManager->write(
1215
                $this->typeAdapter->start_add_disable_keys($tableName)
1216
            );
1217
        }
1218
1219
        // Disable autocommit for faster reload
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
1220
        if ($this->dumpSettings['no-autocommit']) {
1221
            $this->compressManager->write(
1222
                $this->typeAdapter->start_disable_autocommit()
1223
            );
1224
        }
1225
1226
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
introduced by
Function return type is not void, but function is returning void here
Loading history...
1227
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end prepareListValues()
Loading history...
1228
1229
    /**
1230
     * Table rows extractor, close locks and commits after dump
1231
     *
1232
     * @param string $tableName Name of table to export.
0 ignored issues
show
Coding Style introduced by
Expected 2 spaces after parameter type; 1 found
Loading history...
1233
     * @param integer    $count     Number of rows inserted.
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 4 found
Loading history...
1234
     *
1235
     * @return void
1236
     */
1237
    public function endListValues($tableName, $count = 0)
1238
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1239
        if ($this->dumpSettings['disable-keys']) {
1240
            $this->compressManager->write(
1241
                $this->typeAdapter->end_add_disable_keys($tableName)
1242
            );
1243
        }
1244
1245
        if ($this->dumpSettings['add-locks']) {
1246
            $this->compressManager->write(
1247
                $this->typeAdapter->end_add_lock_table($tableName)
1248
            );
1249
        }
1250
1251
        if ($this->dumpSettings['single-transaction']) {
1252
            $this->dbHandler->exec($this->typeAdapter->commit_transaction());
1253
        }
1254
1255
        if ($this->dumpSettings['lock-tables'] && !$this->dumpSettings['single-transaction']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1256
            $this->typeAdapter->unlock_table($tableName);
1257
        }
1258
1259
        // Commit to enable autocommit
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
1260
        if ($this->dumpSettings['no-autocommit']) {
1261
            $this->compressManager->write(
1262
                $this->typeAdapter->end_disable_autocommit()
1263
            );
1264
        }
1265
1266
        $this->compressManager->write(PHP_EOL);
1267
1268
        if (!$this->dumpSettings['skip-comments']) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1269
            $this->compressManager->write(
1270
                "-- Dumped table `".$tableName."` with $count row(s)".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- Dumped table ` does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $count instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1271
                '--'.PHP_EOL.PHP_EOL
1272
            );
1273
        }
1274
1275
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
1276
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end endListValues()
Loading history...
1277
1278
    /**
1279
     * Build SQL List of all columns on current table which will be used for selecting
1280
     *
1281
     * @param string $tableName  Name of table to get columns
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
1282
     *
1283
     * @return array SQL sentence with columns for select
1284
     */
1285
    public function getColumnStmt($tableName)
1286
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1287
        $colStmt = array();
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1288
        foreach ($this->tableColumnTypes[$tableName] as $colName => $colType) {
1289
            if ($colType['type'] == 'bit' && $this->dumpSettings['hex-blob']) {
0 ignored issues
show
Coding Style introduced by
Operator == prohibited; use === instead
Loading history...
1290
                $colStmt[] = "LPAD(HEX(`${colName}`),2,'0') AS `${colName}`";
1291
            } elseif ($colType['is_blob'] && $this->dumpSettings['hex-blob']) {
0 ignored issues
show
Coding Style introduced by
Usage of ELSEIF not allowed; use ELSE IF instead
Loading history...
1292
                $colStmt[] = "HEX(`${colName}`) AS `${colName}`";
1293
            } elseif ($colType['is_virtual']) {
0 ignored issues
show
Coding Style introduced by
Usage of ELSEIF not allowed; use ELSE IF instead
Loading history...
1294
                $this->dumpSettings['complete-insert'] = true;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
1295
                continue;
1296
            } else {
1297
                $colStmt[] = "`${colName}`";
1298
            }
1299
        }
1300
1301
        return $colStmt;
1302
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getColumnStmt()
Loading history...
1303
1304
    /**
1305
     * Build SQL List of all columns on current table which will be used for inserting
1306
     *
1307
     * @param string $tableName  Name of table to get columns
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 2 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
1308
     *
1309
     * @return array columns for sql sentence for insert
1310
     */
1311
    public function getColumnNames($tableName)
1312
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1313
        $colNames = array();
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1314
        foreach ($this->tableColumnTypes[$tableName] as $colName => $colType) {
1315
            if ($colType['is_virtual']) {
1316
                $this->dumpSettings['complete-insert'] = true;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
1317
                continue;
1318
            } else {
1319
                $colNames[] = "`${colName}`";
1320
            }
1321
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
1322
        return $colNames;
1323
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getColumnNames()
Loading history...
1324
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1325
1326
/**
1327
 * Enum with all available compression methods
1328
 *
1329
 */
0 ignored issues
show
Coding Style introduced by
Additional blank lines found at end of doc comment
Loading history...
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
1330
abstract class CompressMethod
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1331
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class CompressMethod
Loading history...
1332
    public static $enums = array(
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1333
        Mysqldump::NONE,
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 28 spaces, but found 8.
Loading history...
1334
        Mysqldump::GZIP,
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 28 spaces, but found 8.
Loading history...
1335
        Mysqldump::BZIP2,
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 28 spaces, but found 8.
Loading history...
1336
        Mysqldump::GZIPSTREAM,
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 28 spaces, but found 8.
Loading history...
1337
    );
0 ignored issues
show
Coding Style introduced by
The closing parenthesis does not seem to be aligned correctly; expected 27 space(s), but found 4.
Loading history...
1338
1339
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
1340
     * @param string $c
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
1341
     * @return boolean
1342
     */
1343
    public static function isValid($c)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
1344
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1345
        return in_array($c, self::$enums);
1346
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end isValid()
Loading history...
1347
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1348
1349
abstract class CompressManagerFactory
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1350
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class CompressManagerFactory
Loading history...
1351
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
1352
     * @param string $c
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
1353
     * @return CompressBzip2|CompressGzip|CompressNone
1354
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
1355
    public static function create($c)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 0 found
Loading history...
1356
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1357
        $c = ucfirst(strtolower($c));
1358
        if (!CompressMethod::isValid($c)) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1359
            throw new Exception("Compression method ($c) is not defined yet");
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $c instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1360
        }
1361
1362
        $method = __NAMESPACE__."\\"."Compress".$c;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal \\ does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal Compress does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1363
1364
        return new $method;
1365
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create()
Loading history...
1366
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1367
1368
class CompressBzip2 extends CompressManagerFactory
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1369
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class CompressBzip2
Loading history...
1370
    private $fileHandler = null;
0 ignored issues
show
Coding Style introduced by
Private member variable "fileHandler" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "fileHandler" must be prefixed with an underscore
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
1371
1372
    public function __construct()
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1373
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1374
        if (!function_exists("bzopen")) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
Coding Style Comprehensibility introduced by
The string literal bzopen does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1375
            throw new Exception("Compression is enabled, but bzip2 lib is not installed or configured properly");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Compression is enabled, ... or configured properly does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 113 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
1376
        }
1377
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end __construct()
Loading history...
1378
1379
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
1380
     * @param string $filename
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
1381
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
1382
    public function open($filename)
1383
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1384
        $this->fileHandler = bzopen($filename, "w");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal w does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1385
        if (false === $this->fileHandler) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
1386
            throw new Exception("Output file is not writable");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Output file is not writable does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1387
        }
1388
1389
        return true;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
1390
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end open()
Loading history...
1391
1392
    public function write($str)
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
1393
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1394
        $bytesWritten = bzwrite($this->fileHandler, $str);
1395
        if (false === $bytesWritten) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
1396
            throw new Exception("Writting to file failed! Probably, there is no more free space left?");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Writting to file failed!...o more free space left? does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 104 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
1397
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
1398
        return $bytesWritten;
1399
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end write()
Loading history...
1400
1401
    public function close()
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
1402
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1403
        return bzclose($this->fileHandler);
1404
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end close()
Loading history...
1405
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1406
1407
class CompressGzip extends CompressManagerFactory
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1408
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class CompressGzip
Loading history...
1409
    private $fileHandler = null;
0 ignored issues
show
Coding Style introduced by
Private member variable "fileHandler" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "fileHandler" must be prefixed with an underscore
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
1410
1411
    public function __construct()
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1412
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1413
        if (!function_exists("gzopen")) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
Coding Style Comprehensibility introduced by
The string literal gzopen does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1414
            throw new Exception("Compression is enabled, but gzip lib is not installed or configured properly");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Compression is enabled, ... or configured properly does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 112 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
1415
        }
1416
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end __construct()
Loading history...
1417
1418
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
1419
     * @param string $filename
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
1420
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
1421
    public function open($filename)
1422
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1423
        $this->fileHandler = gzopen($filename, "wb");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal wb does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1424
        if (false === $this->fileHandler) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
1425
            throw new Exception("Output file is not writable");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Output file is not writable does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1426
        }
1427
1428
        return true;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
1429
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end open()
Loading history...
1430
1431
    public function write($str)
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
1432
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1433
        $bytesWritten = gzwrite($this->fileHandler, $str);
1434
        if (false === $bytesWritten) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
1435
            throw new Exception("Writting to file failed! Probably, there is no more free space left?");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Writting to file failed!...o more free space left? does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 104 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
1436
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
1437
        return $bytesWritten;
1438
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end write()
Loading history...
1439
1440
    public function close()
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
1441
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1442
        return gzclose($this->fileHandler);
1443
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end close()
Loading history...
1444
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1445
1446
class CompressNone extends CompressManagerFactory
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1447
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class CompressNone
Loading history...
1448
    private $fileHandler = null;
0 ignored issues
show
Coding Style introduced by
Private member variable "fileHandler" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "fileHandler" must be prefixed with an underscore
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
1449
1450
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
1451
     * @param string $filename
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
1452
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
1453
    public function open($filename)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
1454
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1455
        $this->fileHandler = fopen($filename, "wb");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal wb does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1456
        if (false === $this->fileHandler) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
1457
            throw new Exception("Output file is not writable");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Output file is not writable does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1458
        }
1459
1460
        return true;
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
1461
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end open()
Loading history...
1462
1463
    public function write($str)
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
1464
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1465
        $bytesWritten = fwrite($this->fileHandler, $str);
1466
        if (false === $bytesWritten) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
1467
            throw new Exception("Writting to file failed! Probably, there is no more free space left?");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Writting to file failed!...o more free space left? does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 104 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
1468
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
1469
        return $bytesWritten;
1470
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end write()
Loading history...
1471
1472
    public function close()
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
1473
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1474
        return fclose($this->fileHandler);
1475
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end close()
Loading history...
1476
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1477
1478
class CompressGzipstream extends CompressManagerFactory
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1479
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class CompressGzipstream
Loading history...
1480
  private $fileHandler = null;
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
Coding Style introduced by
Private member variable "fileHandler" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "fileHandler" must be prefixed with an underscore
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
1481
1482
  private $compressContext;
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
Coding Style introduced by
Private member variable "compressContext" must contain a leading underscore
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Private member variable "compressContext" must be prefixed with an underscore
Loading history...
1483
1484
  /**
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 4 spaces, found 2
Loading history...
Coding Style introduced by
Missing short description in doc comment
Loading history...
1485
   * @param string $filename
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
1486
   */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
1487
  public function open($filename)
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
1488
  {
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 4 spaces, found 2
Loading history...
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1489
    $this->fileHandler = fopen($filename, "wb");
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 8 spaces, found 4
Loading history...
Coding Style Comprehensibility introduced by
The string literal wb does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1490
    if (false === $this->fileHandler) {
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 8 spaces, found 4
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
1491
      throw new Exception("Output file is not writable");
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 12 spaces, found 6
Loading history...
Coding Style Comprehensibility introduced by
The string literal Output file is not writable does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1492
    }
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 8 spaces, found 4
Loading history...
1493
1494
    $this->compressContext = deflate_init(ZLIB_ENCODING_GZIP, array('level' => 9));
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 8 spaces, found 4
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1495
    return true;
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 8 spaces, found 4
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
1496
  }
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end open()
Loading history...
1497
1498
  public function write($str)
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1499
  {
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 4 spaces, found 2
Loading history...
Coding Style introduced by
Expected 0 blank lines after opening function brace; 1 found
Loading history...
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1500
1501
    $bytesWritten = fwrite($this->fileHandler, deflate_add($this->compressContext, $str, ZLIB_NO_FLUSH));
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 8 spaces, found 4
Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 105 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
1502
    if (false === $bytesWritten) {
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 8 spaces, found 4
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
1503
      throw new Exception("Writting to file failed! Probably, there is no more free space left?");
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 12 spaces, found 6
Loading history...
Coding Style Comprehensibility introduced by
The string literal Writting to file failed!...o more free space left? does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1504
    }
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 8 spaces, found 4
Loading history...
Coding Style introduced by
No blank line found after control structure
Loading history...
1505
    return $bytesWritten;
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 8 spaces, found 4
Loading history...
1506
  }
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end write()
Loading history...
1507
1508
  public function close()
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1509
  {
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 4 spaces, found 2
Loading history...
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1510
    fwrite($this->fileHandler, deflate_add($this->compressContext, '', ZLIB_FINISH));
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 8 spaces, found 4
Loading history...
1511
    return fclose($this->fileHandler);
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected at least 8 spaces, found 4
Loading history...
1512
  }
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 2
Loading history...
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end close()
Loading history...
1513
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1514
1515
/**
1516
 * Enum with all available TypeAdapter implementations
1517
 *
1518
 */
0 ignored issues
show
Coding Style introduced by
Additional blank lines found at end of doc comment
Loading history...
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
1519
abstract class TypeAdapter
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1520
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class TypeAdapter
Loading history...
1521
    public static $enums = array(
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1522
        "Sqlite",
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 28 spaces, but found 8.
Loading history...
Coding Style Comprehensibility introduced by
The string literal Sqlite does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1523
        "Mysql"
0 ignored issues
show
Coding Style introduced by
There should be a trailing comma after the last value of an array declaration.
Loading history...
Coding Style Comprehensibility introduced by
The string literal Mysql does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1524
    );
0 ignored issues
show
Coding Style introduced by
The closing parenthesis does not seem to be aligned correctly; expected 27 space(s), but found 4.
Loading history...
1525
1526
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
1527
     * @param string $c
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
1528
     * @return boolean
1529
     */
1530
    public static function isValid($c)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
1531
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1532
        return in_array($c, self::$enums);
1533
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end isValid()
Loading history...
1534
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1535
1536
/**
1537
 * TypeAdapter Factory
1538
 *
1539
 */
0 ignored issues
show
Coding Style introduced by
Additional blank lines found at end of doc comment
Loading history...
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
1540
abstract class TypeAdapterFactory
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1541
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class TypeAdapterFactory
Loading history...
1542
    protected $dbHandler = null;
0 ignored issues
show
Coding Style introduced by
Protected member variable "dbHandler" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
1543
    protected $dumpSettings = array();
0 ignored issues
show
Coding Style introduced by
Protected member variable "dumpSettings" must contain a leading underscore
Loading history...
Coding Style introduced by
Expected 1 blank line before member var; 0 found
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1544
1545
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
Coding Style introduced by
Parameter $dumpSettings should have a doc-comment as per coding-style.
Loading history...
1546
     * @param string $c Type of database factory to create (Mysql, Sqlite,...)
0 ignored issues
show
Coding Style introduced by
Expected 9 spaces after parameter name; 1 found
Loading history...
introduced by
Parameter comment must end with a full stop
Loading history...
1547
     * @param PDO $dbHandler
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 4 spaces after parameter type; 1 found
Loading history...
1548
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
1549
    public static function create($c, $dbHandler = null, $dumpSettings = array())
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
introduced by
Type hint "PDO" missing for $dbHandler
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1550
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1551
        $c = ucfirst(strtolower($c));
1552
        if (!TypeAdapter::isValid($c)) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1553
            throw new Exception("Database type support for ($c) not yet available");
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $c instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1554
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
1555
        $method = __NAMESPACE__."\\"."TypeAdapter".$c;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal \\ does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal TypeAdapter does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1556
        return new $method($dbHandler, $dumpSettings);
1557
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create()
Loading history...
1558
1559
    public function __construct($dbHandler = null, $dumpSettings = array())
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1560
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1561
        $this->dbHandler = $dbHandler;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
1562
        $this->dumpSettings = $dumpSettings;
1563
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end __construct()
Loading history...
1564
1565
    /**
1566
     * function databases Add sql to create and use database
0 ignored issues
show
Coding Style introduced by
Doc comment short description must start with a capital letter
Loading history...
1567
     * @todo make it do something with sqlite
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
1568
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
1569
    public function databases()
1570
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1571
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1572
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end databases()
Loading history...
1573
1574
    public function show_create_table($tableName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::show_create_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1575
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1576
        return "SELECT tbl_name as 'Table', sql as 'Create Table' ".
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1577
            "FROM sqlite_master ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FROM sqlite_master does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1578
            "WHERE type='table' AND tbl_name='$tableName'";
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $tableName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1579
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_create_table()
Loading history...
1580
1581
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $row should have a doc-comment as per coding-style.
Loading history...
1582
     * function create_table Get table creation code from database
0 ignored issues
show
Coding Style introduced by
Doc comment short description must start with a capital letter
Loading history...
1583
     * @todo make it do something with sqlite
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
1584
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
1585
    public function create_table($row)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::create_table" is not in camel caps format
Loading history...
1586
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1587
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1588
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create_table()
Loading history...
1589
1590
    public function show_create_view($viewName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::show_create_view" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1591
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1592
        return "SELECT tbl_name as 'View', sql as 'Create View' ".
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1593
            "FROM sqlite_master ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FROM sqlite_master does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1594
            "WHERE type='view' AND tbl_name='$viewName'";
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $viewName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1595
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_create_view()
Loading history...
1596
1597
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $row should have a doc-comment as per coding-style.
Loading history...
1598
     * function create_view Get view creation code from database
0 ignored issues
show
Coding Style introduced by
Doc comment short description must start with a capital letter
Loading history...
1599
     * @todo make it do something with sqlite
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
1600
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
1601
    public function create_view($row)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::create_view" is not in camel caps format
Loading history...
1602
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1603
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1604
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create_view()
Loading history...
1605
1606
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $triggerName should have a doc-comment as per coding-style.
Loading history...
1607
     * function show_create_trigger Get trigger creation code from database
0 ignored issues
show
Coding Style introduced by
Doc comment short description must start with a capital letter
Loading history...
1608
     * @todo make it do something with sqlite
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
1609
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
1610
    public function show_create_trigger($triggerName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::show_create_trigger" is not in camel caps format
Loading history...
1611
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1612
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1613
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_create_trigger()
Loading history...
1614
1615
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $triggerName should have a doc-comment as per coding-style.
Loading history...
1616
     * function create_trigger Modify trigger code, add delimiters, etc
0 ignored issues
show
Coding Style introduced by
Doc comment short description must start with a capital letter
Loading history...
1617
     * @todo make it do something with sqlite
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
1618
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
1619
    public function create_trigger($triggerName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::create_trigger" is not in camel caps format
Loading history...
1620
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1621
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1622
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create_trigger()
Loading history...
1623
1624
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $procedureName should have a doc-comment as per coding-style.
Loading history...
1625
     * function create_procedure Modify procedure code, add delimiters, etc
0 ignored issues
show
Coding Style introduced by
Doc comment short description must start with a capital letter
Loading history...
1626
     * @todo make it do something with sqlite
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
1627
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
1628
    public function create_procedure($procedureName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::create_procedure" is not in camel caps format
Loading history...
1629
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1630
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1631
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create_procedure()
Loading history...
1632
1633
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $functionName should have a doc-comment as per coding-style.
Loading history...
1634
     * function create_function Modify function code, add delimiters, etc
0 ignored issues
show
Coding Style introduced by
Doc comment short description must start with a capital letter
Loading history...
1635
     * @todo make it do something with sqlite
0 ignored issues
show
Coding Style introduced by
Comment refers to a TODO task

This check looks TODO comments that have been left in the code.

``TODO``s show that something is left unfinished and should be attended to.

Loading history...
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
1636
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
1637
    public function create_function($functionName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::create_function" is not in camel caps format
Loading history...
1638
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1639
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1640
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create_function()
Loading history...
1641
1642
    public function show_tables()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::show_tables" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1643
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1644
        return "SELECT tbl_name FROM sqlite_master WHERE type='table'";
1645
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_tables()
Loading history...
1646
1647
    public function show_views()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::show_views" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1648
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1649
        return "SELECT tbl_name FROM sqlite_master WHERE type='view'";
1650
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_views()
Loading history...
1651
1652
    public function show_triggers()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::show_triggers" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1653
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1654
        return "SELECT name FROM sqlite_master WHERE type='trigger'";
1655
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_triggers()
Loading history...
1656
1657
    public function show_columns()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::show_columns" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1658
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1659
        if (func_num_args() != 1) {
0 ignored issues
show
Coding Style introduced by
Operator != prohibited; use !== instead
Loading history...
1660
            return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1661
        }
1662
1663
        $args = func_get_args();
1664
1665
        return "pragma table_info(${args[0]})";
1666
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_columns()
Loading history...
1667
1668
    public function show_procedures()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::show_procedures" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1669
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1670
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1671
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_procedures()
Loading history...
1672
1673
    public function show_functions()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::show_functions" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1674
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1675
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1676
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_functions()
Loading history...
1677
1678
    public function show_events()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::show_events" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1679
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1680
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1681
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_events()
Loading history...
1682
1683
    public function setup_transaction()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::setup_transaction" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1684
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1685
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1686
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end setup_transaction()
Loading history...
1687
1688
    public function start_transaction()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::start_transaction" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1689
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1690
        return "BEGIN EXCLUSIVE";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal BEGIN EXCLUSIVE does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1691
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end start_transaction()
Loading history...
1692
1693
    public function commit_transaction()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::commit_transaction" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1694
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1695
        return "COMMIT";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal COMMIT does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1696
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end commit_transaction()
Loading history...
1697
1698
    public function lock_table()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::lock_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1699
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1700
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1701
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end lock_table()
Loading history...
1702
1703
    public function unlock_table()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::unlock_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1704
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1705
        return "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1706
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end unlock_table()
Loading history...
1707
1708
    public function start_add_lock_table()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::start_add_lock_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1709
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1710
        return PHP_EOL;
1711
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end start_add_lock_table()
Loading history...
1712
1713
    public function end_add_lock_table()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::end_add_lock_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1714
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1715
        return PHP_EOL;
1716
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end end_add_lock_table()
Loading history...
1717
1718
    public function start_add_disable_keys()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::start_add_disable_keys" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1719
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1720
        return PHP_EOL;
1721
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end start_add_disable_keys()
Loading history...
1722
1723
    public function end_add_disable_keys()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::end_add_disable_keys" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1724
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1725
        return PHP_EOL;
1726
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end end_add_disable_keys()
Loading history...
1727
1728
    public function start_disable_foreign_keys_check()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::start_disable_foreign_keys_check" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1729
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1730
        return PHP_EOL;
1731
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end start_disable_foreign_keys_check()
Loading history...
1732
1733
    public function end_disable_foreign_keys_check()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::end_disable_foreign_keys_check" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1734
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1735
        return PHP_EOL;
1736
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end end_disable_foreign_keys_check()
Loading history...
1737
1738
    public function add_drop_database()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::add_drop_database" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1739
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1740
        return PHP_EOL;
1741
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end add_drop_database()
Loading history...
1742
1743
    public function add_drop_trigger()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::add_drop_trigger" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1744
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1745
        return PHP_EOL;
1746
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end add_drop_trigger()
Loading history...
1747
1748
    public function drop_table()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::drop_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1749
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1750
        return PHP_EOL;
1751
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end drop_table()
Loading history...
1752
1753
    public function drop_view()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::drop_view" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1754
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1755
        return PHP_EOL;
1756
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end drop_view()
Loading history...
1757
1758
    /**
1759
     * Decode column metadata and fill info structure.
1760
     * type, is_numeric and is_blob will always be available.
1761
     *
1762
     * @param array $colType Array returned from "SHOW COLUMNS FROM tableName"
0 ignored issues
show
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
1763
     * @return array
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
1764
     */
1765
    public function parseColumnType($colType)
0 ignored issues
show
Unused Code introduced by
The method parameter $colType is never used
Loading history...
introduced by
Type hint "array" missing for $colType
Loading history...
1766
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1767
        return array();
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1768
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end parseColumnType()
Loading history...
1769
1770
    public function backup_parameters()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::backup_parameters" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1771
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1772
        return PHP_EOL;
1773
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end backup_parameters()
Loading history...
1774
1775
    public function restore_parameters()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterFactory::restore_parameters" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1776
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1777
        return PHP_EOL;
1778
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end restore_parameters()
Loading history...
1779
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1780
1781
class TypeAdapterPgsql extends TypeAdapterFactory
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1782
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class TypeAdapterPgsql
Loading history...
1783
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1784
1785
class TypeAdapterDblib extends TypeAdapterFactory
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1786
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class TypeAdapterDblib
Loading history...
1787
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1788
1789
class TypeAdapterSqlite extends TypeAdapterFactory
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1790
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class TypeAdapterSqlite
Loading history...
1791
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
1792
1793
class TypeAdapterMysql extends TypeAdapterFactory
0 ignored issues
show
Coding Style introduced by
Only one interface or class is allowed in a file
Loading history...
Coding Style introduced by
Only one class is allowed in a file
Loading history...
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class Mysqldump"
Loading history...
1794
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class TypeAdapterMysql
Loading history...
1795
    const DEFINER_RE = 'DEFINER=`(?:[^`]|``)*`@`(?:[^`]|``)*`';
1796
1797
1798
    // Numerical Mysql types
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
1799
    public $mysqlTypes = array(
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line before member var; 2 found
Loading history...
Coding Style introduced by
You must use "/**" style comments for a member variable comment
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1800
        'numerical' => array(
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 26 spaces, but found 8.
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1801
            'bit',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1802
            'tinyint',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1803
            'smallint',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1804
            'mediumint',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1805
            'int',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1806
            'integer',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1807
            'bigint',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1808
            'real',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1809
            'double',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1810
            'float',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1811
            'decimal',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 24 spaces, but found 12.
Loading history...
1812
            'numeric'
0 ignored issues
show
Coding Style introduced by
There should be a trailing comma after the last value of an array declaration.
Loading history...
1813
        ),
0 ignored issues
show
Coding Style introduced by
The closing parenthesis does not seem to be aligned correctly; expected 23 space(s), but found 8.
Loading history...
1814
        'blob' => array(
0 ignored issues
show
Coding Style introduced by
This array key does not seem to be aligned correctly; expected 26 spaces, but found 8.
Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
1815
            'tinyblob',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1816
            'blob',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1817
            'mediumblob',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1818
            'longblob',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1819
            'binary',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1820
            'varbinary',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1821
            'bit',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1822
            'geometry', /* http://bugs.mysql.com/bug.php?id=43544 */
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
Coding Style introduced by
Single line block comment not allowed; use inline ("// text") comment instead
Loading history...
1823
            'point',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1824
            'linestring',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1825
            'polygon',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1826
            'multipoint',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1827
            'multilinestring',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1828
            'multipolygon',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1829
            'geometrycollection',
0 ignored issues
show
Coding Style introduced by
This array value does not seem to be aligned correcty; expected 19 spaces, but found 12.
Loading history...
1830
        )
0 ignored issues
show
Coding Style introduced by
The closing parenthesis does not seem to be aligned correctly; expected 18 space(s), but found 8.
Loading history...
1831
    );
0 ignored issues
show
Coding Style introduced by
The closing parenthesis does not seem to be aligned correctly; expected 25 space(s), but found 4.
Loading history...
1832
1833
    public function databases()
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1834
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1835
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
1836
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
1837
        $databaseName = $args[0];
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 47 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
1838
1839
        $resultSet = $this->dbHandler->query("SHOW VARIABLES LIKE 'character_set_database';");
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
1840
        $characterSet = $resultSet->fetchColumn(1);
1841
        $resultSet->closeCursor();
1842
1843
        $resultSet = $this->dbHandler->query("SHOW VARIABLES LIKE 'collation_database';");
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
1844
        $collationDb = $resultSet->fetchColumn(1);
1845
        $resultSet->closeCursor();
1846
        $ret = "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1847
1848
        $ret .= "CREATE DATABASE /*!32312 IF NOT EXISTS*/ `${databaseName}`".
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1849
            " /*!40100 DEFAULT CHARACTER SET ${characterSet} ".
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1850
            " COLLATE ${collationDb} */;".PHP_EOL.PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1851
            "USE `${databaseName}`;".PHP_EOL.PHP_EOL;
1852
1853
        return $ret;
1854
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end databases()
Loading history...
1855
1856
    public function show_create_table($tableName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_create_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1857
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1858
        return "SHOW CREATE TABLE `$tableName`";
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $tableName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1859
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_create_table()
Loading history...
1860
1861
    public function show_create_view($viewName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_create_view" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1862
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1863
        return "SHOW CREATE VIEW `$viewName`";
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $viewName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1864
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_create_view()
Loading history...
1865
1866
    public function show_create_trigger($triggerName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_create_trigger" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1867
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1868
        return "SHOW CREATE TRIGGER `$triggerName`";
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $triggerName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1869
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_create_trigger()
Loading history...
1870
1871
    public function show_create_procedure($procedureName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_create_procedure" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1872
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1873
        return "SHOW CREATE PROCEDURE `$procedureName`";
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $procedureName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1874
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_create_procedure()
Loading history...
1875
1876
    public function show_create_function($functionName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_create_function" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1877
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1878
        return "SHOW CREATE FUNCTION `$functionName`";
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $functionName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1879
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_create_function()
Loading history...
1880
1881
    public function show_create_event($eventName)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_create_event" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1882
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1883
        return "SHOW CREATE EVENT `$eventName`";
0 ignored issues
show
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $eventName instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
1884
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_create_event()
Loading history...
1885
1886
    public function create_table($row)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::create_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1887
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1888
        if (!isset($row['Create Table'])) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1889
            throw new Exception("Error getting table code, unknown output");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Error getting table code, unknown output does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1890
        }
1891
1892
        $createTable = $row['Create Table'];
1893
        if ($this->dumpSettings['reset-auto-increment']) {
1894
            $match = "/AUTO_INCREMENT=[0-9]+/s";
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style Comprehensibility introduced by
The string literal /AUTO_INCREMENT=[0-9]+/s does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1895
            $replace = "";
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1896
            $createTable = preg_replace($match, $replace, $createTable);
1897
        }
1898
1899
        $ret = "/*!40101 SET @saved_cs_client     = @@character_set_client */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET @saved_cs_c...haracter_set_client */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1900
            "/*!40101 SET character_set_client = ".$this->dumpSettings['default-character-set']." */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET character_set_client = does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 111 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1901
            $createTable.";".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1902
            "/*!40101 SET character_set_client = @saved_cs_client */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET character_s... = @saved_cs_client */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1903
            PHP_EOL;
1904
        return $ret;
1905
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create_table()
Loading history...
1906
1907
    public function create_view($row)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::create_view" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1908
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1909
        $ret = "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1910
        if (!isset($row['Create View'])) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1911
            throw new Exception("Error getting view structure, unknown output");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Error getting view structure, unknown output does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1912
        }
1913
1914
        $viewStmt = $row['Create View'];
1915
1916
        $definerStr = $this->dumpSettings['skip-definer'] ? '' : '/*!50013 \2 */'.PHP_EOL;
0 ignored issues
show
Coding Style introduced by
The value of a comparison must not be assigned to a variable
Loading history...
Coding Style introduced by
Inline IF statements are not allowed
Loading history...
Coding Style introduced by
Inline shorthand IF statement requires brackets around comparison
Loading history...
1917
1918
        if ($viewStmtReplaced = preg_replace(
0 ignored issues
show
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
1919
            '/^(CREATE(?:\s+ALGORITHM=(?:UNDEFINED|MERGE|TEMPTABLE))?)\s+('
1920
            .self::DEFINER_RE.'(?:\s+SQL SECURITY DEFINER|INVOKER)?)?\s+(VIEW .+)$/',
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1921
            '/*!50001 \1 */'.PHP_EOL.$definerStr.'/*!50001 \3 */',
1922
            $viewStmt,
1923
            1
1924
        )) {
0 ignored issues
show
Coding Style introduced by
Closing parenthesis of a multi-line IF statement must be on a new line
Loading history...
1925
            $viewStmt = $viewStmtReplaced;
1926
        };
1927
1928
        $ret .= $viewStmt.';'.PHP_EOL.PHP_EOL;
1929
        return $ret;
1930
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create_view()
Loading history...
1931
1932
    public function create_trigger($row)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::create_trigger" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1933
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1934
        $ret = "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1935
        if (!isset($row['SQL Original Statement'])) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1936
            throw new Exception("Error getting trigger code, unknown output");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal Error getting trigger code, unknown output does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1937
        }
1938
1939
        $triggerStmt = $row['SQL Original Statement'];
1940
        $definerStr = $this->dumpSettings['skip-definer'] ? '' : '/*!50017 \2*/ ';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
The value of a comparison must not be assigned to a variable
Loading history...
Coding Style introduced by
Inline IF statements are not allowed
Loading history...
Coding Style introduced by
Inline shorthand IF statement requires brackets around comparison
Loading history...
1941
        if ($triggerStmtReplaced = preg_replace(
0 ignored issues
show
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
1942
            '/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(TRIGGER\s.*)$/s',
1943
            '/*!50003 \1*/ '.$definerStr.'/*!50003 \3 */',
1944
            $triggerStmt,
1945
            1
1946
        )) {
0 ignored issues
show
Coding Style introduced by
Closing parenthesis of a multi-line IF statement must be on a new line
Loading history...
1947
            $triggerStmt = $triggerStmtReplaced;
1948
        }
1949
1950
        $ret .= "DELIMITER ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal DELIMITER ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1951
            $triggerStmt.";;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1952
            "DELIMITER ;".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal DELIMITER ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1953
        return $ret;
1954
    }
0 ignored issues
show
Coding Style introduced by
Expected //end create_trigger()
Loading history...
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
1955
1956
    public function create_procedure($row)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::create_procedure" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1957
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1958
        $ret = "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1959
        if (!isset($row['Create Procedure'])) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1960
            throw new Exception("Error getting procedure code, unknown output. ".
0 ignored issues
show
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Coding Style Comprehensibility introduced by
The string literal Error getting procedure code, unknown output. does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1961
                "Please check 'https://bugs.mysql.com/bug.php?id=14564'");
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 12 spaces, but found 16.
Loading history...
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
1962
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
1963
        $procedureStmt = $row['Create Procedure'];
1964
        if ( $this->dumpSettings['skip-definer'] ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
First condition of a multi-line IF statement must directly follow the opening parenthesis
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
1965
            if ($procedureStmtReplaced = preg_replace(
0 ignored issues
show
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
1966
                '/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(PROCEDURE\s.*)$/s',
1967
                '\1 \3',
1968
                $procedureStmt,
1969
                1
1970
            )) {
0 ignored issues
show
Coding Style introduced by
Closing parenthesis of a multi-line IF statement must be on a new line
Loading history...
1971
                $procedureStmt = $procedureStmtReplaced;
1972
            }
1973
        }
1974
1975
        $ret .= "/*!50003 DROP PROCEDURE IF EXISTS `".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 DROP PROCEDURE IF EXISTS ` does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1976
            $row['Procedure']."` */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ` */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1977
            "/*!40101 SET @saved_cs_client     = @@character_set_client */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET @saved_cs_c...haracter_set_client */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1978
            "/*!40101 SET character_set_client = ".$this->dumpSettings['default-character-set']." */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET character_set_client = does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 111 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1979
            "DELIMITER ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal DELIMITER ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1980
            $procedureStmt." ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1981
            "DELIMITER ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal DELIMITER ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1982
            "/*!40101 SET character_set_client = @saved_cs_client */;".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET character_s... = @saved_cs_client */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1983
1984
        return $ret;
1985
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create_procedure()
Loading history...
1986
1987
    public function create_function($row)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::create_function" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
1988
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
1989
        $ret = "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
1990
        if (!isset($row['Create Function'])) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
1991
            throw new Exception("Error getting function code, unknown output. ".
0 ignored issues
show
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Coding Style Comprehensibility introduced by
The string literal Error getting function code, unknown output. does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
1992
                "Please check 'https://bugs.mysql.com/bug.php?id=14564'");
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 12 spaces, but found 16.
Loading history...
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
1993
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
1994
        $functionStmt = $row['Create Function'];
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
1995
        $characterSetClient = $row['character_set_client'];
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
1996
        $collationConnection = $row['collation_connection'];
1997
        $sqlMode = $row['sql_mode'];
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 13 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
1998
        if ( $this->dumpSettings['skip-definer'] ) {
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
First condition of a multi-line IF statement must directly follow the opening parenthesis
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
1999
            if ($functionStmtReplaced = preg_replace(
0 ignored issues
show
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2000
                '/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(FUNCTION\s.*)$/s',
2001
                '\1 \3',
2002
                $functionStmt,
2003
                1
2004
            )) {
0 ignored issues
show
Coding Style introduced by
Closing parenthesis of a multi-line IF statement must be on a new line
Loading history...
2005
                $functionStmt = $functionStmtReplaced;
2006
            }
2007
        }
2008
2009
        $ret .= "/*!50003 DROP FUNCTION IF EXISTS `".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 DROP FUNCTION IF EXISTS ` does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2010
            $row['Function']."` */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ` */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2011
            "/*!40101 SET @saved_cs_client     = @@character_set_client */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET @saved_cs_c...haracter_set_client */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2012
            "/*!50003 SET @saved_cs_results     = @@character_set_results */ ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET @saved_cs_r...racter_set_results */ ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2013
            "/*!50003 SET @saved_col_connection = @@collation_connection */ ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET @saved_col_...llation_connection */ ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2014
            "/*!40101 SET character_set_client = ".$characterSetClient." */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET character_set_client = does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2015
            "/*!40101 SET character_set_results = ".$characterSetClient." */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET character_set_results = does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2016
            "/*!50003 SET collation_connection  = ".$collationConnection." */ ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET collation_connection = does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal */ ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2017
            "/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET @saved_sql_... = @@sql_mode */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2018
            "/*!50003 SET sql_mode              = '".$sqlMode."' */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2019
            "/*!50003 SET @saved_time_zone      = @@time_zone */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET @saved_time... = @@time_zone */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2020
            "/*!50003 SET time_zone             = 'SYSTEM' */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2021
            "DELIMITER ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal DELIMITER ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2022
            $functionStmt." ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2023
            "DELIMITER ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal DELIMITER ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2024
            "/*!50003 SET sql_mode              = @saved_sql_mode */ ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET sql_mode ... = @saved_sql_mode */ ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2025
            "/*!50003 SET character_set_client  = @saved_cs_client */ ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET character_s...= @saved_cs_client */ ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2026
            "/*!50003 SET character_set_results = @saved_cs_results */ ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET character_s... @saved_cs_results */ ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2027
            "/*!50003 SET collation_connection  = @saved_col_connection */ ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET collation_c...ved_col_connection */ ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2028
            "/*!50106 SET TIME_ZONE= @saved_time_zone */ ;".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50106 SET TIME_ZONE= @saved_time_zone */ ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2029
0 ignored issues
show
Coding Style introduced by
Functions must not contain multiple empty lines in a row; found 2 empty lines
Loading history...
2030
2031
        return $ret;
2032
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create_function()
Loading history...
2033
2034
    public function create_event($row)
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::create_event" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2035
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2036
        $ret = "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2037
        if (!isset($row['Create Event'])) {
0 ignored issues
show
Coding Style introduced by
There must be a single space after a NOT operator; 0 found
Loading history...
2038
            throw new Exception("Error getting event code, unknown output. ".
0 ignored issues
show
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Coding Style Comprehensibility introduced by
The string literal Error getting event code, unknown output. does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2039
                "Please check 'http://stackoverflow.com/questions/10853826/mysql-5-5-create-event-gives-syntax-error'");
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 12 spaces, but found 16.
Loading history...
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 120 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
2040
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
2041
        $eventName = $row['Event'];
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2042
        $eventStmt = $row['Create Event'];
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2043
        $sqlMode = $row['sql_mode'];
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2044
        $definerStr = $this->dumpSettings['skip-definer'] ? '' : '/*!50117 \2*/ ';
0 ignored issues
show
Coding Style introduced by
The value of a comparison must not be assigned to a variable
Loading history...
Coding Style introduced by
Inline IF statements are not allowed
Loading history...
Coding Style introduced by
Inline shorthand IF statement requires brackets around comparison
Loading history...
2045
2046
        if ($eventStmtReplaced = preg_replace(
0 ignored issues
show
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2047
            '/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(EVENT .*)$/',
2048
            '/*!50106 \1*/ '.$definerStr.'/*!50106 \3 */',
2049
            $eventStmt,
2050
            1
2051
        )) {
0 ignored issues
show
Coding Style introduced by
Closing parenthesis of a multi-line IF statement must be on a new line
Loading history...
2052
            $eventStmt = $eventStmtReplaced;
2053
        }
2054
2055
        $ret .= "/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50106 SET @save_time_zone= @@TIME_ZONE */ ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2056
            "/*!50106 DROP EVENT IF EXISTS `".$eventName."` */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50106 DROP EVENT IF EXISTS ` does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal ` */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2057
            "DELIMITER ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal DELIMITER ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2058
            "/*!50003 SET @saved_cs_client      = @@character_set_client */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET @saved_cs_c...racter_set_client */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2059
            "/*!50003 SET @saved_cs_results     = @@character_set_results */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET @saved_cs_r...acter_set_results */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2060
            "/*!50003 SET @saved_col_connection = @@collation_connection */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET @saved_col_...lation_connection */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2061
            "/*!50003 SET character_set_client  = utf8 */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET character_set_client = utf8 */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2062
            "/*!50003 SET character_set_results = utf8 */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET character_set_results = utf8 */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2063
            "/*!50003 SET collation_connection  = utf8_general_ci */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET collation_c...= utf8_general_ci */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2064
            "/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET @saved_sql_... = @@sql_mode */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2065
            "/*!50003 SET sql_mode              = '".$sqlMode."' */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2066
            "/*!50003 SET @saved_time_zone      = @@time_zone */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET @saved_time... = @@time_zone */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2067
            "/*!50003 SET time_zone             = 'SYSTEM' */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2068
            $eventStmt." ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2069
            "/*!50003 SET time_zone             = @saved_time_zone */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET time_zone ... @saved_time_zone */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2070
            "/*!50003 SET sql_mode              = @saved_sql_mode */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET sql_mode ...= @saved_sql_mode */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2071
            "/*!50003 SET character_set_client  = @saved_cs_client */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET character_s... @saved_cs_client */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2072
            "/*!50003 SET character_set_results = @saved_cs_results */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET character_s...@saved_cs_results */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2073
            "/*!50003 SET collation_connection  = @saved_col_connection */ ;;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50003 SET collation_c...ed_col_connection */ ;; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2074
            "DELIMITER ;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal DELIMITER ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2075
            "/*!50106 SET TIME_ZONE= @save_time_zone */ ;".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!50106 SET TIME_ZONE= @save_time_zone */ ; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2076
            // Commented because we are doing this in restore_parameters()
2077
            // "/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;" . PHP_EOL . PHP_EOL;
0 ignored issues
show
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
Coding Style introduced by
There should be no blank line after an inline comment.
Loading history...
2078
2079
        return $ret;
2080
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create_event()
Loading history...
2081
2082
    public function show_tables()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_tables" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2083
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2084
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2085
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2086
        return "SELECT TABLE_NAME AS tbl_name ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal SELECT TABLE_NAME AS tbl_name does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2087
            "FROM INFORMATION_SCHEMA.TABLES ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FROM INFORMATION_SCHEMA.TABLES does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2088
            "WHERE TABLE_TYPE='BASE TABLE' AND TABLE_SCHEMA='${args[0]}'";
2089
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_tables()
Loading history...
2090
2091
    public function show_views()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_views" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2092
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2093
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2094
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2095
        return "SELECT TABLE_NAME AS tbl_name ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal SELECT TABLE_NAME AS tbl_name does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2096
            "FROM INFORMATION_SCHEMA.TABLES ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FROM INFORMATION_SCHEMA.TABLES does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2097
            "WHERE TABLE_TYPE='VIEW' AND TABLE_SCHEMA='${args[0]}'";
2098
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_views()
Loading history...
2099
2100
    public function show_triggers()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_triggers" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2101
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2102
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2103
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2104
        return "SHOW TRIGGERS FROM `${args[0]}`;";
2105
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_triggers()
Loading history...
2106
2107
    public function show_columns()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_columns" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2108
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2109
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2110
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2111
        return "SHOW COLUMNS FROM `${args[0]}`;";
2112
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_columns()
Loading history...
2113
2114
    public function show_procedures()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_procedures" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2115
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2116
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2117
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2118
        return "SELECT SPECIFIC_NAME AS procedure_name ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal SELECT SPECIFIC_NAME AS procedure_name does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2119
            "FROM INFORMATION_SCHEMA.ROUTINES ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FROM INFORMATION_SCHEMA.ROUTINES does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2120
            "WHERE ROUTINE_TYPE='PROCEDURE' AND ROUTINE_SCHEMA='${args[0]}'";
2121
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_procedures()
Loading history...
2122
2123
    public function show_functions()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_functions" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2124
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2125
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2126
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2127
        return "SELECT SPECIFIC_NAME AS function_name ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal SELECT SPECIFIC_NAME AS function_name does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2128
            "FROM INFORMATION_SCHEMA.ROUTINES ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FROM INFORMATION_SCHEMA.ROUTINES does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2129
            "WHERE ROUTINE_TYPE='FUNCTION' AND ROUTINE_SCHEMA='${args[0]}'";
2130
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_functions()
Loading history...
2131
2132
    /**
2133
     * Get query string to ask for names of events from current database.
2134
     *
2135
     * @param string Name of database
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter name
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
Bug introduced by
The type Ifsnop\Mysqldump\Name was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
2136
     * @return string
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
2137
     */
2138
    public function show_events()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::show_events" is not in camel caps format
Loading history...
2139
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2140
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2141
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2142
        return "SELECT EVENT_NAME AS event_name ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal SELECT EVENT_NAME AS event_name does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2143
            "FROM INFORMATION_SCHEMA.EVENTS ".
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal FROM INFORMATION_SCHEMA.EVENTS does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2144
            "WHERE EVENT_SCHEMA='${args[0]}'";
2145
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end show_events()
Loading history...
2146
2147
    public function setup_transaction()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::setup_transaction" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2148
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2149
        return "SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal SET SESSION TRANSACTION ...N LEVEL REPEATABLE READ does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2150
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end setup_transaction()
Loading history...
2151
2152
    public function start_transaction()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::start_transaction" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2153
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2154
        return "START TRANSACTION " .
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal START TRANSACTION does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2155
            "/*!40100 WITH CONSISTENT SNAPSHOT */";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40100 WITH CONSISTENT SNAPSHOT */ does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2156
    }
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end start_transaction()
Loading history...
2157
2158
2159
    public function commit_transaction()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::commit_transaction" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2160
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2161
        return "COMMIT";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal COMMIT does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2162
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end commit_transaction()
Loading history...
2163
2164
    public function lock_table()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::lock_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2165
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2166
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2167
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2168
        return $this->dbHandler->exec("LOCK TABLES `${args[0]}` READ LOCAL");
2169
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end lock_table()
Loading history...
2170
2171
    public function unlock_table()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::unlock_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2172
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2173
        return $this->dbHandler->exec("UNLOCK TABLES");
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal UNLOCK TABLES does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2174
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end unlock_table()
Loading history...
2175
2176
    public function start_add_lock_table()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::start_add_lock_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2177
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2178
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2179
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2180
        return "LOCK TABLES `${args[0]}` WRITE;".PHP_EOL;
2181
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end start_add_lock_table()
Loading history...
2182
2183
    public function end_add_lock_table()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::end_add_lock_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2184
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2185
        return "UNLOCK TABLES;".PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal UNLOCK TABLES; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2186
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end end_add_lock_table()
Loading history...
2187
2188
    public function start_add_disable_keys()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::start_add_disable_keys" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2189
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2190
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2191
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2192
        return "/*!40000 ALTER TABLE `${args[0]}` DISABLE KEYS */;".
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2193
            PHP_EOL;
2194
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end start_add_disable_keys()
Loading history...
2195
2196
    public function end_add_disable_keys()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::end_add_disable_keys" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2197
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2198
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2199
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2200
        return "/*!40000 ALTER TABLE `${args[0]}` ENABLE KEYS */;".
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2201
            PHP_EOL;
2202
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end end_add_disable_keys()
Loading history...
2203
2204
    public function start_disable_autocommit()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::start_disable_autocommit" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2205
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2206
        return "SET autocommit=0;".PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal SET autocommit=0; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2207
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end start_disable_autocommit()
Loading history...
2208
2209
    public function end_disable_autocommit()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::end_disable_autocommit" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2210
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2211
        return "COMMIT;".PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal COMMIT; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2212
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end end_disable_autocommit()
Loading history...
2213
2214
    public function add_drop_database()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::add_drop_database" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2215
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2216
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2217
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2218
        return "/*!40000 DROP DATABASE IF EXISTS `${args[0]}`*/;".
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2219
            PHP_EOL.PHP_EOL;
2220
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end add_drop_database()
Loading history...
2221
2222
    public function add_drop_trigger()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::add_drop_trigger" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2223
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2224
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2225
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2226
        return "DROP TRIGGER IF EXISTS `${args[0]}`;".PHP_EOL;
2227
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end add_drop_trigger()
Loading history...
2228
2229
    public function drop_table()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::drop_table" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2230
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2231
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2232
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2233
        return "DROP TABLE IF EXISTS `${args[0]}`;".PHP_EOL;
2234
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end drop_table()
Loading history...
2235
2236
    public function drop_view()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::drop_view" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2237
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2238
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2239
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2240
        return "DROP TABLE IF EXISTS `${args[0]}`;".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2241
                "/*!50001 DROP VIEW IF EXISTS `${args[0]}`*/;".PHP_EOL;
2242
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end drop_view()
Loading history...
2243
2244
    public function getDatabaseHeader()
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
2245
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2246
        $this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
0 ignored issues
show
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
2247
        $args = func_get_args();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 55 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2248
        return "--".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2249
            "-- Current Database: `${args[0]}`".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2250
            "--".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal -- does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2251
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getDatabaseHeader()
Loading history...
2252
2253
    /**
2254
     * Decode column metadata and fill info structure.
2255
     * type, is_numeric and is_blob will always be available.
2256
     *
2257
     * @param array $colType Array returned from "SHOW COLUMNS FROM tableName"
0 ignored issues
show
introduced by
Parameter comment must end with a full stop
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
2258
     * @return array
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
2259
     */
2260
    public function parseColumnType($colType)
0 ignored issues
show
introduced by
Type hint "array" missing for $colType
Loading history...
2261
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2262
        $colInfo = array();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
2263
        $colParts = explode(" ", $colType['Type']);
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2264
2265
        if ($fparen = strpos($colParts[0], "(")) {
0 ignored issues
show
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
Coding Style Comprehensibility introduced by
The string literal ( does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2266
            $colInfo['type'] = substr($colParts[0], 0, $fparen);
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2267
            $colInfo['length'] = str_replace(")", "", substr($colParts[0], $fparen + 1));
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Coding Style Comprehensibility introduced by
The string literal ) does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Arithmetic operation must be bracketed
Loading history...
2268
            $colInfo['attributes'] = isset($colParts[1]) ? $colParts[1] : null;
0 ignored issues
show
Coding Style introduced by
The value of a comparison must not be assigned to a variable
Loading history...
Coding Style introduced by
Inline IF statements are not allowed
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of null please use NULL.
Loading history...
2269
        } else {
2270
            $colInfo['type'] = $colParts[0];
2271
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
2272
        $colInfo['is_numeric'] = in_array($colInfo['type'], $this->mysqlTypes['numerical']);
2273
        $colInfo['is_blob'] = in_array($colInfo['type'], $this->mysqlTypes['blob']);
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
2274
        // for virtual columns that are of type 'Extra', column type
0 ignored issues
show
Coding Style Documentation introduced by
Inline comments must start with a capital letter
Loading history...
2275
        // could by "STORED GENERATED" or "VIRTUAL GENERATED"
2276
        // MySQL reference: https://dev.mysql.com/doc/refman/5.7/en/create-table-generated-columns.html
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 103 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
Coding Style introduced by
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
2277
        $colInfo['is_virtual'] = strpos($colType['Extra'], "VIRTUAL GENERATED") !== false || strpos($colType['Extra'], "STORED GENERATED") !== false;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal VIRTUAL GENERATED does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
Coding Style introduced by
Boolean operators are not allowed outside of control structure conditions
Loading history...
Coding Style Comprehensibility introduced by
The string literal STORED GENERATED does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 149 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
2278
2279
        return $colInfo;
2280
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end parseColumnType()
Loading history...
2281
2282
    public function backup_parameters()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::backup_parameters" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2283
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2284
        $ret = "/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET @OLD_CHARAC...HARACTER_SET_CLIENT */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2285
            "/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET @OLD_CHARAC...ARACTER_SET_RESULTS */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2286
            "/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET @OLD_COLLAT...OLLATION_CONNECTION */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2287
            "/*!40101 SET NAMES ".$this->dumpSettings['default-character-set']." */;".PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET NAMES does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style Comprehensibility introduced by
The string literal */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2288
2289
        if (false === $this->dumpSettings['skip-tz-utc']) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
2290
            $ret .= "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2291
                "/*!40103 SET TIME_ZONE='+00:00' */;".PHP_EOL;
2292
        }
2293
2294
        $ret .= "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40014 SET @OLD_UNIQUE...KS, UNIQUE_CHECKS=0 */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2295
            "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40014 SET @OLD_FOREIG...OREIGN_KEY_CHECKS=0 */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 100 characters; contains 106 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2296
            "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;".PHP_EOL.
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2297
            "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40111 SET @OLD_SQL_NO..._NOTES, SQL_NOTES=0 */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2298
2299
        return $ret;
2300
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end backup_parameters()
Loading history...
2301
2302
    public function restore_parameters()
0 ignored issues
show
Coding Style introduced by
Public method name "TypeAdapterMysql::restore_parameters" is not in camel caps format
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
2303
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2304
        $ret = "";
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2305
2306
        if (false === $this->dumpSettings['skip-tz-utc']) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of false please use FALSE.
Loading history...
2307
            $ret .= "/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;".PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2308
        }
2309
2310
        $ret .= "/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2311
            "/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40014 SET FOREIGN_KEY..._FOREIGN_KEY_CHECKS */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2312
            "/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2313
            "/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET CHARACTER_S...HARACTER_SET_CLIENT */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2314
            "/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET CHARACTER_S...ARACTER_SET_RESULTS */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2315
            "/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;".PHP_EOL.
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40101 SET COLLATION_C...OLLATION_CONNECTION */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
2316
            "/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;".PHP_EOL.PHP_EOL;
0 ignored issues
show
Coding Style Comprehensibility introduced by
The string literal /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
2317
2318
        return $ret;
2319
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end restore_parameters()
Loading history...
2320
2321
    /**
2322
     * Check number of parameters passed to function, useful when inheriting.
2323
     * Raise exception if unexpected.
2324
     *
2325
     * @param integer $num_args
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
2326
     * @param integer $expected_num_args
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
2327
     * @param string $method_name
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 2 spaces after parameter type; 1 found
Loading history...
2328
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
2329
    private function check_parameters($num_args, $expected_num_args, $method_name)
0 ignored issues
show
Coding Style introduced by
Private method name "TypeAdapterMysql::check_parameters" must be prefixed with an underscore
Loading history...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
Coding Style introduced by
Variable "num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Variable "method_name" is not in valid camel caps format
Loading history...
2330
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
2331
        if ($num_args != $expected_num_args) {
0 ignored issues
show
Coding Style introduced by
Variable "num_args" is not in valid camel caps format
Loading history...
Coding Style introduced by
Operator != prohibited; use !== instead
Loading history...
Coding Style introduced by
Variable "expected_num_args" is not in valid camel caps format
Loading history...
2332
            throw new Exception("Unexpected parameter passed to $method_name");
0 ignored issues
show
Coding Style introduced by
Variable "method_name" is not in valid camel caps format
Loading history...
Coding Style Best Practice introduced by
As per coding-style, please use concatenation or sprintf for the variable $method_name instead of interpolation.

It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.

// Instead of
$x = "foo $bar $baz";

// Better use either
$x = "foo " . $bar . " " . $baz;
$x = sprintf("foo %s %s", $bar, $baz);
Loading history...
2333
        }
0 ignored issues
show
Coding Style introduced by
No blank line found after control structure
Loading history...
2334
        return;
0 ignored issues
show
Coding Style introduced by
Empty return statement not required here
Loading history...
2335
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end check_parameters()
Loading history...
2336
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
2337