Skip to content
This repository has been archived by the owner on May 28, 2020. It is now read-only.

Commit

Permalink
Merge 26be739 into f702e44
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Aug 19, 2019
2 parents f702e44 + 26be739 commit 3d3b81f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
4 changes: 4 additions & 0 deletions phpstan.neon.dist
Expand Up @@ -9,3 +9,7 @@ parameters:
- vendor-bin/test/vendor/autoload.php

ignoreErrors:
# PHPUnit
-
message: '#Property .*::\$.* has no typehint specified.#'
path: tests/
20 changes: 9 additions & 11 deletions tests/Twig/MockTwigLoader.php
Expand Up @@ -9,29 +9,27 @@

namespace Core23\TwigFormatterBundle\Tests\Twig;

final class MockTwigLoader implements \Twig_LoaderInterface
{
public function getSourceContext($name)
{
return $name;
}
use Twig\Loader\LoaderInterface;
use Twig\Source;

public function getSource($name)
final class MockTwigLoader implements LoaderInterface
{
public function getSourceContext($name): Source
{
return $name;
return new Source('', $name);
}

public function getCacheKey($name)
public function getCacheKey($name): string
{
return $name;
}

public function isFresh($name, $time)
public function isFresh($name, $time): bool
{
return true;
}

public function exists($name)
public function exists($name): bool
{
return true;
}
Expand Down

0 comments on commit 3d3b81f

Please sign in to comment.