mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
fixed CS
This commit is contained in:
@@ -22,7 +22,7 @@ class Twig_Tests_CompilerTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$required_locales = array('fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8', 'French_France.1252');
|
||||
if (false === setlocale(LC_NUMERIC, $required_locales)) {
|
||||
$this->markTestSkipped('Could not set any of required locales: ' . implode(", ", $required_locales));
|
||||
$this->markTestSkipped('Could not set any of required locales: '.implode(", ", $required_locales));
|
||||
}
|
||||
|
||||
$this->assertEquals('1.2', $compiler->repr(1.2)->getSource());
|
||||
|
||||
@@ -62,11 +62,11 @@ class Twig_Tests_LexerTest extends PHPUnit_Framework_TestCase
|
||||
public function testLineDirective()
|
||||
{
|
||||
$template = "foo\n"
|
||||
. "bar\n"
|
||||
. "{% line 10 %}\n"
|
||||
. "{{\n"
|
||||
. "baz\n"
|
||||
. "}}\n";
|
||||
."bar\n"
|
||||
."{% line 10 %}\n"
|
||||
."{{\n"
|
||||
."baz\n"
|
||||
."}}\n";
|
||||
|
||||
$lexer = new Twig_Lexer(new Twig_Environment());
|
||||
$stream = $lexer->tokenize($template);
|
||||
@@ -84,9 +84,9 @@ class Twig_Tests_LexerTest extends PHPUnit_Framework_TestCase
|
||||
public function testLineDirectiveInline()
|
||||
{
|
||||
$template = "foo\n"
|
||||
. "bar{% line 10 %}{{\n"
|
||||
. "baz\n"
|
||||
. "}}\n";
|
||||
."bar{% line 10 %}{{\n"
|
||||
."baz\n"
|
||||
."}}\n";
|
||||
|
||||
$lexer = new Twig_Lexer(new Twig_Environment());
|
||||
$stream = $lexer->tokenize($template);
|
||||
|
||||
@@ -24,6 +24,6 @@ class Twig_Tests_NativeExtensionTest extends PHPUnit_Framework_TestCase
|
||||
$output = $twig->render('{{ d1.date }}{{ d2.date }}', compact('d1', 'd2'));
|
||||
|
||||
// If it fails, PHP will crash.
|
||||
$this->assertEquals($output, $d1->date . $d2->date);
|
||||
$this->assertEquals($output, $d1->date.$d2->date);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,18 +237,18 @@ class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
if ($codepoint < 0x800) {
|
||||
return chr($codepoint >> 6 & 0x3f | 0xc0)
|
||||
. chr($codepoint & 0x3f | 0x80);
|
||||
.chr($codepoint & 0x3f | 0x80);
|
||||
}
|
||||
if ($codepoint < 0x10000) {
|
||||
return chr($codepoint >> 12 & 0x0f | 0xe0)
|
||||
. chr($codepoint >> 6 & 0x3f | 0x80)
|
||||
. chr($codepoint & 0x3f | 0x80);
|
||||
.chr($codepoint >> 6 & 0x3f | 0x80)
|
||||
.chr($codepoint & 0x3f | 0x80);
|
||||
}
|
||||
if ($codepoint < 0x110000) {
|
||||
return chr($codepoint >> 18 & 0x07 | 0xf0)
|
||||
. chr($codepoint >> 12 & 0x3f | 0x80)
|
||||
. chr($codepoint >> 6 & 0x3f | 0x80)
|
||||
. chr($codepoint & 0x3f | 0x80);
|
||||
.chr($codepoint >> 12 & 0x3f | 0x80)
|
||||
.chr($codepoint >> 6 & 0x3f | 0x80)
|
||||
.chr($codepoint & 0x3f | 0x80);
|
||||
}
|
||||
throw new Exception('Codepoint requested outside of Unicode range');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user