浏览代码

Various small improvements

Daniel Rudolf 8 年之前
父节点
当前提交
82a342ba44
共有 3 个文件被更改,包括 2 次插入9 次删除
  1. 0 7
      lib/PicoTwigExtension.php
  2. 2 2
      plugins/DummyPlugin.php
  3. 二进制
      themes/default/menu-icon.png

+ 0 - 7
lib/PicoTwigExtension.php

@@ -93,13 +93,6 @@ class PicoTwigExtension extends Twig_Extension
      */
     public function markdownFilter($markdown)
     {
-        if ($this->getPico()->getParsedown() === null) {
-            throw new LogicException(
-                'Unable to apply Twig "markdown" filter: '
-                . 'Parsedown instance wasn\'t registered yet'
-            );
-        }
-
         return $this->getPico()->getParsedown()->text($markdown);
     }
 

+ 2 - 2
plugins/DummyPlugin.php

@@ -291,12 +291,12 @@ final class DummyPlugin extends AbstractPicoPlugin
      *
      * @see    Pico::getTwig()
      * @see    DummyPlugin::onPageRendered()
-     * @param  Twig_Environment &$twig          twig template engine
+     * @param  Twig_Environment $twig           twig template engine
      * @param  array            &$twigVariables template variables
      * @param  string           &$templateName  file name of the template
      * @return void
      */
-    public function onPageRendering(Twig_Environment &$twig, array &$twigVariables, &$templateName)
+    public function onPageRendering(Twig_Environment $twig, array &$twigVariables, &$templateName)
     {
         // your code
     }

二进制
themes/default/menu-icon.png