Completed
Pull Request — master (#51)
by Ben
03:05
created
classes/PHPTAL/Dom/Defs.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPTAL templating engine
4
- *
5
- * PHP Version 5
6
- *
7
- * @category HTML
8
- * @package  PHPTAL
9
- * @author   Laurent Bedubourg <[email protected]>
10
- * @author   Kornel Lesiński <[email protected]>
11
- * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
- * @version  SVN: $Id$
13
- * @link     http://phptal.org/
14
- */
3
+     * PHPTAL templating engine
4
+     *
5
+     * PHP Version 5
6
+     *
7
+     * @category HTML
8
+     * @package  PHPTAL
9
+     * @author   Laurent Bedubourg <[email protected]>
10
+     * @author   Kornel Lesiński <[email protected]>
11
+     * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
+     * @version  SVN: $Id$
13
+     * @link     http://phptal.org/
14
+     */
15 15
 
16 16
 /**
17 17
  * You're probably not using PHPTAL class properly
Please login to merge, or discard this patch.
classes/PHPTAL/Dom/Node.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPTAL templating engine
4
- *
5
- * PHP Version 5
6
- *
7
- * @category HTML
8
- * @package  PHPTAL
9
- * @author   Laurent Bedubourg <[email protected]>
10
- * @author   Kornel Lesiński <[email protected]>
11
- * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
- * @version  SVN: $Id$
13
- * @link     http://phptal.org/
14
- */
3
+     * PHPTAL templating engine
4
+     *
5
+     * PHP Version 5
6
+     *
7
+     * @category HTML
8
+     * @package  PHPTAL
9
+     * @author   Laurent Bedubourg <[email protected]>
10
+     * @author   Kornel Lesiński <[email protected]>
11
+     * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
+     * @version  SVN: $Id$
13
+     * @link     http://phptal.org/
14
+     */
15 15
 
16 16
 /**
17 17
  * You're probably not using PHPTAL class properly
Please login to merge, or discard this patch.
classes/PHPTAL/Dom/Comment.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPTAL templating engine
4
- *
5
- * PHP Version 5
6
- *
7
- * @category HTML
8
- * @package  PHPTAL
9
- * @author   Laurent Bedubourg <[email protected]>
10
- * @author   Kornel Lesiński <[email protected]>
11
- * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
- * @version  SVN: $Id$
13
- * @link     http://phptal.org/
14
- */
3
+     * PHPTAL templating engine
4
+     *
5
+     * PHP Version 5
6
+     *
7
+     * @category HTML
8
+     * @package  PHPTAL
9
+     * @author   Laurent Bedubourg <[email protected]>
10
+     * @author   Kornel Lesiński <[email protected]>
11
+     * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
+     * @version  SVN: $Id$
13
+     * @link     http://phptal.org/
14
+     */
15 15
 
16 16
 /**
17 17
  * You're probably not using PHPTAL class properly
Please login to merge, or discard this patch.
classes/PHPTAL/Dom/Element.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPTAL templating engine
4
- *
5
- * PHP Version 5
6
- *
7
- * @category HTML
8
- * @package  PHPTAL
9
- * @author   Laurent Bedubourg <[email protected]>
10
- * @author   Kornel Lesiński <[email protected]>
11
- * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
- * @version  SVN: $Id$
13
- * @link     http://phptal.org/
14
- */
3
+     * PHPTAL templating engine
4
+     *
5
+     * PHP Version 5
6
+     *
7
+     * @category HTML
8
+     * @package  PHPTAL
9
+     * @author   Laurent Bedubourg <[email protected]>
10
+     * @author   Kornel Lesiński <[email protected]>
11
+     * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
+     * @version  SVN: $Id$
13
+     * @link     http://phptal.org/
14
+     */
15 15
 
16 16
 
17 17
 /**
@@ -466,10 +466,10 @@  discard block
 block discarded – undo
466 466
             $nsattr = PHPTAL_Dom_Defs::getInstance()->getNamespaceAttribute($domattr->getNamespaceURI(), $domattr->getLocalName());
467 467
             if (array_key_exists($nsattr->getPriority(), $temp)) {
468 468
                 throw new PHPTAL_TemplateException(sprintf("Attribute conflict in < %s > '%s' cannot appear with '%s'",
469
-                               $this->qualifiedName,
470
-                               $key,
471
-                               $temp[$nsattr->getPriority()][0]->getNamespace()->getPrefix() . ':' . $temp[$nsattr->getPriority()][0]->getLocalName()
472
-                               ), $this->getSourceFile(), $this->getSourceLine());
469
+                                $this->qualifiedName,
470
+                                $key,
471
+                                $temp[$nsattr->getPriority()][0]->getNamespace()->getPrefix() . ':' . $temp[$nsattr->getPriority()][0]->getLocalName()
472
+                                ), $this->getSourceFile(), $this->getSourceLine());
473 473
             }
474 474
             $temp[$nsattr->getPriority()] = array($nsattr, $domattr);
475 475
         }
Please login to merge, or discard this patch.
classes/PHPTAL/Dom/DocumentType.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPTAL templating engine
4
- *
5
- * PHP Version 5
6
- *
7
- * @category HTML
8
- * @package  PHPTAL
9
- * @author   Laurent Bedubourg <[email protected]>
10
- * @author   Kornel Lesiński <[email protected]>
11
- * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
- * @version  SVN: $Id$
13
- * @link     http://phptal.org/
14
- */
3
+     * PHPTAL templating engine
4
+     *
5
+     * PHP Version 5
6
+     *
7
+     * @category HTML
8
+     * @package  PHPTAL
9
+     * @author   Laurent Bedubourg <[email protected]>
10
+     * @author   Kornel Lesiński <[email protected]>
11
+     * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
+     * @version  SVN: $Id$
13
+     * @link     http://phptal.org/
14
+     */
15 15
 
16 16
 /**
17 17
  * You're probably not using PHPTAL class properly
Please login to merge, or discard this patch.
classes/PHPTAL/Dom/DocumentBuilder.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPTAL templating engine
4
- *
5
- * PHP Version 5
6
- *
7
- * @category HTML
8
- * @package  PHPTAL
9
- * @author   Laurent Bedubourg <[email protected]>
10
- * @author   Kornel Lesiński <[email protected]>
11
- * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
- * @version  SVN: $Id$
13
- * @link     http://phptal.org/
14
- */
3
+     * PHPTAL templating engine
4
+     *
5
+     * PHP Version 5
6
+     *
7
+     * @category HTML
8
+     * @package  PHPTAL
9
+     * @author   Laurent Bedubourg <[email protected]>
10
+     * @author   Kornel Lesiński <[email protected]>
11
+     * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
+     * @version  SVN: $Id$
13
+     * @link     http://phptal.org/
14
+     */
15 15
 
16 16
 /**
17 17
  * You're probably not using PHPTAL class properly
Please login to merge, or discard this patch.
classes/PHPTAL/Dom/XmlDeclaration.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPTAL templating engine
4
- *
5
- * PHP Version 5
6
- *
7
- * @category HTML
8
- * @package  PHPTAL
9
- * @author   Laurent Bedubourg <[email protected]>
10
- * @author   Kornel Lesiński <[email protected]>
11
- * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
- * @version  SVN: $Id$
13
- * @link     http://phptal.org/
14
- */
3
+     * PHPTAL templating engine
4
+     *
5
+     * PHP Version 5
6
+     *
7
+     * @category HTML
8
+     * @package  PHPTAL
9
+     * @author   Laurent Bedubourg <[email protected]>
10
+     * @author   Kornel Lesiński <[email protected]>
11
+     * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
+     * @version  SVN: $Id$
13
+     * @link     http://phptal.org/
14
+     */
15 15
 
16 16
 /**
17 17
  * You're probably not using PHPTAL class properly
Please login to merge, or discard this patch.
classes/PHPTAL/Dom/Text.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPTAL templating engine
4
- *
5
- * PHP Version 5
6
- *
7
- * @category HTML
8
- * @package  PHPTAL
9
- * @author   Laurent Bedubourg <[email protected]>
10
- * @author   Kornel Lesiński <[email protected]>
11
- * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
- * @version  SVN: $Id$
13
- * @link     http://phptal.org/
14
- */
3
+     * PHPTAL templating engine
4
+     *
5
+     * PHP Version 5
6
+     *
7
+     * @category HTML
8
+     * @package  PHPTAL
9
+     * @author   Laurent Bedubourg <[email protected]>
10
+     * @author   Kornel Lesiński <[email protected]>
11
+     * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
+     * @version  SVN: $Id$
13
+     * @link     http://phptal.org/
14
+     */
15 15
 
16 16
 /**
17 17
  * You're probably not using PHPTAL class properly
Please login to merge, or discard this patch.
classes/PHPTAL/Dom/SaxXmlParser.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * PHPTAL templating engine
4
- *
5
- * PHP Version 5
6
- *
7
- * @category HTML
8
- * @package  PHPTAL
9
- * @author   Laurent Bedubourg <[email protected]>
10
- * @author   Kornel Lesiński <[email protected]>
11
- * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
- * @version  SVN: $Id$
13
- * @link     http://phptal.org/
14
- */
3
+     * PHPTAL templating engine
4
+     *
5
+     * PHP Version 5
6
+     *
7
+     * @category HTML
8
+     * @package  PHPTAL
9
+     * @author   Laurent Bedubourg <[email protected]>
10
+     * @author   Kornel Lesiński <[email protected]>
11
+     * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
12
+     * @version  SVN: $Id$
13
+     * @link     http://phptal.org/
14
+     */
15 15
 
16 16
 /**
17 17
  * Simple sax like xml parser for PHPTAL
@@ -60,23 +60,23 @@  discard block
 block discarded – undo
60 60
 
61 61
 
62 62
     static $state_names = array(
63
-      self::ST_ROOT => 'root node',
64
-      self::ST_TEXT => 'text',
65
-      self::ST_LT   => 'start of tag',
66
-      self::ST_TAG_NAME => 'tag name',
67
-      self::ST_TAG_CLOSE => 'closing tag',
68
-      self::ST_TAG_SINGLE => 'self-closing tag',
69
-      self::ST_TAG_ATTRIBUTES => 'tag',
70
-      self::ST_TAG_BETWEEN_ATTRIBUTE => 'tag attributes',
71
-      self::ST_CDATA => 'CDATA',
72
-      self::ST_COMMENT => 'comment',
73
-      self::ST_DOCTYPE => 'doctype',
74
-      self::ST_XMLDEC => 'XML declaration',
75
-      self::ST_PREPROC => 'preprocessor directive',
76
-      self::ST_ATTR_KEY => 'attribute name',
77
-      self::ST_ATTR_EQ => 'attribute value',
78
-      self::ST_ATTR_QUOTE => 'quoted attribute value',
79
-      self::ST_ATTR_VALUE => 'unquoted attribute value',
63
+        self::ST_ROOT => 'root node',
64
+        self::ST_TEXT => 'text',
65
+        self::ST_LT   => 'start of tag',
66
+        self::ST_TAG_NAME => 'tag name',
67
+        self::ST_TAG_CLOSE => 'closing tag',
68
+        self::ST_TAG_SINGLE => 'self-closing tag',
69
+        self::ST_TAG_ATTRIBUTES => 'tag',
70
+        self::ST_TAG_BETWEEN_ATTRIBUTE => 'tag attributes',
71
+        self::ST_CDATA => 'CDATA',
72
+        self::ST_COMMENT => 'comment',
73
+        self::ST_DOCTYPE => 'doctype',
74
+        self::ST_XMLDEC => 'XML declaration',
75
+        self::ST_PREPROC => 'preprocessor directive',
76
+        self::ST_ATTR_KEY => 'attribute name',
77
+        self::ST_ATTR_EQ => 'attribute value',
78
+        self::ST_ATTR_QUOTE => 'quoted attribute value',
79
+        self::ST_ATTR_VALUE => 'unquoted attribute value',
80 80
     );
81 81
 
82 82
     private $input_encoding;
@@ -381,15 +381,15 @@  discard block
 block discarded – undo
381 381
 
382 382
             // http://www.w3.org/International/questions/qa-forms-utf-8
383 383
             $match = '[\x09\x0A\x0D\x20-\x7F]'        // ASCII
384
-               . '|[\xC2-\xDF][\x80-\xBF]'            // non-overlong 2-byte
385
-               . '|\xE0[\xA0-\xBF][\x80-\xBF]'        // excluding overlongs
386
-               . '|[\xE1-\xEC\xEE\xEE][\x80-\xBF]{2}' // straight 3-byte (exclude FFFE and FFFF)
387
-               . '|\xEF[\x80-\xBE][\x80-\xBF]'        // straight 3-byte
388
-               . '|\xEF\xBF[\x80-\xBD]'               // straight 3-byte
389
-               . '|\xED[\x80-\x9F][\x80-\xBF]'        // excluding surrogates
390
-               . '|\xF0[\x90-\xBF][\x80-\xBF]{2}'     // planes 1-3
391
-               . '|[\xF1-\xF3][\x80-\xBF]{3}'         // planes 4-15
392
-               . '|\xF4[\x80-\x8F][\x80-\xBF]{2}';    // plane 16
384
+                . '|[\xC2-\xDF][\x80-\xBF]'            // non-overlong 2-byte
385
+                . '|\xE0[\xA0-\xBF][\x80-\xBF]'        // excluding overlongs
386
+                . '|[\xE1-\xEC\xEE\xEE][\x80-\xBF]{2}' // straight 3-byte (exclude FFFE and FFFF)
387
+                . '|\xEF[\x80-\xBE][\x80-\xBF]'        // straight 3-byte
388
+                . '|\xEF\xBF[\x80-\xBD]'               // straight 3-byte
389
+                . '|\xED[\x80-\x9F][\x80-\xBF]'        // excluding surrogates
390
+                . '|\xF0[\x90-\xBF][\x80-\xBF]{2}'     // planes 1-3
391
+                . '|[\xF1-\xF3][\x80-\xBF]{3}'         // planes 4-15
392
+                . '|\xF4[\x80-\x8F][\x80-\xBF]{2}';    // plane 16
393 393
 
394 394
             if (!preg_match('/^(?:(?>'.$match.'))+$/s',$str)) {
395 395
                 $res = preg_split('/((?>'.$match.')+)/s',$str,null,PREG_SPLIT_DELIM_CAPTURE);
Please login to merge, or discard this patch.