Completed
Pull Request — master (#41)
by Vladimir
04:25
created
src/Gregwar/RST/HTML/Nodes/CodeNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 class CodeNode extends Base
13 13
 {
14
-    public function render()
14
+    public function render ()
15 15
     {
16 16
         return '<pre><code class="hljs language-' . $this->language . '">' . $this->value . '</code></pre>';
17 17
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Command/WatchCommand.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 WatchCommand extends BuildableCommand
14 14
 {
15
-    protected function configure()
15
+    protected function configure ()
16 16
     {
17 17
         parent::configure();
18 18
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         $this->setDescription('Watch the source folder and rebuild the website as files change');
21 21
     }
22 22
 
23
-    protected function execute(InputInterface $input, OutputInterface $output)
23
+    protected function execute (InputInterface $input, OutputInterface $output)
24 24
     {
25 25
         parent::execute($input, $output);
26 26
 
Please login to merge, or discard this patch.
src/allejo/stakx/Command/BuildCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     /**
17 17
      * {@inheritdoc}
18 18
      */
19
-    protected function configure()
19
+    protected function configure ()
20 20
     {
21 21
         parent::configure();
22 22
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * {@inheritdoc}
29 29
      */
30
-    protected function execute(InputInterface $input, OutputInterface $output)
30
+    protected function execute (InputInterface $input, OutputInterface $output)
31 31
     {
32 32
         parent::execute($input, $output);
33 33
 
Please login to merge, or discard this patch.
src/allejo/stakx/Command/BuildableCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * {@inheritdoc}
42 42
      */
43
-    protected function configure()
43
+    protected function configure ()
44 44
     {
45 45
         $this->fs = new Filesystem();
46 46
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     /**
54 54
      * {@inheritdoc}
55 55
      */
56
-    protected function execute(InputInterface $input, OutputInterface $output)
56
+    protected function execute (InputInterface $input, OutputInterface $output)
57 57
     {
58 58
         $this->website = new Website($output);
59 59
         $this->website->setConfLess($input->getOption('no-conf'));
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      *
66 66
      * @param InputInterface $input
67 67
      */
68
-    protected function configureBuild(InputInterface $input)
68
+    protected function configureBuild (InputInterface $input)
69 69
     {
70 70
         $this->website->setConfiguration($input->getOption('conf'));
71 71
         $this->website->setSafeMode($input->getOption('safe'));
Please login to merge, or discard this patch.
src/allejo/stakx/FrontMatter/FrontMatterParser.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      *
62 62
      * @param array $rawFrontMatter
63 63
      */
64
-    public function __construct(&$rawFrontMatter)
64
+    public function __construct (&$rawFrontMatter)
65 65
     {
66 66
         $this->expansionUsed = false;
67 67
         $this->nestingLevel = 0;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      *
79 79
      * @return bool
80 80
      */
81
-    public function hasExpansion()
81
+    public function hasExpansion ()
82 82
     {
83 83
         return $this->expansionUsed;
84 84
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     /**
91 91
      * Special treatment for some FrontMatter variables.
92 92
      */
93
-    private function handleSpecialFrontMatter()
93
+    private function handleSpecialFrontMatter ()
94 94
     {
95 95
         $this->handleDateField();
96 96
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     /**
99 99
      * Special treatment for the `date` field in FrontMatter that creates three new variables: year, month, day.
100 100
      */
101
-    private function handleDateField()
101
+    private function handleDateField ()
102 102
     {
103 103
         if (!isset($this->frontMatter['date']))
104 104
         {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      *
127 127
      * @param array $yaml
128 128
      */
129
-    private function evaluateBlock(&$yaml)
129
+    private function evaluateBlock (&$yaml)
130 130
     {
131 131
         ++$this->nestingLevel;
132 132
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      *
166 166
      * @return array
167 167
      */
168
-    private function evaluateExpandableField($key, $fmStatement)
168
+    private function evaluateExpandableField ($key, $fmStatement)
169 169
     {
170 170
         if (!is_array($fmStatement))
171 171
         {
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      *
204 204
      * @return array
205 205
      */
206
-    private function evaluateArrayType($frontMatterKey, $expandableValue, $arrayVariableNames)
206
+    private function evaluateArrayType ($frontMatterKey, $expandableValue, $arrayVariableNames)
207 207
     {
208 208
         if (!is_array($expandableValue))
209 209
         {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      *
252 252
      * @return string The final string with variables evaluated
253 253
      */
254
-    private function evaluateBasicType($key, $string, $ignoreArrays = false)
254
+    private function evaluateBasicType ($key, $string, $ignoreArrays = false)
255 255
     {
256 256
         $variables = $this->getFrontMatterVariables($string);
257 257
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      *
287 287
      * @return string[]
288 288
      */
289
-    private function getFrontMatterVariables($string)
289
+    private function getFrontMatterVariables ($string)
290 290
     {
291 291
         $variables = array();
292 292
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
      *
308 308
      * @return mixed
309 309
      */
310
-    private function getVariableValue($key, $varName)
310
+    private function getVariableValue ($key, $varName)
311 311
     {
312 312
         if (!isset($this->frontMatter[$varName]))
313 313
         {
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
      *
327 327
      * @return bool|\DateTime
328 328
      */
329
-    private function castDateTimeTimezone($epochTime)
329
+    private function castDateTimeTimezone ($epochTime)
330 330
     {
331 331
         $timezone = new \DateTimeZone(date_default_timezone_get());
332 332
         $value = \DateTime::createFromFormat('U', $epochTime);
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
      *
341 341
      * @return bool|\DateTime
342 342
      */
343
-    private function guessDateTime($guess)
343
+    private function guessDateTime ($guess)
344 344
     {
345 345
         if ($guess instanceof \DateTime)
346 346
         {
Please login to merge, or discard this patch.
src/allejo/stakx/FrontMatter/ExpandedValue.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      *
38 38
      * @param string $string
39 39
      */
40
-    public function __construct($string)
40
+    public function __construct ($string)
41 41
     {
42 42
         $this->evaluated = $string;
43 43
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     /**
46 46
      * @return string
47 47
      */
48
-    public function __toString()
48
+    public function __toString ()
49 49
     {
50 50
         return $this->getEvaluated();
51 51
     }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      *
59 59
      * @return string
60 60
      */
61
-    public function getEvaluated()
61
+    public function getEvaluated ()
62 62
     {
63 63
         return $this->evaluated;
64 64
     }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @param string $string
73 73
      */
74
-    public function setEvaluated($string)
74
+    public function setEvaluated ($string)
75 75
     {
76 76
         $this->evaluated = $string;
77 77
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return string[]
83 83
      */
84
-    public function getIterators()
84
+    public function getIterators ()
85 85
     {
86 86
         return $this->iterators;
87 87
     }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @param string     $variableName
95 95
      * @param string|int $variableValue
96 96
      */
97
-    public function setIterator($variableName, $variableValue)
97
+    public function setIterator ($variableName, $variableValue)
98 98
     {
99 99
         $this->iterators[$variableName] = $variableValue;
100 100
     }
Please login to merge, or discard this patch.
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/Compiler.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     /** @var Twig_Environment */
43 43
     private $twig;
44 44
 
45
-    public function __construct()
45
+    public function __construct ()
46 46
     {
47 47
         parent::__construct();
48 48
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     /**
53 53
      * @param string|false $template
54 54
      */
55
-    public function setRedirectTemplate($template)
55
+    public function setRedirectTemplate ($template)
56 56
     {
57 57
         $this->redirectTemplate = $template;
58 58
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     /**
61 61
      * @param Folder $folder
62 62
      */
63
-    public function setTargetFolder(Folder $folder)
63
+    public function setTargetFolder (Folder $folder)
64 64
     {
65 65
         $this->folder = $folder;
66 66
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     /**
69 69
      * @param PageView[] $pageViews
70 70
      */
71
-    public function setPageViews(array $pageViews)
71
+    public function setPageViews (array $pageViews)
72 72
     {
73 73
         $this->pageViews = $pageViews;
74 74
     }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      *
83 83
      * @since 0.1.0
84 84
      */
85
-    public function compileAll()
85
+    public function compileAll ()
86 86
     {
87 87
         foreach ($this->pageViews as &$pageView)
88 88
         {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      *
101 101
      * @since 0.1.1
102 102
      */
103
-    private function compilePageView(&$pageView)
103
+    private function compilePageView (&$pageView)
104 104
     {
105 105
         switch ($pageView->getType())
106 106
         {
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      *
129 129
      * @since 0.1.1
130 130
      */
131
-    private function compileStaticPageView(&$pageView)
131
+    private function compileStaticPageView (&$pageView)
132 132
     {
133 133
         $targetFile = $pageView->getTargetFile();
134 134
         $output = $this->renderStaticPageView($pageView);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      *
145 145
      * @since 0.1.1
146 146
      */
147
-    private function compileDynamicPageViews(&$pageView)
147
+    private function compileDynamicPageViews (&$pageView)
148 148
     {
149 149
         $contentItems = $pageView->getContentItems();
150 150
         $template = $this->createTwigTemplate($pageView);
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      *
167 167
      * @since 0.1.1
168 168
      */
169
-    private function compileRepeaterPageViews(&$pageView)
169
+    private function compileRepeaterPageViews (&$pageView)
170 170
     {
171 171
         $pageView->rewindPermalink();
172 172
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      *
196 196
      * @since 0.1.1
197 197
      */
198
-    private function compileStandardRedirects(&$pageView)
198
+    private function compileStandardRedirects (&$pageView)
199 199
     {
200 200
         $redirects = $pageView->getRedirects();
201 201
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      *
219 219
      * @since 0.1.1
220 220
      */
221
-    private function compileExpandedRedirects(&$pageView)
221
+    private function compileExpandedRedirects (&$pageView)
222 222
     {
223 223
         $permalinks = $pageView->getRepeaterPermalinks();
224 224
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      *
257 257
      * @return string
258 258
      */
259
-    private function renderRepeaterPageView(&$template, &$pageView, &$expandedValue)
259
+    private function renderRepeaterPageView (&$template, &$pageView, &$expandedValue)
260 260
     {
261 261
         $this->twig->addGlobal('__currentTemplate', $pageView->getFilePath());
262 262
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      *
283 283
      * @return string
284 284
      */
285
-    private function renderDynamicPageView(&$template, &$pageView, &$contentItem)
285
+    private function renderDynamicPageView (&$template, &$pageView, &$contentItem)
286 286
     {
287 287
         $this->twig->addGlobal('__currentTemplate', $pageView->getFilePath());
288 288
 
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
      *
306 306
      * @return string
307 307
      */
308
-    private function renderStaticPageView(&$pageView)
308
+    private function renderStaticPageView (&$pageView)
309 309
     {
310 310
         $this->twig->addGlobal('__currentTemplate', $pageView->getFilePath());
311 311
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      *
330 330
      * @return Twig_Template
331 331
      */
332
-    private function createTwigTemplate(&$pageView)
332
+    private function createTwigTemplate (&$pageView)
333 333
     {
334 334
         try
335 335
         {
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.