Completed
Pull Request — master (#236)
by
unknown
03:52
created
src/Module/Functions.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 		$templateFunction = new \Transphporm\TSSFunction\Template($config->getElementData(), $config->getCssToXpath(), $baseDir);
22 22
 		$functionSet->addFunction('template', $templateFunction);
23 23
 		$functionSet->addFunction('json', new \Transphporm\TSSFunction\Json($baseDir));
24
-        $functionSet->addFunction('constant', new \Transphporm\TSSFunction\Constant());
24
+		$functionSet->addFunction('constant', new \Transphporm\TSSFunction\Constant());
25 25
 		$functionSet->addFunction('file', new \Transphporm\TSSFunction\File($baseDir));
26 26
 
27 27
 		// Register HTML formatter here because it uses the template function
Please login to merge, or discard this patch.
src/TSSFunction/File.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -7,30 +7,30 @@
 block discarded – undo
7 7
 
8 8
 class File implements \Transphporm\TSSFunction
9 9
 {
10
-    private $filePath;
10
+	private $filePath;
11 11
 
12
-    public function __construct(\Transphporm\FilePath $filePath)
13
-    {
14
-        $this->filePath = $filePath;
15
-    }
12
+	public function __construct(\Transphporm\FilePath $filePath)
13
+	{
14
+		$this->filePath = $filePath;
15
+	}
16 16
 
17
-    /**
18
-     * @param array $args
19
-     * @param \DomElement|null $element
20
-     *
21
-     * @return array
22
-     * @throws \Exception
23
-     */
24
-    public function run(array $args, \DomElement $element = null)
25
-    {
26
-        $fileContents = $args[0];
17
+	/**
18
+	 * @param array $args
19
+	 * @param \DomElement|null $element
20
+	 *
21
+	 * @return array
22
+	 * @throws \Exception
23
+	 */
24
+	public function run(array $args, \DomElement $element = null)
25
+	{
26
+		$fileContents = $args[0];
27 27
 
28
-        $path = $this->filePath->getFilePath($fileContents);
29
-        if (!file_exists($path)) {
30
-            throw new \Exception('File does not exist at: ' . $path);
31
-        }
32
-        $fileContents = file_get_contents($path);
28
+		$path = $this->filePath->getFilePath($fileContents);
29
+		if (!file_exists($path)) {
30
+			throw new \Exception('File does not exist at: ' . $path);
31
+		}
32
+		$fileContents = file_get_contents($path);
33 33
 
34
-        return $fileContents;
35
-    }
34
+		return $fileContents;
35
+	}
36 36
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
         $path = $this->filePath->getFilePath($fileContents);
29 29
         if (!file_exists($path)) {
30
-            throw new \Exception('File does not exist at: ' . $path);
30
+            throw new \Exception('File does not exist at: '.$path);
31 31
         }
32 32
         $fileContents = file_get_contents($path);
33 33
 
Please login to merge, or discard this patch.