Skip to content

Commit 9d94417

Browse files
committed
Add native_constant_invocation
1 parent 6645214 commit 9d94417

File tree

18 files changed

+42
-0
lines changed

18 files changed

+42
-0
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
'ordered_class_elements' => true,
2222
'class_attributes_separation' => ['elements' => ['method' => 'one']],
2323
'native_function_invocation' => true,
24+
'native_constant_invocation' => true,
2425
'fully_qualified_strict_types' => [
2526
'import_symbols' => true
2627
],

src/Exception/ConvertException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
use PDOException;
88

9+
use const PHP_EOL;
10+
911
/**
1012
* Converts an exception into a more specific one.
1113
*

src/Exception/Exception.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
use Stringable;
88

9+
use const PHP_EOL;
10+
911
/**
1012
* Represents an exception that's caused by some DB-related operations.
1113
*

src/Helper/DbArrayHelper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
use function iterator_to_array;
2424
use function range;
2525

26+
use const PREG_SPLIT_NO_EMPTY;
27+
use const SORT_ASC;
28+
use const SORT_NUMERIC;
29+
2630
/**
2731
* Array manipulation methods.
2832
*

src/Query/Query.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
use function substr;
4545
use function trim;
4646

47+
use const PHP_INT_MAX;
48+
use const PREG_SPLIT_NO_EMPTY;
49+
use const SORT_ASC;
50+
use const SORT_DESC;
51+
4752
/**
4853
* Represents a `SELECT` SQL statement in a way that's independent of DBMS.
4954
*

src/QueryBuilder/AbstractDDLQueryBuilder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
use function is_string;
1717
use function preg_split;
1818

19+
use const PREG_SPLIT_NO_EMPTY;
20+
1921
/**
2022
* It's used to create and change the structure of database objects in a database.
2123
*

src/QueryBuilder/AbstractDQLQueryBuilder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
use function strtoupper;
6060
use function trim;
6161

62+
use const PREG_SPLIT_NO_EMPTY;
63+
use const SORT_DESC;
64+
6265
/**
6366
* It's used to query data from a database.
6467
*

src/Schema/Column/ColumnBuilder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
use Yiisoft\Db\Constant\ColumnType;
88

9+
use const PHP_INT_SIZE;
10+
911
/**
1012
* Column builder for database {@see ColumnInterface} instances.
1113
*

tests/Common/CommonCommandTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
use function count;
4343
use function is_resource;
4444

45+
use const LC_NUMERIC;
46+
4547
abstract class CommonCommandTest extends IntegrationTestCase
4648
{
4749
public function testAutoQuoting(): void

tests/Common/CommonQueryBuilderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
use function in_array;
4747

4848
use const SORT_NATURAL;
49+
use const SORT_ASC;
50+
use const SORT_DESC;
4951

5052
abstract class CommonQueryBuilderTest extends IntegrationTestCase
5153
{

0 commit comments

Comments
 (0)