Completed
Branch master (5ee980)
by Vladimir
04:05
created
src/Twig/TextFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                 $length = $breakpoint;
50 50
             }
51 51
 
52
-            return rtrim(mb_substr($value, 0, $length, $env->getCharset())).$separator;
52
+            return rtrim(mb_substr($value, 0, $length, $env->getCharset())) . $separator;
53 53
         }
54 54
 
55 55
         return $value;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 }
87 87
             }
88 88
 
89
-            return rtrim(substr($value, 0, $length)).$separator;
89
+            return rtrim(substr($value, 0, $length)) . $separator;
90 90
         }
91 91
 
92 92
         return $value;
Please login to merge, or discard this patch.
src/Twig/OrderFilter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
6 6
 
7 7
 class OrderFilter
8 8
 {
9
-    public function __invoke ($array, $key, $order = "ASC")
9
+    public function __invoke($array, $key, $order = "ASC")
10 10
     {
11
-        usort($array, function ($a, $b) use ($key, $order) {
11
+        usort($array, function($a, $b) use ($key, $order) {
12 12
             $a = ($a instanceof ContentItem) ? $a->getFrontMatter() : $a;
13 13
             $b = ($b instanceof ContentItem) ? $b->getFrontMatter() : $b;
14 14
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         return $array;
25 25
     }
26 26
 
27
-    public static function get ()
27
+    public static function get()
28 28
     {
29 29
         return new \Twig_SimpleFilter('order', new self());
30 30
     }
Please login to merge, or discard this patch.
src/Twig/FinderFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         return $finder;
18 18
     }
19 19
 
20
-    public static function get ()
20
+    public static function get()
21 21
     {
22 22
         return new \Twig_SimpleFunction('finder', new self(), array(
23 23
             'needs_environment' => true
Please login to merge, or discard this patch.
src/System/Folder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     protected $absolutePath;
17 17
     protected $targetDirectories;
18 18
 
19
-    public function __construct ($folderPath)
19
+    public function __construct($folderPath)
20 20
     {
21 21
         $this->fs = new Filesystem();
22 22
         $this->targetDirectories = array();
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
         }
46 46
     }
47 47
 
48
-    public function __toString ()
48
+    public function __toString()
49 49
     {
50 50
         return rtrim($this->absolutePath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
51 51
     }
52 52
 
53
-    public function setTargetDirectory ($folderName)
53
+    public function setTargetDirectory($folderName)
54 54
     {
55 55
         if (is_null($folderName) || empty($folderName))
56 56
         {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         }
63 63
     }
64 64
 
65
-    public function copyFile ($absolutePath, $targetPath)
65
+    public function copyFile($absolutePath, $targetPath)
66 66
     {
67 67
         $targetPath = ltrim($targetPath, DIRECTORY_SEPARATOR);
68 68
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         );
74 74
     }
75 75
 
76
-    public function writeFile ($targetPath, $fileContent)
76
+    public function writeFile($targetPath, $fileContent)
77 77
     {
78 78
         $outputFolder   = $this->fs->getFolderPath($targetPath);
79 79
         $targetFileName = $this->fs->getFileName($outputFolder);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         ));
99 99
     }
100 100
 
101
-    private function buildPath ($pathFragments)
101
+    private function buildPath($pathFragments)
102 102
     {
103 103
         $paths = func_get_args();
104 104
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      *
111 111
      * @return string
112 112
      */
113
-    private function getCwd ()
113
+    private function getCwd()
114 114
     {
115 115
         $location = array_merge(array($this->absolutePath), $this->targetDirectories);
116 116
 
Please login to merge, or discard this patch.
src/System/FileSystem.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @return string
32 32
      */
33
-    public function absolutePath ($pathFragments)
33
+    public function absolutePath($pathFragments)
34 34
     {
35 35
         $args = func_get_args();
36 36
         array_unshift($args, getcwd());
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      *
46 46
      * @return string
47 47
      */
48
-    public function appendPath ($pathFragments)
48
+    public function appendPath($pathFragments)
49 49
     {
50 50
         return implode(DIRECTORY_SEPARATOR, func_get_args());
51 51
     }
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @return string
59 59
      */
60
-    public function getRelativePath ($path)
60
+    public function getRelativePath($path)
61 61
     {
62 62
         return str_replace(getcwd() . DIRECTORY_SEPARATOR, '', $path);
63 63
     }
64 64
 
65
-    public function getFinder ($explicitIncludes = array(), $explicitIgnores = array(), $searchIn = "")
65
+    public function getFinder($explicitIncludes = array(), $explicitIgnores = array(), $searchIn = "")
66 66
     {
67 67
         $finder = new Finder();
68 68
         $finder->files()
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      *
100 100
      * @return string
101 101
      */
102
-    public function getBaseName ($filePath)
102
+    public function getBaseName($filePath)
103 103
     {
104 104
         return pathinfo($filePath, PATHINFO_FILENAME);
105 105
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      *
112 112
      * @return string
113 113
      */
114
-    public function getFileName ($filePath)
114
+    public function getFileName($filePath)
115 115
     {
116 116
         return pathinfo($filePath, PATHINFO_BASENAME);
117 117
     }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      *
124 124
      * @return string
125 125
      */
126
-    public function getFolderPath ($filePath)
126
+    public function getFolderPath($filePath)
127 127
     {
128 128
         return pathinfo($filePath, PATHINFO_DIRNAME);
129 129
     }
@@ -135,12 +135,12 @@  discard block
 block discarded – undo
135 135
      *
136 136
      * @return string The extension of the file
137 137
      */
138
-    public function getExtension ($filename)
138
+    public function getExtension($filename)
139 139
     {
140 140
         return pathinfo($filename, PATHINFO_EXTENSION);
141 141
     }
142 142
 
143
-    public function isDir ($folderPath)
143
+    public function isDir($folderPath)
144 144
     {
145 145
         return is_dir($folderPath);
146 146
     }
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      *
153 153
      * @return string
154 154
      */
155
-    public function removeExtension ($filename)
155
+    public function removeExtension($filename)
156 156
     {
157 157
         return $this->appendPath(
158 158
                    $this->getFolderPath($filename),
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      *
170 170
      * @return SplFileInfo A reference to the newly created file
171 171
      */
172
-    public function writeFile ($targetDir, $fileName, $content)
172
+    public function writeFile($targetDir, $fileName, $content)
173 173
     {
174 174
         $outputFolder = $this->getFolderPath($this->absolutePath($targetDir, $fileName));
175 175
         $targetFile   = $this->getFileName($fileName);
Please login to merge, or discard this patch.