Completed
Pull Request — master (#41)
by Vladimir
02:31
created
tests/allejo/stakx/Test/PHPUnit_Stakx_TestCase.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     protected $fs;
38 38
 
39
-    public function setUp()
39
+    public function setUp ()
40 40
     {
41 41
         $this->dummyFile = vfsStream::newFile('stakx.html.twig');
42 42
         $this->rootDir = vfsStream::setup();
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
     // Assertion functions
51 51
     ///
52 52
 
53
-    protected function assertStringContains($needle, $haystack, $message = '')
53
+    protected function assertStringContains ($needle, $haystack, $message = '')
54 54
     {
55 55
         $this->assertNotFalse(strpos($haystack, $needle), $message);
56 56
     }
57 57
 
58
-    protected function assertFileContains($fileContent, $filePath, $message = '')
58
+    protected function assertFileContains ($fileContent, $filePath, $message = '')
59 59
     {
60 60
         (substr($filePath, -1, 1) == '/') && $filePath .= 'index.html';
61 61
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     // Utility Functions
69 69
     //
70 70
 
71
-    protected function bookCollectionProvider($jailed = false)
71
+    protected function bookCollectionProvider ($jailed = false)
72 72
     {
73 73
         $cm = new CollectionManager();
74 74
         $cm->setLogger($this->getMockLogger());
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      *
90 90
      * @return mixed
91 91
      */
92
-    protected function createVirtualFile($classType, $frontMatter = array(), $body = 'Body Text')
92
+    protected function createVirtualFile ($classType, $frontMatter = array(), $body = 'Body Text')
93 93
     {
94 94
         $this->dummyFile
95 95
             ->setContent($this->generateFM($frontMatter, $body))
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         return new $classType($this->dummyFile->url());
99 99
     }
100 100
 
101
-    protected function createMultipleVirtualFiles($classType, $elements)
101
+    protected function createMultipleVirtualFiles ($classType, $elements)
102 102
     {
103 103
         $results = array();
104 104
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      *
124 124
      * @return LoggerInterface
125 125
      */
126
-    protected function getMockLogger()
126
+    protected function getMockLogger ()
127 127
     {
128 128
         return $this->getMock(LoggerInterface::class);
129 129
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      *
134 134
      * @return StakxLogger
135 135
      */
136
-    protected function getReadableLogger()
136
+    protected function getReadableLogger ()
137 137
     {
138 138
         stream_filter_register('intercept', StreamInterceptor::class);
139 139
         $stakxLogger = new StakxLogger(new ConsoleOutput());
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      *
151 151
      * @return string
152 152
      */
153
-    protected function generateFM(array $frontMatter = array(), $body = 'Body text')
153
+    protected function generateFM (array $frontMatter = array(), $body = 'Body text')
154 154
     {
155 155
         $fm = (empty($frontMatter)) ? '' : Yaml::dump($frontMatter, 2);
156 156
 
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
         $pageViews = array(PageView::REPEATER_TYPE, PageView::DYNAMIC_TYPE, PageView::STATIC_TYPE);
88 88
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      *
106 106
      * @since 0.1.1
107 107
      */
108
-    private function compilePageView(&$pageView)
108
+    private function compilePageView (&$pageView)
109 109
     {
110 110
         switch ($pageView->getType())
111 111
         {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      *
134 134
      * @since 0.1.1
135 135
      */
136
-    private function compileStaticPageView(&$pageView)
136
+    private function compileStaticPageView (&$pageView)
137 137
     {
138 138
         $targetFile = $pageView->getTargetFile();
139 139
         $output = $this->renderStaticPageView($pageView);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      *
150 150
      * @since 0.1.1
151 151
      */
152
-    private function compileDynamicPageViews(&$pageView)
152
+    private function compileDynamicPageViews (&$pageView)
153 153
     {
154 154
         $contentItems = $pageView->getContentItems();
155 155
         $template = $this->createTwigTemplate($pageView);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      *
172 172
      * @since 0.1.1
173 173
      */
174
-    private function compileRepeaterPageViews(&$pageView)
174
+    private function compileRepeaterPageViews (&$pageView)
175 175
     {
176 176
         $pageView->rewindPermalink();
177 177
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      *
201 201
      * @since 0.1.1
202 202
      */
203
-    private function compileStandardRedirects(&$pageView)
203
+    private function compileStandardRedirects (&$pageView)
204 204
     {
205 205
         $redirects = $pageView->getRedirects();
206 206
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      *
224 224
      * @since 0.1.1
225 225
      */
226
-    private function compileExpandedRedirects(&$pageView)
226
+    private function compileExpandedRedirects (&$pageView)
227 227
     {
228 228
         $permalinks = $pageView->getRepeaterPermalinks();
229 229
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      *
262 262
      * @return string
263 263
      */
264
-    private function renderRepeaterPageView(&$template, &$pageView, &$expandedValue)
264
+    private function renderRepeaterPageView (&$template, &$pageView, &$expandedValue)
265 265
     {
266 266
         $this->twig->addGlobal('__currentTemplate', $pageView->getFilePath());
267 267
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
      *
288 288
      * @return string
289 289
      */
290
-    private function renderDynamicPageView(&$template, &$pageView, &$contentItem)
290
+    private function renderDynamicPageView (&$template, &$pageView, &$contentItem)
291 291
     {
292 292
         $this->twig->addGlobal('__currentTemplate', $pageView->getFilePath());
293 293
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
      *
311 311
      * @return string
312 312
      */
313
-    private function renderStaticPageView(&$pageView)
313
+    private function renderStaticPageView (&$pageView)
314 314
     {
315 315
         $this->twig->addGlobal('__currentTemplate', $pageView->getFilePath());
316 316
 
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      *
335 335
      * @return Twig_Template
336 336
      */
337
-    private function createTwigTemplate(&$pageView)
337
+    private function createTwigTemplate (&$pageView)
338 338
     {
339 339
         try
340 340
         {
Please login to merge, or discard this patch.