Skip to content

Commit

Permalink
Add explicit imports for PHPDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Jan 13, 2020
1 parent 0d7490f commit 3408926
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
8 changes: 5 additions & 3 deletions src/Phug/Renderer/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Phug;

use ArrayAccess;
use Phug\Renderer\Partial\CacheTrait;
use Phug\Renderer\Partial\Debug\DebuggerTrait;
use Phug\Renderer\Partial\RendererOptionsTrait;
Expand All @@ -10,6 +11,7 @@
use Phug\Util\ModuleContainerInterface;
use Phug\Util\Partial\MacroableTrait;
use Phug\Util\Partial\ModuleContainerTrait;
use Throwable;

class Renderer implements ModuleContainerInterface
{
Expand All @@ -30,7 +32,7 @@ class Renderer implements ModuleContainerInterface
/**
* Renderer constructor.
*
* @param array|\ArrayAccess|null $options
* @param array|ArrayAccess|null $options
*
* @throws RendererException
*/
Expand Down Expand Up @@ -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)
{
Expand All @@ -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 = [])
{
Expand Down
7 changes: 1 addition & 6 deletions tests/Phug/RendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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'];
Expand Down

0 comments on commit 3408926

Please sign in to comment.