Completed
Pull Request — master (#41)
by Vladimir
02:31
created
src/allejo/stakx/Object/FrontMatterable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      *
15 15
      * @param array|null $variables An array of YAML variables to use in evaluating the `$permalink` value
16 16
      */
17
-    public function evaluateFrontMatter($variables = null);
17
+    public function evaluateFrontMatter ($variables = null);
18 18
 
19 19
     /**
20 20
      * Get the Front Matter of a ContentItem as an array.
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @return array
25 25
      */
26
-    public function getFrontMatter($evaluateYaml = true);
26
+    public function getFrontMatter ($evaluateYaml = true);
27 27
 
28 28
     /**
29 29
      * Returns true when the evaluated Front Matter has expanded values embeded.
30 30
      *
31 31
      * @return bool
32 32
      */
33
-    public function hasExpandedFrontMatter();
33
+    public function hasExpandedFrontMatter ();
34 34
 
35 35
     /**
36 36
      * Append a custom FrontMatter value.
37 37
      *
38 38
      * @param array $frontMatter
39 39
      */
40
-    public function appendFrontMatter(array $frontMatter);
40
+    public function appendFrontMatter (array $frontMatter);
41 41
 
42 42
     /**
43 43
      * Delete a custom FrontMatter value.
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      *
47 47
      * @param string $key
48 48
      */
49
-    public function deleteFrontMatter($key);
49
+    public function deleteFrontMatter ($key);
50 50
 
51 51
     /**
52 52
      * Set custom FrontMatter values.
@@ -56,5 +56,5 @@  discard block
 block discarded – undo
56 56
      *
57 57
      * @param array $frontMatter
58 58
      */
59
-    public function setFrontMatter(array $frontMatter);
59
+    public function setFrontMatter (array $frontMatter);
60 60
 }
Please login to merge, or discard this patch.
src/allejo/stakx/Object/Configuration.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     /**
47 47
      * Configuration constructor.
48 48
      */
