@@ -36,7 +36,7 @@ discard block |
||
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,7 +50,7 @@ discard block |
||
50 | 50 | // Utility Functions |
51 | 51 | // |
52 | 52 | |
53 | - protected function bookCollectionProvider($jailed = false) |
|
53 | + protected function bookCollectionProvider ($jailed = false) |
|
54 | 54 | { |
55 | 55 | $cm = new CollectionManager(); |
56 | 56 | $cm->setLogger($this->getMockLogger()); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * |
72 | 72 | * @return mixed |
73 | 73 | */ |
74 | - protected function createVirtualFile($classType, $frontMatter = array(), $body = 'Body Text') |
|
74 | + protected function createVirtualFile ($classType, $frontMatter = array(), $body = 'Body Text') |
|
75 | 75 | { |
76 | 76 | $this->dummyFile |
77 | 77 | ->setContent($this->generateFM($frontMatter, $body)) |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | return new $classType($this->dummyFile->url()); |
81 | 81 | } |
82 | 82 | |
83 | - protected function createMultipleVirtualFiles($classType, $elements) |
|
83 | + protected function createMultipleVirtualFiles ($classType, $elements) |
|
84 | 84 | { |
85 | 85 | $results = array(); |
86 | 86 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * |
106 | 106 | * @return LoggerInterface |
107 | 107 | */ |
108 | - protected function getMockLogger() |
|
108 | + protected function getMockLogger () |
|
109 | 109 | { |
110 | 110 | return $this->getMock(LoggerInterface::class); |
111 | 111 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * |
116 | 116 | * @return StakxLogger |
117 | 117 | */ |
118 | - protected function getReadableLogger() |
|
118 | + protected function getReadableLogger () |
|
119 | 119 | { |
120 | 120 | stream_filter_register('intercept', StreamInterceptor::class); |
121 | 121 | $stakxLogger = new StakxLogger(new ConsoleOutput()); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * |
133 | 133 | * @return string |
134 | 134 | */ |
135 | - protected function generateFM(array $frontMatter = array(), $body = 'Body text') |
|
135 | + protected function generateFM (array $frontMatter = array(), $body = 'Body text') |
|
136 | 136 | { |
137 | 137 | $fm = (empty($frontMatter)) ? '' : Yaml::dump($frontMatter, 2); |
138 | 138 |
@@ -84,7 +84,8 @@ |
||
84 | 84 | { |
85 | 85 | $results = array(); |
86 | 86 | |
87 | - foreach ($elements as $element) { |
|
87 | + foreach ($elements as $element) |
|
88 | + { |
|
88 | 89 | $filename = (isset($element['filename'])) ? $element['filename'] : hash('sha256', uniqid(mt_rand(), true), false); |
89 | 90 | $frontMatter = (empty($element['frontmatter'])) ? '' : Yaml::dump($element['frontmatter'], 2); |
90 | 91 | $body = (isset($element['body'])) ? $element['body'] : 'Body Text'; |