Skip to content

Commit 17da8a3

Browse files
committed
Enable strict mode on PHP files
Signed-off-by: Maurício Meneghini Fauth <[email protected]>
1 parent 86c5bae commit 17da8a3

160 files changed

Lines changed: 177 additions & 103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Unreleased]
44

55
* Drop support for PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, PHP 7.0 and HHVM
6+
* Enable strict mode on PHP files
67

78
## [4.3.1] - 2019-01-05
89

bin/highlight-query

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env php
22
<?php
3+
declare(strict_types=1);
34

45
$files = array(
56
__DIR__ . "/../vendor/autoload.php",

bin/lint-query

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env php
22
<?php
3+
declare(strict_types=1);
34

45
$files = array(
56
__DIR__ . "/../vendor/autoload.php",
@@ -27,4 +28,3 @@ if (!$found) {
2728

2829
$cli = new PhpMyAdmin\SqlParser\Utils\CLI();
2930
exit($cli->runLint());
30-

bin/tokenize-query

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env php
22
<?php
3+
declare(strict_types=1);
34

45
$files = array(
56
__DIR__ . "/../vendor/autoload.php",

src/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
/**
43
* Defines a component that is later extended to parse specialized components or
54
* keywords.
@@ -8,6 +7,7 @@
87
* *Component parsers can be reused in multiple situations and *Keyword parsers
98
* count on the *Component classes to do their job.
109
*/
10+
declare(strict_types=1);
1111

1212
namespace PhpMyAdmin\SqlParser;
1313

src/Components/AlterOperation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
2-
32
/**
43
* Parses an alter operation.
54
*/
5+
declare(strict_types=1);
66

77
namespace PhpMyAdmin\SqlParser\Components;
88

src/Components/Array2d.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
2-
32
/**
43
* `VALUES` keyword parser.
54
*/
5+
declare(strict_types=1);
66

77
namespace PhpMyAdmin\SqlParser\Components;
88

src/Components/ArrayObj.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
2-
32
/**
43
* Parses an array.
54
*/
5+
declare(strict_types=1);
66

77
namespace PhpMyAdmin\SqlParser\Components;
88

src/Components/CaseExpression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
2-
32
/**
43
* Parses a reference to a CASE expression.
54
*/
5+
declare(strict_types=1);
66

77
namespace PhpMyAdmin\SqlParser\Components;
88

src/Components/Condition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
2-
32
/**
43
* `WHERE` keyword parser.
54
*/
5+
declare(strict_types=1);
66

77
namespace PhpMyAdmin\SqlParser\Components;
88

@@ -87,7 +87,7 @@ class Condition extends Component
8787
*/
8888
public function __construct($expr = null)
8989
{
90-
$this->expr = trim($expr);
90+
$this->expr = trim((string) $expr);
9191
}
9292

9393
/**

0 commit comments

Comments
 (0)