49
-    public function __construct()
49
+    public function __construct ()
50 50
     {
51 51
         $this->configuration = array();
52 52
         $this->fs = new Filesystem();
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @param string|null $configFile The path to the configuration file. If null, the default configuration will be
61 61
      *                                used
62 62
      */
63
-    public function parseConfiguration($configFile = null)
63
+    public function parseConfiguration ($configFile = null)
64 64
     {
65 65
         if ($this->fs->exists($configFile))
66 66
         {
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
     /**
85 85
      * {@inheritdoc}
86 86
      */
87
-    public function setLogger(LoggerInterface $logger)
87
+    public function setLogger (LoggerInterface $logger)
88 88
     {
89 89
         $this->output = $logger;
90 90
     }
91 91
 
92
-    public function isDebug()
92
+    public function isDebug ()
93 93
     {
94 94
         return $this->returnConfigOption('debug', false);
95 95
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      *
100 100
      * @return mixed|null
101 101
      */
102
-    public function getBaseUrl()
102
+    public function getBaseUrl ()
103 103
     {
104 104
         $base = $this->returnConfigOption('base');
105 105
         $baseUrl = $this->returnConfigOption('baseurl');
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     /**
116 116
      * @return string[]
117 117
      */
118
-    public function getDataFolders()
118
+    public function getDataFolders ()
119 119
     {
120 120
         return $this->returnConfigOption('data');
121 121
     }
@@ -123,52 +123,52 @@  discard block
 block discarded – undo
123 123
     /**
124 124
      * @return string[]
125 125
      */
126
-    public function getDataSets()
126
+    public function getDataSets ()
127 127
     {
128 128
         return $this->returnConfigOption('datasets');
129 129
     }
130 130
 
131
-    public function getIncludes()
131
+    public function getIncludes ()
132 132
     {
133 133
         return $this->returnConfigOption('include', array());
134 134
     }
135 135
 
136
-    public function getExcludes()
136
+    public function getExcludes ()
137 137
     {
138 138
         return $this->returnConfigOption('exclude', array());
139 139
     }
140 140
 
141
-    public function getTheme()
141
+    public function getTheme ()
142 142
     {
143 143
         return $this->returnConfigOption('theme');
144 144
     }
145 145
 
146
-    public function getConfiguration()
146
+    public function getConfiguration ()
147 147
     {
148 148
         return $this->configuration;
149 149
     }
150 150
 
151
-    public function getPageViewFolders()
151
+    public function getPageViewFolders ()
152 152
     {
153 153
         return $this->returnConfigOption('pageviews');
154 154
     }
155 155
 
156
-    public function getTargetFolder()
156
+    public function getTargetFolder ()
157 157
     {
158 158
         return $this->returnConfigOption('target');
159 159
     }
160 160
 
161
-    public function getCollectionsFolders()
161
+    public function getCollectionsFolders ()
162 162
     {
163 163
         return $this->returnConfigOption('collections');
164 164
     }
165 165
 
166
-    public function getTwigAutoescape()
166
+    public function getTwigAutoescape ()
167 167
     {
168 168
         return $this->configuration['twig']['autoescape'];
169 169
     }
170 170
 
171
-    public function getRedirectTemplate()
171
+    public function getRedirectTemplate ()
172 172
     {
173 173
         return $this->configuration['templates']['redirect'];
174 174
     }
@@ -181,12 +181,12 @@  discard block
 block discarded – undo
181 181
      *
182 182
      * @return mixed|null
183 183
      */
184
-    private function returnConfigOption($name, $default = null)
184
+    private function returnConfigOption ($name, $default = null)
185 185
     {
186 186
         return isset($this->configuration[$name]) ? $this->configuration[$name] : $default;
187 187
     }
188 188
 
189
-    private function defaultConfiguration()
189
+    private function defaultConfiguration ()
190 190
     {
191 191
         $defaultConfig = array(
192 192
             'baseurl'   => '',
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         $this->configuration = ArrayUtilities::array_merge_defaults($defaultConfig, $this->configuration, 'name');
211 211
     }
212 212
 
213
-    private function handleDeprecations()
213
+    private function handleDeprecations ()
214 214
     {
215 215
         // @TODO 1.0.0 handle 'base' deprecation in _config.yml
216 216
         $base = $this->returnConfigOption('base');
Please login to merge, or discard this patch.
src/allejo/stakx/Object/RepeaterPageView.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * {@inheritdoc}
37 37
      */
38
-    public function __construct($filePath)
38
+    public function __construct ($filePath)
39 39
     {
40 40
         parent::__construct($filePath);
41 41
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      *
50 50
      * @return ExpandedValue[]
51 51
      */
52
-    public function getRepeaterPermalinks()
52
+    public function getRepeaterPermalinks ()
53 53
     {
54 54
         return $this->permalinks;
55 55
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      *
60 60
      * @return ExpandedValue[][]
61 61
      */
62
-    public function getRepeaterRedirects()
62
+    public function getRepeaterRedirects ()
63 63
     {
64 64
         return $this->redirectLinks;
65 65
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * When looping through permalinks in a RepeaterPageView, the permalink needs to be updated each time so that it may
69 69
      * behave as a static PageView.
70 70
      */
71
-    public function bumpPermalink()
71
+    public function bumpPermalink ()
72 72
     {
73 73
         $this->permalink = $this->permalinksIterator->current()->getEvaluated();
74 74
         $this->permalinksIterator->next();
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     /**
78 78
      * Rewind the permalink iterator to the beginning.
79 79
      */
80
-    public function rewindPermalink()
80
+    public function rewindPermalink ()
81 81
     {
82 82
         $this->permalinksIterator->rewind();
83 83
     }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     /**
86 86
      * Setup this object.
87 87
      */
88
-    private function configureValues()
88
+    private function configureValues ()
89 89
     {
90 90
         // Cause the Front Matter to be evaluated
91 91
         $this->getFrontMatter();
Please login to merge, or discard this patch.
src/allejo/stakx/Object/JailObject.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * @param array    $whiteListFunctions A list of function names that can be called
38 38
      * @param array    $jailedFunctions
39 39
      */
40
-    public function __construct(&$object, array $whiteListFunctions, array $jailedFunctions = array())
40
+    public function __construct (&$object, array $whiteListFunctions, array $jailedFunctions = array())
41 41
     {
42 42
         if (!($object instanceof Jailable) && !($object instanceof \ArrayAccess))
43 43
         {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->jailedFunctions = $jailedFunctions;
50 50
     }
51 51
 
52
-    public function __call($name, $arguments)
52
+    public function __call ($name, $arguments)
53 53
     {
54 54
         // White listed functions will always be getter functions, so somehow get the name of a possible getter function
55 55
         // name.
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         throw new \BadMethodCallException();
73 73
     }
74 74
 
75
-    public function coreInstanceOf($class)
75
+    public function coreInstanceOf ($class)
76 76
     {
77 77
         return is_subclass_of($this->object, $class);
78 78
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     /**
85 85
      * {@inheritdoc}
86 86
      */
87
-    public function offsetExists($offset)
87
+    public function offsetExists ($offset)
88 88
     {
89 89
         return $this->object->offsetExists($offset);
90 90
     }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     /**
93 93
      * {@inheritdoc}
94 94
      */
95
-    public function offsetGet($offset)
95
+    public function offsetGet ($offset)
96 96
     {
97 97
         return $this->object->offsetGet($offset);
98 98
     }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     /**
101 101
      * {@inheritdoc}
102 102
      */
103
-    public function offsetSet($offset, $value)
103
+    public function offsetSet ($offset, $value)
104 104
     {
105 105
         return $this->object->offsetSet($offset, $value);
106 106
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     /**
109 109
      * {@inheritdoc}
110 110
      */
111
-    public function offsetUnset($offset)
111
+    public function offsetUnset ($offset)
112 112
     {
113 113
         return $this->object->offsetUnset($offset);
114 114
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Object/Jailable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
      *
20 20
      * @return JailObject
21 21
      */
22
-    public function createJail();
22
+    public function createJail ();
23 23
 }
Please login to merge, or discard this patch.
src/allejo/stakx/Object/DynamicPageView.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     /**
20 20
      * {@inheritdoc}
21 21
      */
22
-    public function __construct($filePath)
22
+    public function __construct ($filePath)
23 23
     {
24 24
         parent::__construct($filePath);
25 25
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      *
33 33
      * @param ContentItem $contentItem
34 34
      */
35
-    public function addContentItem(&$contentItem)
35
+    public function addContentItem (&$contentItem)
36 36
     {
37 37
         $filename = $this->fs->getBaseName($contentItem->getFilePath());
38 38
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      *
46 46
      * @return ContentItem[]
47 47
      */
48
-    public function getContentItems()
48
+    public function getContentItems ()
49 49
     {
50 50
         return $this->contentItems;
51 51
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @return string
57 57
      */
58
-    public function getCollection()
58
+    public function getCollection ()
59 59
     {
60 60
         return $this->getFrontMatter(false)['collection'];
61 61
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Object/Website.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      *
110 110
      * @param OutputInterface $output
111 111
      */
112
-    public function __construct(OutputInterface $output)
112
+    public function __construct (OutputInterface $output)
113 113
     {
114 114
         $this->output = new StakxLogger($output);
115 115
         $this->cm = new CollectionManager();
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      *
125 125
      * @param bool $tracking Whether or not to keep track of files as they're compiled to save time in 'watch'
126 126
      */
127
-    public function build($tracking = false)
127
+    public function build ($tracking = false)
128 128
     {
129 129
         // Configure the environment
130 130
         $this->createFolderStructure(!$this->noClean);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         $this->am->copyFiles();
211 211
     }
212 212
 
213
-    public function watch()
213
+    public function watch ()
214 214
     {
215 215
         $this->output->writeln('Building website...');
216 216
         $this->build(true);
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
     /**
262 262
      * @return Configuration
263 263
      */
264
-    public function getConfiguration()
264
+    public function getConfiguration ()
265 265
     {
266 266
         return $this->configuration;
267 267
     }
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
      *
272 272
      * @throws \LogicException
273 273
      */
274
-    public function setConfiguration($configFile)
274
+    public function setConfiguration ($configFile)
275 275
     {
276 276
         if (!$this->fs->exists($configFile) && !$this->isConfLess())
277 277
         {
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
      *
297 297
      * @return bool True when being built with no configuration file
298 298
      */
299
-    public function isConfLess()
299
+    public function isConfLess ()
300 300
     {
301 301
         return $this->confLess;
302 302
     }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      *
307 307
      * @param bool $status True when a website should be built without a configuration
308 308
      */
309
-    public function setConfLess($status)
309
+    public function setConfLess ($status)
310 310
     {
311 311
         $this->confLess = $status;
312 312
     }
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
      *
319 319
      * @return bool True when the website is being built in safe mode
320 320
      */
321
-    public function isSafeMode()
321
+    public function isSafeMode ()
322 322
     {
323 323
         return $this->safeMode;
324 324
     }
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
      *
329 329
      * @param bool $bool True if a website should be built in safe mode
330 330
      */
331
-    public function setSafeMode($bool)
331
+    public function setSafeMode ($bool)
332 332
     {
333 333
         $this->safeMode = $bool;
334 334
     }
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
     /**
337 337
      * @return bool
338 338
      */
339
-    public function isNoClean()
339
+    public function isNoClean ()
340 340
     {
341 341
         return $this->noClean;
342 342
     }
@@ -344,12 +344,12 @@  discard block
 block discarded – undo
344 344
     /**
345 345
      * @param bool $noClean
346 346
      */
347
-    public function setNoClean($noClean)
347
+    public function setNoClean ($noClean)
348 348
     {
349 349
         $this->noClean = $noClean;
350 350
     }
351 351
 
352
-    private function creationWatcher($filePath)
352
+    private function creationWatcher ($filePath)
353 353
     {
354 354
         $this->output->writeln(sprintf('File creation detected: %s', $filePath));
355 355
 
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
         }
391 391
     }
392 392
 
393
-    private function modificationWatcher($filePath)
393
+    private function modificationWatcher ($filePath)
394 394
     {
395 395
         $this->output->writeln(sprintf('File change detected: %s', $filePath));
396 396
 
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
      *
435 435
      * @param bool $cleanDirectory Clean the target directory
436 436
      */
437
-    private function createFolderStructure($cleanDirectory)
437
+    private function createFolderStructure ($cleanDirectory)
438 438
     {
439 439
         $tarDir = $this->fs->absolutePath($this->configuration->getTargetFolder());
440 440
 
Please login to merge, or discard this patch.
tests/allejo/stakx/Test/StreamInterceptor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 {
17 17
     public static $output = '';
18 18
 
19
-    public function filter($in, $out, &$consumed, $closing)
19
+    public function filter ($in, $out, &$consumed, $closing)
20 20
     {
21 21
         while ($bucket = stream_bucket_make_writeable($in)) {
22 22
             self::$output .= $bucket->data;
Please login to merge, or discard this patch.
src/allejo/stakx/Object/PageView.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     /**
51 51
      * {@inheritdoc}
52 52
      */
53
-    public function __construct($filePath)
53
+    public function __construct ($filePath)
54 54
     {
55 55
         parent::__construct($filePath);
56 56
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     /**
66 66
      * {@inheritdoc}
67 67
      */
68
-    public function createJail()
68
+    public function createJail ()
69 69
     {
70 70
         if (is_null($this->jailInstance))
71 71
         {
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         return $this->jailInstance;
78 78
     }
79 79
 
80
-    public function getJailedChildren()
80
+    public function getJailedChildren ()
81 81
     {
82 82
         $children = $this->children;
83 83
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     /**
110 110
      * @return string Twig body
111 111
      */
112
-    public function getContent()
112
+    public function getContent ()
113 113
     {
114 114
         return $this->bodyContent;
115 115
     }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      *
120 120
      * @return string
121 121
      */
122
-    public function getType()
122
+    public function getType ()
123 123
     {
124 124
         return $this->type;
125 125
     }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      *
132 132
      * @todo       Remove this in the next major release
133 133
      */
134
-    public function getUrl()
134
+    public function getUrl ()
135 135
     {
136 136
         return $this->getPermalink();
137 137
     }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      *
148 148
      * @return DynamicPageView|PageView|RepeaterPageView
149 149
      */
150
-    public static function create($filePath)
150
+    public static function create ($filePath)
151 151
     {
152 152
         $instance = new self($filePath);
153 153
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      *
179 179
      * @return PageView
180 180
      */
181
-    public static function createVirtual($frontMatter, $body)
181
+    public static function createVirtual ($frontMatter, $body)
182 182
     {
183 183
         if (vfsStreamWrapper::getRoot() == null)
184 184
         {
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      *
205 205
      * @return PageView A virtual PageView with the redirection template
206 206
      */
207
-    public static function createRedirect($redirectFrom, $redirectTo, $redirectTemplate = false)
207
+    public static function createRedirect ($redirectFrom, $redirectTo, $redirectTemplate = false)
208 208
     {
209 209
         if (is_null(self::$fileSys))
210 210
         {
Please login to merge, or discard this patch.