@@ -32,9 +32,14 @@ |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | private function processLiterals($tokens, $name, $str) { |
| 35 | - if (is_numeric($name)) $tokens->add(['type' => Tokenizer::NUMERIC, 'value' => $name]); |
|
| 36 | - else if ($name == 'true') $tokens->add(['type' => Tokenizer::BOOL, 'value' => true]); |
|
| 37 | - else if ($name == 'false') $tokens->add(['type' => Tokenizer::BOOL, 'value' => false]); |
|
| 38 | - else $tokens->add(['type' => Tokenizer::NAME, 'value' => $name, 'line' => $str->lineNo()]); |
|
| 35 | + if (is_numeric($name)) { |
|
| 36 | + $tokens->add(['type' => Tokenizer::NUMERIC, 'value' => $name]); |
|
| 37 | + } else if ($name == 'true') { |
|
| 38 | + $tokens->add(['type' => Tokenizer::BOOL, 'value' => true]); |
|
| 39 | + } else if ($name == 'false') { |
|
| 40 | + $tokens->add(['type' => Tokenizer::BOOL, 'value' => false]); |
|
| 41 | + } else { |
|
| 42 | + $tokens->add(['type' => Tokenizer::NAME, 'value' => $name, 'line' => $str->lineNo()]); |
|
| 43 | + } |
|
| 39 | 44 | } |
| 40 | 45 | } |
| 41 | 46 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | $chr = $str->read(); |
| 11 | 11 | $string = $str->extractString(); |
| 12 | 12 | $length = strlen($string)+1; |
| 13 | - $string = str_replace('\\' . $chr, $chr, $string); |
|
| 13 | + $string = str_replace('\\'.$chr, $chr, $string); |
|
| 14 | 14 | $tokens->add(['type' => Tokenizer::STRING, 'value' => $string, 'line' => $str->lineNo()]); |
| 15 | 15 | $str->move($length); |
| 16 | 16 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * @version 1.2 */ |
| 7 | 7 | namespace Transphporm\Property\ContentPseudo; |
| 8 | 8 | class Attr implements \Transphporm\Property\ContentPseudo { |
| 9 | - public function run($value, $pseudoArgs, $element) { |
|
| 10 | - $element->setAttribute($pseudoArgs, implode('', $value)); |
|
| 11 | - } |
|
| 9 | + public function run($value, $pseudoArgs, $element) { |
|
| 10 | + $element->setAttribute($pseudoArgs, implode('', $value)); |
|
| 11 | + } |
|
| 12 | 12 | } |
@@ -6,13 +6,13 @@ |
||
| 6 | 6 | * @version 1.2 */ |
| 7 | 7 | namespace Transphporm\Property\ContentPseudo; |
| 8 | 8 | class Headers implements \Transphporm\Property\ContentPseudo { |
| 9 | - private $headers; |
|
| 9 | + private $headers; |
|
| 10 | 10 | |
| 11 | - public function __construct(&$headers) { |
|
| 11 | + public function __construct(&$headers) { |
|
| 12 | 12 | $this->headers = &$headers; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | - public function run($value, $pseudoArgs, $element) { |
|
| 16 | - $this->headers[] = [$pseudoArgs, implode('', $value)]; |
|
| 17 | - } |
|
| 15 | + public function run($value, $pseudoArgs, $element) { |
|
| 16 | + $this->headers[] = [$pseudoArgs, implode('', $value)]; |
|
| 17 | + } |
|
| 18 | 18 | } |
@@ -7,5 +7,5 @@ |
||
| 7 | 7 | namespace Transphporm\Property; |
| 8 | 8 | |
| 9 | 9 | interface ContentPseudo { |
| 10 | - public function run($value, $pseudoArgs, $element); |
|
| 10 | + public function run($value, $pseudoArgs, $element); |
|
| 11 | 11 | } |
@@ -6,9 +6,9 @@ |
||
| 6 | 6 | * @version 1.2 */ |
| 7 | 7 | namespace Transphporm; |
| 8 | 8 | class RunException extends \Exception { |
| 9 | - public function __construct($operationType, $operationName, \Exception $previous) { |
|
| 10 | - $message = 'TSS Error: Problem carrying out ' . $operationType . ' \'' . $operationName . '\''; |
|
| 9 | + public function __construct($operationType, $operationName, \Exception $previous) { |
|
| 10 | + $message = 'TSS Error: Problem carrying out ' . $operationType . ' \'' . $operationName . '\''; |
|
| 11 | 11 | |
| 12 | - parent::__construct($message, 0, $previous); |
|
| 13 | - } |
|
| 12 | + parent::__construct($message, 0, $previous); |
|
| 13 | + } |
|
| 14 | 14 | } |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | namespace Transphporm; |
| 8 | 8 | class RunException extends \Exception { |
| 9 | 9 | public function __construct($operationType, $operationName, \Exception $previous) { |
| 10 | - $message = 'TSS Error: Problem carrying out ' . $operationType . ' \'' . $operationName . '\''; |
|
| 10 | + $message = 'TSS Error: Problem carrying out '.$operationType.' \''.$operationName.'\''; |
|
| 11 | 11 | |
| 12 | 12 | parent::__construct($message, 0, $previous); |
| 13 | 13 | } |