From 3408926c3bf3fb84c18a68fa155f5ca1898a4815 Mon Sep 17 00:00:00 2001 From: KyleKatarn Date: Mon, 13 Jan 2020 22:19:43 +0100 Subject: [PATCH] Add explicit imports for PHPDoc --- src/Phug/Renderer/Renderer.php | 8 +++++--- tests/Phug/RendererTest.php | 7 +------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Phug/Renderer/Renderer.php b/src/Phug/Renderer/Renderer.php index e59f58d5..5cbe1eba 100644 --- a/src/Phug/Renderer/Renderer.php +++ b/src/Phug/Renderer/Renderer.php @@ -2,6 +2,7 @@ namespace Phug; +use ArrayAccess; use Phug\Renderer\Partial\CacheTrait; use Phug\Renderer\Partial\Debug\DebuggerTrait; use Phug\Renderer\Partial\RendererOptionsTrait; @@ -10,6 +11,7 @@ use Phug\Util\ModuleContainerInterface; use Phug\Util\Partial\MacroableTrait; use Phug\Util\Partial\ModuleContainerTrait; +use Throwable; class Renderer implements ModuleContainerInterface { @@ -30,7 +32,7 @@ class Renderer implements ModuleContainerInterface /** * Renderer constructor. * - * @param array|\ArrayAccess|null $options + * @param array|ArrayAccess|null $options * * @throws RendererException */ @@ -221,7 +223,7 @@ public function renderDirectory($path, $destination = null, $extension = '.html' * @param array $parameters parameters or file name * @param string $filename * - * @throws RendererException|\Throwable + * @throws RendererException|Throwable */ public function display($string, array $parameters = [], $filename = null) { @@ -242,7 +244,7 @@ function ($path, $input) use ($filename) { * @param string $path pug input file * @param array $parameters parameters (values for variables used in the template) * - * @throws RendererException|\Throwable + * @throws RendererException|Throwable */ public function displayFile($path, array $parameters = []) { diff --git a/tests/Phug/RendererTest.php b/tests/Phug/RendererTest.php index a79e4e97..ef0f2be4 100644 --- a/tests/Phug/RendererTest.php +++ b/tests/Phug/RendererTest.php @@ -1204,7 +1204,7 @@ public function testCacheDirectoryPreserveDependencies() $cacheDirectory = sys_get_temp_dir().'/pug-test'.mt_rand(0, 999999); $this->createEmptyDirectory($cacheDirectory); - $templatesDirectory = __DIR__.'/../templates/for-cache'; + $templatesDirectory = __DIR__.'/../for-cache'; $pug = new Renderer([ 'modules' => [JsPhpizePhug::class], 'paths' => [$templatesDirectory], @@ -1220,11 +1220,6 @@ public function testCacheDirectoryPreserveDependencies() $this->emptyDirectory($cacheDirectory); rmdir($cacheDirectory); - if ($file === null) { - var_dump($files, $file); - exit; - } - self::assertNotNull($file); $foo = ['bar' => 'biz'];