Completed
Pull Request — master (#41)
by Vladimir
02:34
created
src/allejo/stakx/Exception/FileAwareException.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     private $lineNumber;
16 16
     private $filePath;
17 17
 
18
-    public function __construct($message = '', $code = 0, \Exception $previous = null, $path = '', $line = -1)
18
+    public function __construct ($message = '', $code = 0, \Exception $previous = null, $path = '', $line = -1)
19 19
     {
20 20
         parent::__construct($message, $code, $previous);
21 21
 
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
         $this->lineNumber = $line;
24 24
     }
25 25
 
26
-    public function getLineNumber()
26
+    public function getLineNumber ()
27 27
     {
28 28
         return $this->lineNumber;
29 29
     }
30 30
 
31
-    public function getPath()
31
+    public function getPath ()
32 32
     {
33 33
         return $this->filePath;
34 34
     }
35 35
 
36
-    public static function castException(\Exception $e, $filePath)
36
+    public static function castException (\Exception $e, $filePath)
37 37
     {
38 38
         $lineNumber = ($e instanceof \Twig_Error_Syntax) ? $e->getTemplateLine() : -1;
39 39
 
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/OrderFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 class OrderFilter
11 11
 {
12
-    public function __invoke($array, $key, $order = 'ASC')
12
+    public function __invoke ($array, $key, $order = 'ASC')
13 13
     {
14 14
         if (!is_array($array))
15 15
         {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         return $array;
35 35
     }
36 36
 
37
-    public static function get()
37
+    public static function get ()
38 38
     {
39 39
         return new \Twig_SimpleFilter('order', new self());
40 40
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/GroupByFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 class GroupByFilter
11 11
 {
12
-    public function __invoke($array, $sortKey)
12
+    public function __invoke ($array, $sortKey)
13 13
     {
14 14
         $arr = array();
15 15
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         return $arr;
39 39
     }
40 40
 
41
-    public static function get()
41
+    public static function get ()
42 42
     {
43 43
         return new \Twig_SimpleFilter('group', new self());
44 44
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/FileFunction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@
 block discarded – undo
11 11
 
12 12
 class FileFunction extends TwigFilesystem
13 13
 {
14
-    public function __invoke(Twig_Environment $env, $filePath)
14
+    public function __invoke (Twig_Environment $env, $filePath)
15 15
     {
16 16
         parent::__invoke($env, $filePath);
17 17
 
18 18
         return file_get_contents($this->path);
19 19
     }
20 20
 
21
-    public static function get()
21
+    public static function get ()
22 22
     {
23 23
         return new \Twig_SimpleFunction('file', new self(), array(
24 24
             'needs_environment' => true,
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/TwigExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 class TwigExtension extends \Twig_Extension
11 11
 {
12
-    public function getFilters()
12
+    public function getFilters ()
13 13
     {
14 14
         return array(
15 15
             GroupByFilter::get(),
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         );
19 19
     }
20 20
 
21
-    public function getFunctions()
21
+    public function getFunctions ()
22 22
     {
23 23
         return array(
24 24
             BaseUrlFunction::get(),
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      *
32 32
      * @return string The extension name
33 33
      */
34
-    public function getName()
34
+    public function getName ()
35 35
     {
36 36
         return 'stakx_core_extension';
37 37
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/TwigFilesystem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     protected $dir;
19 19
     protected $path;
20 20
 
21
-    public function __invoke(Twig_Environment $env, $location)
21
+    public function __invoke (Twig_Environment $env, $location)
22 22
     {
23 23
         $this->fs = new Filesystem();
24 24
         $this->globs = $env->getGlobals();
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/FinderFunction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 class FinderFunction extends TwigFilesystem
14 14
 {
15
-    public function __invoke(Twig_Environment $env, $folderLocation)
15
+    public function __invoke (Twig_Environment $env, $folderLocation)
16 16
     {
17 17
         parent::__invoke($env, $folderLocation);
18 18
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         return $finder;
23 23
     }
24 24
 
25
-    public static function get()
25
+    public static function get ()
26 26
     {
27 27
         return new \Twig_SimpleFunction('finder', new self(), array(
28 28
             'needs_environment' => true,
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/BaseUrlFunction.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 class BaseUrlFunction
13 13
 {
14
-    public function __invoke(Twig_Environment $env, $assetPath)
14
+    public function __invoke (Twig_Environment $env, $assetPath)
15 15
     {
16 16
         $globals = $env->getGlobals();
17 17
         $assetPath = $this->guessAssetPath($assetPath);
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
         return $baseURL . $url;
26 26
     }
27 27
 
28
-    public static function get()
28
+    public static function get ()
29 29
     {
30 30
         return new \Twig_SimpleFunction('url', new self(), array(
31 31
             'needs_environment' => true,
32 32
         ));
33 33
     }
34 34
 
35
-    private function guessAssetPath($assetPath)
35
+    private function guessAssetPath ($assetPath)
36 36
     {
37 37
         if (is_array($assetPath) || ($assetPath instanceof \ArrayAccess))
38 38
         {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         return $assetPath;
47 47
     }
48 48
 
49
-    private function trimSlashes($url)
49
+    private function trimSlashes ($url)
50 50
     {
51 51
         $url = ltrim($url, '/');
52 52
 
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/FilesystemExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
 
10 10
 class FilesystemExtension extends \Twig_Extension
11 11
 {
12
-    public function getFilters()
12
+    public function getFilters ()
13 13
     {
14 14
         return array();
15 15
     }
16 16
 
17
-    public function getFunctions()
17
+    public function getFunctions ()
18 18
     {
19 19
         return array(
20 20
             FinderFunction::get(),
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      *
27 27
      * @return string The extension name
28 28
      */
29
-    public function getName()
29
+    public function getName ()
30 30
     {
31 31
         return 'stakx_fs_extension';
32 32
     }
Please login to merge, or discard this patch.