/*
* This file is part of Psy Shell.
*
- * (c) 2012-2017 Justin Hileman
+ * (c) 2012-2018 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
{
$xdg = new Xdg();
- return self::getDirNames(array($xdg->getHomeConfigDir()));
+ return self::getDirNames([$xdg->getHomeConfigDir()]);
}
/**
*/
public static function getConfigFiles(array $names, $configDir = null)
{
- $dirs = ($configDir === null) ? self::getConfigDirs() : array($configDir);
+ $dirs = ($configDir === null) ? self::getConfigDirs() : [$configDir];
return self::getRealFiles($dirs, $names);
}
*/
public static function getDataFiles(array $names, $dataDir = null)
{
- $dirs = ($dataDir === null) ? self::getDataDirs() : array($dataDir);
+ $dirs = ($dataDir === null) ? self::getDataDirs() : [$dataDir];
return self::getRealFiles($dirs, $names);
}
{
$xdg = new Xdg();
- set_error_handler(array('Psy\Exception\ErrorException', 'throwException'));
+ set_error_handler(['Psy\Exception\ErrorException', 'throwException']);
try {
// XDG doesn't really work on Windows, sometimes complains about
private static function getRealFiles(array $dirNames, array $fileNames)
{
- $files = array();
+ $files = [];
foreach ($dirNames as $dir) {
foreach ($fileNames as $name) {
$file = $dir . '/' . $name;