@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | use Twig_Environment; |
| 10 | 10 | use VojtaSvoboda\TwigExtensions\Classes\TimeDiffTranslator; |
| 11 | 11 | |
| 12 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
| 12 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
| 13 | 13 | |
| 14 | 14 | class PluginTest extends PluginTestCase |
| 15 | 15 | { |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $twig = $this->getTwig(); |
| 117 | 117 | |
| 118 | 118 | $now = Carbon::now()->subMinute(); |
| 119 | - $template = "{{ '" . $now->format('Y-m-d H:i:s') . "' | time_diff }}"; |
|
| 119 | + $template = "{{ '".$now->format('Y-m-d H:i:s')."' | time_diff }}"; |
|
| 120 | 120 | |
| 121 | 121 | // this test fails at TravisCI and I don't know why |
| 122 | 122 | $twigTemplate = $twig->createTemplate($template); |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | $key = 'app.custom.key'; |
| 317 | 317 | $value = 'test value'; |
| 318 | 318 | Config::set($key, $value); |
| 319 | - $template = "{{ config('" . $key . "') }}"; |
|
| 319 | + $template = "{{ config('".$key."') }}"; |
|
| 320 | 320 | |
| 321 | 321 | $twigTemplate = $twig->createTemplate($template); |
| 322 | 322 | $this->assertEquals($twigTemplate->render([]), $value); |
@@ -378,7 +378,9 @@ |
||
| 378 | 378 | $key = str_shuffle($character_set); |
| 379 | 379 | $cipher_text = ''; |
| 380 | 380 | $id = 'e' . rand(1, 999999999); |
| 381 | - for ($i = 0; $i < strlen($email); $i += 1) $cipher_text .= $key[strpos($character_set, $email[$i])]; |
|
| 381 | + for ($i = 0; $i < strlen($email); $i += 1) { |
|
| 382 | + $cipher_text .= $key[strpos($character_set, $email[$i])]; |
|
| 383 | + } |
|
| 382 | 384 | $script = 'var a="' . $key . '";var b=a.split("").sort().join("");var c="' . $cipher_text . '";var d="";'; |
| 383 | 385 | $script .= 'for(var e=0;e<c.length;e++)d+=b.charAt(a.indexOf(c.charAt(e)));'; |
| 384 | 386 | $script .= 'var y = d;'; |
@@ -1,7 +1,5 @@ |
||
| 1 | 1 | <?php namespace VojtaSvoboda\TwigExtensions; |
| 2 | 2 | |
| 3 | -use App; |
|
| 4 | -use Backend; |
|
| 5 | 3 | use Carbon\Carbon; |
| 6 | 4 | use Snilius\Twig\SortByFieldExtension; |
| 7 | 5 | use System\Classes\PluginBase; |