Skip to content

Commit 36a1b9c

Browse files
Remove unnecessary uses of deprecated strftime() (#15999)
* Remove unnecessary uses of deprecated strftime() * Fix phpcs formatting errors Co-authored-by: Jason Coward <[email protected]>
1 parent 09e024a commit 36a1b9c

File tree

22 files changed

+232
-175
lines changed

22 files changed

+232
-175
lines changed

_build/test/properties.sample.inc.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,32 @@
1919
use xPDO\xPDO;
2020

2121
/* define some properties */
22-
$properties['runtime'] = strftime("%Y%m%dT%H%M%S");
22+
$properties['runtime'] = date('Ymd\THis');
2323
$properties['config_key'] = 'test';
2424

2525
/* driver-specific connection properties */
2626
/* mysql */
27-
$properties['mysql_string_dsn_test']= 'mysql:host=127.0.0.1;dbname=revo_test;charset=utf8';
28-
$properties['mysql_string_dsn_nodb']= 'mysql:host=127.0.0.1;charset=utf8';
29-
$properties['mysql_string_dsn_error']= 'mysql:host= nonesuchhost;dbname=nonesuchdb';
30-
$properties['mysql_string_username']= '';
31-
$properties['mysql_string_password']= '';
32-
$properties['mysql_array_options']= [
27+
$properties['mysql_string_dsn_test'] = 'mysql:host=127.0.0.1;dbname=revo_test;charset=utf8';
28+
$properties['mysql_string_dsn_nodb'] = 'mysql:host=127.0.0.1;charset=utf8';
29+
$properties['mysql_string_dsn_error'] = 'mysql:host= nonesuchhost;dbname=nonesuchdb';
30+
$properties['mysql_string_username'] = '';
31+
$properties['mysql_string_password'] = '';
32+
$properties['mysql_array_options'] = [
3333
xPDO::OPT_HYDRATE_FIELDS => true,
3434
xPDO::OPT_HYDRATE_RELATED_OBJECTS => true,
3535
xPDO::OPT_HYDRATE_ADHOC_FIELDS => true,
3636
];
37-
$properties['mysql_array_driverOptions']= [\PDO::ATTR_ERRMODE => \PDO::ERRMODE_SILENT];
37+
$properties['mysql_array_driverOptions'] = [\PDO::ATTR_ERRMODE => \PDO::ERRMODE_SILENT];
3838

3939
/* PHPUnit test config */
40-
$properties['xpdo_driver']= 'mysql';
41-
$properties['logTarget']= [
40+
$properties['xpdo_driver'] = 'mysql';
41+
$properties['logTarget'] = [
4242
'target' => 'file',
4343
'options' => [
4444
'filename' => "unit_test_{$properties['runtime']}.log",
4545
'filepath' => dirname(__FILE__) . '/'
4646
]
4747
];
48-
$properties['logLevel']= xPDO::LOG_LEVEL_INFO;
48+
$properties['logLevel'] = xPDO::LOG_LEVEL_INFO;
4949
$properties['context'] = 'web';
5050
$properties['debug'] = false;

0 commit comments

Comments
 (0)