Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
e17fcab8
Unverified
Commit
e17fcab8
authored
Apr 03, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Anonymous function should have native return typehint
parent
8b0ddf60
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
15 additions
and
13 deletions
+15
-13
DBALException.php
src/DBALException.php
+1
-1
MysqliConnection.php
src/Driver/Mysqli/MysqliConnection.php
+3
-1
Driver.php
src/Driver/SQLAnywhere/Driver.php
+1
-1
PostgreSQL94Platform.php
src/Platforms/PostgreSQL94Platform.php
+1
-1
AbstractAsset.php
src/Schema/AbstractAsset.php
+1
-1
PostgreSqlSchemaManager.php
src/Schema/PostgreSqlSchemaManager.php
+1
-1
Table.php
src/Schema/Table.php
+1
-1
ConnectionTest.php
tests/Functional/ConnectionTest.php
+1
-1
DataAccessTest.php
tests/Functional/DataAccessTest.php
+1
-1
StatementTest.php
tests/Functional/StatementTest.php
+1
-1
WriteTest.php
tests/Functional/WriteTest.php
+1
-1
FunctionalTestCase.php
tests/FunctionalTestCase.php
+1
-1
DB2SchemaManagerTest.php
tests/Schema/DB2SchemaManagerTest.php
+1
-1
No files found.
src/DBALException.php
View file @
e17fcab8
...
...
@@ -180,7 +180,7 @@ class DBALException extends Exception
*/
private
static
function
formatParameters
(
array
$params
)
{
return
'['
.
implode
(
', '
,
array_map
(
static
function
(
$param
)
{
return
'['
.
implode
(
', '
,
array_map
(
static
function
(
$param
)
:
string
{
if
(
is_resource
(
$param
))
{
return
(
string
)
$param
;
}
...
...
src/Driver/Mysqli/MysqliConnection.php
View file @
e17fcab8
...
...
@@ -63,8 +63,10 @@ class MysqliConnection implements PingableConnection, ServerInfoAwareConnection
$this
->
setSecureConnection
(
$params
);
$this
->
setDriverOptions
(
$driverOptions
);
set_error_handler
(
static
function
()
{
set_error_handler
(
static
function
()
:
bool
{
return
true
;
});
try
{
if
(
!
$this
->
conn
->
real_connect
(
$host
,
$username
,
$password
,
$dbname
,
$port
,
$socket
,
$flags
))
{
throw
new
MysqliException
(
$this
->
conn
->
connect_error
,
$this
->
conn
->
sqlstate
??
'HY000'
,
$this
->
conn
->
connect_errno
);
...
...
src/Driver/SQLAnywhere/Driver.php
View file @
e17fcab8
...
...
@@ -79,7 +79,7 @@ class Driver extends AbstractSQLAnywhereDriver
';PWD='
.
$password
.
';'
.
implode
(
';'
,
array_map
(
static
function
(
$key
,
$value
)
{
array_map
(
static
function
(
$key
,
$value
)
:
string
{
return
$key
.
'='
.
$value
;
},
array_keys
(
$driverOptions
),
$driverOptions
)
);
...
...
src/Platforms/PostgreSQL94Platform.php
View file @
e17fcab8
...
...
@@ -905,7 +905,7 @@ SQL
return
$this
->
doConvertBooleans
(
$item
,
static
function
(
$boolean
)
{
static
function
(
$boolean
)
:
?
int
{
return
$boolean
===
null
?
null
:
(
int
)
$boolean
;
}
);
...
...
src/Schema/AbstractAsset.php
View file @
e17fcab8
...
...
@@ -201,7 +201,7 @@ abstract class AbstractAsset
*/
protected
function
_generateIdentifierName
(
$columnNames
,
$prefix
=
''
,
$maxSize
=
30
)
{
$hash
=
implode
(
''
,
array_map
(
static
function
(
$column
)
{
$hash
=
implode
(
''
,
array_map
(
static
function
(
$column
)
:
string
{
return
dechex
(
crc32
(
$column
));
},
$columnNames
));
...
...
src/Schema/PostgreSqlSchemaManager.php
View file @
e17fcab8
...
...
@@ -93,7 +93,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
$names
=
$this
->
getSchemaNames
();
$paths
=
$this
->
getSchemaSearchPaths
();
$this
->
existingSchemaPaths
=
array_filter
(
$paths
,
static
function
(
$v
)
use
(
$names
)
{
$this
->
existingSchemaPaths
=
array_filter
(
$paths
,
static
function
(
$v
)
use
(
$names
)
:
bool
{
return
in_array
(
$v
,
$names
,
true
);
});
}
...
...
src/Schema/Table.php
View file @
e17fcab8
...
...
@@ -637,7 +637,7 @@ class Table extends AbstractAsset
*/
private
function
filterColumns
(
array
$columnNames
)
{
return
array_filter
(
$this
->
_columns
,
static
function
(
$columnName
)
use
(
$columnNames
)
{
return
array_filter
(
$this
->
_columns
,
static
function
(
$columnName
)
use
(
$columnNames
)
:
bool
{
return
in_array
(
$columnName
,
$columnNames
,
true
);
},
ARRAY_FILTER_USE_KEY
);
}
...
...
tests/Functional/ConnectionTest.php
View file @
e17fcab8
...
...
@@ -283,7 +283,7 @@ class ConnectionTest extends FunctionalTestCase
public
function
testTransactionalReturnValue
()
:
void
{
$res
=
$this
->
connection
->
transactional
(
static
function
()
{
$res
=
$this
->
connection
->
transactional
(
static
function
()
:
int
{
return
42
;
});
...
...
tests/Functional/DataAccessTest.php
View file @
e17fcab8
...
...
@@ -737,7 +737,7 @@ class DataAccessTest extends FunctionalTestCase
$stmt
->
setFetchMode
(
FetchMode
::
NUMERIC
);
$row
=
array_keys
(
$stmt
->
fetch
());
self
::
assertCount
(
0
,
array_filter
(
$row
,
static
function
(
$v
)
{
self
::
assertCount
(
0
,
array_filter
(
$row
,
static
function
(
$v
)
:
bool
{
return
!
is_numeric
(
$v
);
}),
'should be no non-numerical elements in the result.'
);
}
...
...
tests/Functional/StatementTest.php
View file @
e17fcab8
...
...
@@ -303,7 +303,7 @@ EOF
false
,
],
'fetch-all'
=>
[
static
function
(
Statement
$stmt
)
{
static
function
(
Statement
$stmt
)
:
array
{
return
$stmt
->
fetchAll
();
},
[],
...
...
tests/Functional/WriteTest.php
View file @
e17fcab8
...
...
@@ -169,7 +169,7 @@ class WriteTest extends FunctionalTestCase
}
$sequences
=
$this
->
connection
->
getSchemaManager
()
->
listSequences
();
self
::
assertCount
(
1
,
array_filter
(
$sequences
,
static
function
(
$sequence
)
{
self
::
assertCount
(
1
,
array_filter
(
$sequences
,
static
function
(
$sequence
)
:
bool
{
return
strtolower
(
$sequence
->
getName
())
===
'write_table_id_seq'
;
}));
...
...
tests/FunctionalTestCase.php
View file @
e17fcab8
...
...
@@ -72,7 +72,7 @@ abstract class FunctionalTestCase extends TestCase
$queries
=
''
;
$i
=
count
(
$this
->
sqlLoggerStack
->
queries
);
foreach
(
array_reverse
(
$this
->
sqlLoggerStack
->
queries
)
as
$query
)
{
$params
=
array_map
(
static
function
(
$p
)
{
$params
=
array_map
(
static
function
(
$p
)
:
string
{
if
(
is_object
(
$p
))
{
return
get_class
(
$p
);
}
...
...
tests/Schema/DB2SchemaManagerTest.php
View file @
e17fcab8
...
...
@@ -92,7 +92,7 @@ final class DB2SchemaManagerTest extends TestCase
public
function
testListTableNamesFiltersAssetNamesCorrectlyWithCallable
()
:
void
{
$accepted
=
[
'T_FOO'
,
'T_BAR'
];
$this
->
conn
->
getConfiguration
()
->
setSchemaAssetsFilter
(
static
function
(
$assetName
)
use
(
$accepted
)
{
$this
->
conn
->
getConfiguration
()
->
setSchemaAssetsFilter
(
static
function
(
$assetName
)
use
(
$accepted
)
:
bool
{
return
in_array
(
$assetName
,
$accepted
,
true
);
});
$this
->
conn
->
expects
(
self
::
any
())
->
method
(
'quote'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment