@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | public function __construct($phantomHost, $templateCache = null) { |
| 33 | 33 | $this->phantomHost = $phantomHost; |
| 34 | 34 | $this->browser = new Browser($phantomHost); |
| 35 | - $this->templateLoader = new \Twig_Loader_Filesystem(realpath(__DIR__ . '/Resources/Script')); |
|
| 35 | + $this->templateLoader = new \Twig_Loader_Filesystem(realpath(__DIR__.'/Resources/Script')); |
|
| 36 | 36 | $this->templateEnv = new \Twig_Environment($this->templateLoader, array('cache' => $this->templateCacheSetup($templateCache), 'strict_variables' => true)); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | protected function templateCacheSetup($templateCache) { |
| 46 | 46 | $cacheDir = $templateCache; |
| 47 | 47 | if ($templateCache === null) { |
| 48 | - $cacheDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "jcalderonzumba" . DIRECTORY_SEPARATOR . "phantomjs"; |
|
| 48 | + $cacheDir = sys_get_temp_dir().DIRECTORY_SEPARATOR."jcalderonzumba".DIRECTORY_SEPARATOR."phantomjs"; |
|
| 49 | 49 | if (!file_exists($cacheDir)) { |
| 50 | 50 | mkdir($cacheDir, 0777, true); |
| 51 | 51 | } |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | { |
| 64 | 64 | if (preg_match('/^function[\s\(]/', $script)) { |
| 65 | 65 | $script = preg_replace('/;$/', '', $script); |
| 66 | - $script = '(' . $script . ')'; |
|
| 66 | + $script = '('.$script.')'; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | return $script; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | if (is_bool($value)) { |
| 35 | 35 | $value = $this->boolToString($value); |
| 36 | 36 | } elseif (is_numeric($value)) { |
| 37 | - $value = (string) $value; |
|
| 37 | + $value = (string)$value; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | $javascript = $this->javascriptTemplateRender("set_value.js.twig", array("xpath" => $xpath, "value" => json_encode($value))); |