diff --git a/composer.json b/composer.json index 9a2d6d7..e278b32 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "library", "license": "OSL-3.0", "require": { - "php": "~7.4.0||~8.1.0", + "php": "~8.1.0||~8.2.0", "mustache/mustache": "^2.12", "xantios/mimey": "^2.2", "symfony/yaml": "^2.3 || ^3.3 || ^4.0 || ^5.0", diff --git a/src/Controller.php b/src/Controller.php index 6873f03..8e42299 100644 --- a/src/Controller.php +++ b/src/Controller.php @@ -43,7 +43,7 @@ public function __construct( foreach (self::STANDARD_FIELDS as $key) { if (!$this->definition->has($key)) { - throw new \RuntimeException("Definition YAML is missing required key: ${key}"); + throw new \RuntimeException("Definition YAML is missing required key: {$key}"); } } diff --git a/src/Definition.php b/src/Definition.php index 8fa6010..878834a 100644 --- a/src/Definition.php +++ b/src/Definition.php @@ -44,7 +44,7 @@ public static function fromYamlFile(string $filePath): self $data = Yaml::parseFile($filePath); if (!\is_array($data)) { - throw new \InvalidArgumentException("File ${filePath} could not be parsed as YAML."); + throw new \InvalidArgumentException("File {$filePath} could not be parsed as YAML."); } $instance = new static($data); diff --git a/src/Resolver/Url.php b/src/Resolver/Url.php index d0c525f..05c112d 100644 --- a/src/Resolver/Url.php +++ b/src/Resolver/Url.php @@ -78,7 +78,7 @@ public function resolve($definition) $currentPathname = $uri->getPath(); if ($pathname[0] !== '/') { if ($currentPathname === null) { - $pathname = "/${pathname}"; + $pathname = "/{$pathname}"; } elseif ($currentPathname[\strlen($currentPathname) - 1] === '/') { $pathname = $currentPathname . $pathname; } else { diff --git a/src/Template/TemplateFactory.php b/src/Template/TemplateFactory.php index 6680eb2..6026863 100644 --- a/src/Template/TemplateFactory.php +++ b/src/Template/TemplateFactory.php @@ -37,6 +37,6 @@ public static function get(string $basePath, ?string $engine): TemplateInterface } } - throw new \InvalidArgumentException("${engine} could not be found or does not implement TemplateInterface"); + throw new \InvalidArgumentException("{$engine} could not be found or does not implement TemplateInterface"); } }