Skip to content

Commit

Permalink
[TwigBridge] Removed duplicated code from TwigRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
hason authored and fabpot committed Feb 10, 2015
1 parent 8b12bf9 commit 1a9aca7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
10 changes: 0 additions & 10 deletions src/Symfony/Bridge/Twig/Form/TwigRenderer.php
Expand Up @@ -11,11 +11,7 @@

namespace Symfony\Bridge\Twig\Form;

use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter;
use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface;
use Symfony\Component\Form\FormRenderer;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;

/**
* @author Bernhard Schussek <bschussek@gmail.com>
Expand All @@ -29,12 +25,6 @@ class TwigRenderer extends FormRenderer implements TwigRendererInterface

public function __construct(TwigRendererEngineInterface $engine, $csrfTokenManager = null)
{
if ($csrfTokenManager instanceof CsrfProviderInterface) {
$csrfTokenManager = new CsrfProviderAdapter($csrfTokenManager);
} elseif (null !== $csrfTokenManager && !$csrfTokenManager instanceof CsrfTokenManagerInterface) {
throw new UnexpectedTypeException($csrfTokenManager, 'CsrfProviderInterface or CsrfTokenManagerInterface');
}

parent::__construct($engine, $csrfTokenManager);

$this->engine = $engine;
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Bridge/Twig/composer.json
Expand Up @@ -17,7 +17,6 @@
],
"require": {
"php": ">=5.3.3",
"symfony/security-csrf": "~2.4",
"twig/twig": "~1.13,>=1.13.1"
},
"require-dev": {
Expand Down

0 comments on commit 1a9aca7

Please sign in to comment.