1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-16 11:26:55 +01:00
psalm/src/command_functions.php

89 lines
2.0 KiB
PHP
Raw Normal View History

<?php
2020-07-22 21:57:24 +02:00
namespace Psalm;
use Composer\Autoload\ClassLoader;
use Psalm\Internal\CliUtils;
// phpcs:disable PSR1.Files.SideEffects
require_once __DIR__ . '/Psalm/Internal/CliUtils.php';
/** @deprecated going to be removed in Psalm 5 */
function requireAutoloaders(string $current_dir, bool $has_explicit_root, string $vendor_dir): ?ClassLoader
{
return CliUtils::requireAutoloaders($current_dir, $has_explicit_root, $vendor_dir);
}
/** @deprecated going to be removed in Psalm 5 */
function getVendorDir(string $current_dir): string
{
return CliUtils::getVendorDir($current_dir);
}
2019-06-02 07:10:50 +02:00
/**
2020-10-17 18:36:44 +02:00
* @return list<string>
* @deprecated going to be removed in Psalm 5
2019-06-02 07:10:50 +02:00
*/
function getArguments() : array
{
return CliUtils::getArguments();
2019-06-02 07:10:50 +02:00
}
/**
* @param string|array|null|false $f_paths
*
2020-10-17 18:36:44 +02:00
* @return list<string>|null
* @deprecated going to be removed in Psalm 5
*/
function getPathsToCheck($f_paths): ?array
{
return CliUtils::getPathsToCheck($f_paths);
}
2020-08-23 19:52:31 +02:00
/**
* @psalm-pure
* @deprecated going to be removed in Psalm 5
2020-08-23 19:52:31 +02:00
*/
function getPsalmHelpText(): string
{
return CliUtils::getPsalmHelpText();
}
/** @deprecated going to be removed in Psalm 5 */
function initialiseConfig(
?string $path_to_config,
string $current_dir,
string $output_format,
?ClassLoader $first_autoloader,
bool $create_if_non_existent = false
): Config {
return CliUtils::initializeConfig(
$path_to_config,
$current_dir,
$output_format,
$first_autoloader,
$create_if_non_existent
);
}
/** @deprecated going to be removed in Psalm 5 */
function update_config_file(Config $config, string $config_file_path, string $baseline_path) : void
{
CliUtils::updateConfigFile($config, $config_file_path, $baseline_path);
}
/** @deprecated going to be removed in Psalm 5 */
function get_path_to_config(array $options): ?string
{
return CliUtils::getPathToConfig($options);
}
2020-08-23 19:52:31 +02:00
/**
* @psalm-pure
* @deprecated going to be removed in Psalm 5
2020-08-23 19:52:31 +02:00
*/
function getMemoryLimitInBytes(): int
{
return CliUtils::getMemoryLimitInBytes();
}