1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00
This commit is contained in:
Daniil Gentili 2023-10-21 14:51:48 +02:00
parent 1175c71cd9
commit cb48b00d1c
4 changed files with 14 additions and 5 deletions

View File

@ -12,8 +12,13 @@ use function trim;
final class FileManipulation
{
public function __construct(public int $start, public int $end, public string $insertion_text, public bool $preserve_indentation = false, public bool $remove_trailing_newline = false)
{
public function __construct(
public int $start,
public int $end,
public string $insertion_text,
public bool $preserve_indentation = false,
public bool $remove_trailing_newline = false,
) {
}
public function getKey(): string

View File

@ -22,7 +22,7 @@ final class IfConditionalScope
public Context $post_if_context,
public array $cond_referenced_var_ids,
public array $assigned_in_conditional_var_ids,
public array $entry_clauses
public array $entry_clauses,
) {
}
}

View File

@ -166,7 +166,9 @@ HEADING;
if (null === $this->link_format) {
// if xdebug is not enabled, use `get_cfg_var` to get the value directly from php.ini
$this->link_format = (ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')) ?: 'file://%f#L%l';
$this->link_format = (
ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')
) ?: 'file://%f#L%l';
}
$link = strtr($this->link_format, ['%f' => $data->file_path, '%l' => $data->line_from]);

View File

@ -134,7 +134,9 @@ final class ConsoleReport extends Report
if (null === $this->link_format) {
// if xdebug is not enabled, use `get_cfg_var` to get the value directly from php.ini
$this->link_format = (ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')) ?: 'file://%f#L%l';
$this->link_format = (
ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')
) ?: 'file://%f#L%l';
}
$link = strtr($this->link_format, ['%f' => $data->file_path, '%l' => $data->line_from]);