From 14a10c694c42b07f12416fec0fae8324dd9e0f5e Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Thu, 10 Feb 2022 16:45:20 +0300 Subject: [PATCH] Added config path processing --- src/Services/CodeStyler.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Services/CodeStyler.php b/src/Services/CodeStyler.php index 9911a3d..8f2b20c 100644 --- a/src/Services/CodeStyler.php +++ b/src/Services/CodeStyler.php @@ -58,12 +58,21 @@ protected function resolveOptions(): array return $key; } - return sprintf('%s=%s', $key, $value); + return sprintf('%s=%s', $key, $this->resolvePath($value)); }) ->values() ->get(); } + protected function resolvePath(mixed $value): mixed + { + if (is_string($value) && file_exists($value)) { + return realpath($value); + } + + return $value; + } + protected function getOptions(): array { return array_merge($this->options, $this->options_check);