@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | { |
9 | 9 | protected $engine; |
10 | 10 | |
11 | - public function __construct($instanceName = null) |
|
11 | + public function __construct ($instanceName = null) |
|
12 | 12 | { |
13 | 13 | $this->engine = MarkdownEngine::instance($instanceName); |
14 | 14 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * {@inheritdoc} |
18 | 18 | */ |
19 | - public function transform($content) |
|
19 | + public function transform ($content) |
|
20 | 20 | { |
21 | 21 | return $this->engine->parse($content); |
22 | 22 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * {@inheritdoc} |
26 | 26 | */ |
27 | - public function getName() |
|
27 | + public function getName () |
|
28 | 28 | { |
29 | 29 | return 'stakx/parsedown'; |
30 | 30 | } |
@@ -14,14 +14,14 @@ discard block |
||
14 | 14 | { |
15 | 15 | protected $highlighter; |
16 | 16 | |
17 | - public function __construct() |
|
17 | + public function __construct () |
|
18 | 18 | { |
19 | 19 | parent::__construct(); |
20 | 20 | |
21 | 21 | $this->highlighter = new Highlighter(); |
22 | 22 | } |
23 | 23 | |
24 | - protected function blockHeader($line) |
|
24 | + protected function blockHeader ($line) |
|
25 | 25 | { |
26 | 26 | $Block = parent::blockHeader($line); |
27 | 27 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | return $Block; |
37 | 37 | } |
38 | 38 | |
39 | - public function blockFencedCodeComplete($block) |
|
39 | + public function blockFencedCodeComplete ($block) |
|
40 | 40 | { |
41 | 41 | // The class has a `language-` prefix, remove this to get the language |
42 | 42 | if (isset($block['element']['text']['attributes'])) |
@@ -32,7 +32,7 @@ |
||
32 | 32 | * @param Configuration $configuration |
33 | 33 | * @param mixed $options |
34 | 34 | */ |
35 | - public function configureTwig($configuration, $options = array()) |
|
35 | + public function configureTwig ($configuration, $options = array()) |
|
36 | 36 | { |
37 | 37 | $loader = new Twig_Loader_Filesystem(array( |
38 | 38 | getcwd(), |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | protected $includes; |
34 | 34 | |
35 | - public function configureFinder($includes = array(), $excludes = array()) |
|
35 | + public function configureFinder ($includes = array(), $excludes = array()) |
|
36 | 36 | { |
37 | 37 | $this->excludes = $excludes; |
38 | 38 | $this->includes = $includes; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * |
44 | 44 | * @param Folder $directory |
45 | 45 | */ |
46 | - public function setFolder($directory) |
|
46 | + public function setFolder ($directory) |
|
47 | 47 | { |
48 | 48 | $this->outputDirectory = $directory; |
49 | 49 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * Copy all of the assets. |
53 | 53 | */ |
54 | - public function copyFiles() |
|
54 | + public function copyFiles () |
|
55 | 55 | { |
56 | 56 | $this->scanTrackableItems( |
57 | 57 | getcwd(), |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | /** |
70 | 70 | * {@inheritdoc} |
71 | 71 | */ |
72 | - public function isHandled($filePath) |
|
72 | + public function isHandled ($filePath) |
|
73 | 73 | { |
74 | 74 | return $this->fileExplorer->matchesPattern($filePath); |
75 | 75 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | /** |
78 | 78 | * {@inheritdoc} |
79 | 79 | */ |
80 | - public function createNewItem($filePath) |
|
80 | + public function createNewItem ($filePath) |
|
81 | 81 | { |
82 | 82 | return $this->handleTrackableItem($filePath, array( |
83 | 83 | 'prefix' => '', |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | /** |
88 | 88 | * {@inheritdoc} |
89 | 89 | */ |
90 | - protected function handleTrackableItem($file, $options = array()) |
|
90 | + protected function handleTrackableItem ($file, $options = array()) |
|
91 | 91 | { |
92 | 92 | if (is_string($file)) |
93 | 93 | { |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | /** @var PageView */ |
16 | 16 | private $siteMenu; |
17 | 17 | |
18 | - public function __construct() |
|
18 | + public function __construct () |
|
19 | 19 | { |
20 | 20 | parent::__construct(); |
21 | 21 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * |
28 | 28 | * @return JailObject[] |
29 | 29 | */ |
30 | - public function getSiteMenu() |
|
30 | + public function getSiteMenu () |
|
31 | 31 | { |
32 | 32 | $jailedMenu = array(); |
33 | 33 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | /** |
49 | 49 | * @param PageView[] $pageViews |
50 | 50 | */ |
51 | - public function buildFromPageViews($pageViews) |
|
51 | + public function buildFromPageViews ($pageViews) |
|
52 | 52 | { |
53 | 53 | foreach ($pageViews as &$pageView) |
54 | 54 | { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | /** |
60 | 60 | * @param PageView $pageView |
61 | 61 | */ |
62 | - public function addToSiteMenu(&$pageView) |
|
62 | + public function addToSiteMenu (&$pageView) |
|
63 | 63 | { |
64 | 64 | $frontMatter = $pageView->getFrontMatter(); |
65 | 65 |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | protected $tracking; |
80 | 80 | |
81 | - public function __construct() |
|
81 | + public function __construct () |
|
82 | 82 | { |
83 | 83 | parent::__construct(); |
84 | 84 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * |
98 | 98 | * @param bool $enabled |
99 | 99 | */ |
100 | - public function enableTracking($enabled) |
|
100 | + public function enableTracking ($enabled) |
|
101 | 101 | { |
102 | 102 | $this->tracking = $enabled; |
103 | 103 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * |
110 | 110 | * @return bool True if the file is inside a tracked folder |
111 | 111 | */ |
112 | - public function isHandled($filePath) |
|
112 | + public function isHandled ($filePath) |
|
113 | 113 | { |
114 | 114 | foreach ($this->folderDefinitions as $folder) |
115 | 115 | { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @return bool |
131 | 131 | */ |
132 | - public function isTracked($filePath) |
|
132 | + public function isTracked ($filePath) |
|
133 | 133 | { |
134 | 134 | return array_key_exists($filePath, $this->trackedItemsFlattened); |
135 | 135 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | * |
140 | 140 | * @return mixed|null |
141 | 141 | */ |
142 | - public function createNewItem($filePath) |
|
142 | + public function createNewItem ($filePath) |
|
143 | 143 | { |
144 | 144 | return $this->handleTrackableItem($filePath); |
145 | 145 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * |
152 | 152 | * @return mixed|null |
153 | 153 | */ |
154 | - public function refreshItem($filePath) |
|
154 | + public function refreshItem ($filePath) |
|
155 | 155 | { |
156 | 156 | return $this->handleTrackableItem( |
157 | 157 | $filePath, |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * @param string $filePath The relative file path from the root of the website |
168 | 168 | * @param string|null $namespace The name of the collection this data belongs to, if any |
169 | 169 | */ |
170 | - protected function addArrayToTracker($key, $data, $filePath, $namespace = null) |
|
170 | + protected function addArrayToTracker ($key, $data, $filePath, $namespace = null) |
|
171 | 171 | { |
172 | 172 | if (is_null($namespace)) |
173 | 173 | { |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | * @param string $key |
189 | 189 | * @param string|null $namespace |
190 | 190 | */ |
191 | - protected function addObjectToTracker($trackedItem, $key, $namespace = null) |
|
191 | + protected function addObjectToTracker ($trackedItem, $key, $namespace = null) |
|
192 | 192 | { |
193 | 193 | if (!($trackedItem instanceof FrontMatterObject)) |
194 | 194 | { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | * @param string $filePath |
206 | 206 | * @param string|null $namespace |
207 | 207 | */ |
208 | - protected function delArrayFromTracker($key, $filePath, $namespace = null) |
|
208 | + protected function delArrayFromTracker ($key, $filePath, $namespace = null) |
|
209 | 209 | { |
210 | 210 | if (is_null($namespace)) |
211 | 211 | { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | * @param mixed $trackedItem |
226 | 226 | * @param string|null $namespace |
227 | 227 | */ |
228 | - protected function delObjectFromTracker($trackedItem, $namespace = null) |
|
228 | + protected function delObjectFromTracker ($trackedItem, $namespace = null) |
|
229 | 229 | { |
230 | 230 | $this->delArrayFromTracker( |
231 | 231 | $trackedItem->getFileName(), |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | * @param string $folderPath |
241 | 241 | * @param array $options |
242 | 242 | */ |
243 | - protected function saveFolderDefinition($folderPath, $options = array()) |
|
243 | + protected function saveFolderDefinition ($folderPath, $options = array()) |
|
244 | 244 | { |
245 | 245 | $this->folderDefinitions[] = $folderPath; |
246 | 246 | $this->folderDefinitionsOptions[$folderPath] = $options; |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | * @param string $filePath |
253 | 253 | * @param array $options |
254 | 254 | */ |
255 | - protected function saveTrackerOptions($filePath, $options = array()) |
|
255 | + protected function saveTrackerOptions ($filePath, $options = array()) |
|
256 | 256 | { |
257 | 257 | $this->trackedItemsOptions[$filePath] = $options; |
258 | 258 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | * @param array $includes |
266 | 266 | * @param array $excludes |
267 | 267 | */ |
268 | - protected function scanTrackableItems($path, $options = array(), $includes = array(), $excludes = array()) |
|
268 | + protected function scanTrackableItems ($path, $options = array(), $includes = array(), $excludes = array()) |
|
269 | 269 | { |
270 | 270 | $fileExplorerFlags = array_key_exists('fileExplorer', $options) ? $options['fileExplorer'] : null; |
271 | 271 | $this->fileExplorer = FileExplorer::create($path, $excludes, $includes, $fileExplorerFlags); |
@@ -291,5 +291,5 @@ discard block |
||
291 | 291 | * |
292 | 292 | * @return mixed|null |
293 | 293 | */ |
294 | - abstract protected function handleTrackableItem($filePath, $options = array()); |
|
294 | + abstract protected function handleTrackableItem ($filePath, $options = array()); |
|
295 | 295 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | /** |
42 | 42 | * PageManager constructor. |
43 | 43 | */ |
44 | - public function __construct() |
|
44 | + public function __construct () |
|
45 | 45 | { |
46 | 46 | parent::__construct(); |
47 | 47 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * |
57 | 57 | * @since 0.1.0 |
58 | 58 | */ |
59 | - public function setCollections(&$collections) |
|
59 | + public function setCollections (&$collections) |
|
60 | 60 | { |
61 | 61 | $this->collections = &$collections; |
62 | 62 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @return PageView[][] |
70 | 70 | */ |
71 | - public function getAllPageViews() |
|
71 | + public function getAllPageViews () |
|
72 | 72 | { |
73 | 73 | return $this->trackedItemsFlattened; |
74 | 74 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @return PageView[] |
82 | 82 | */ |
83 | - public function getStaticPageViews() |
|
83 | + public function getStaticPageViews () |
|
84 | 84 | { |
85 | 85 | return $this->staticPages; |
86 | 86 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * |
93 | 93 | * @return JailObject[] |
94 | 94 | */ |
95 | - public function getJailedStaticPageViews() |
|
95 | + public function getJailedStaticPageViews () |
|
96 | 96 | { |
97 | 97 | $jailedObjects = array(); |
98 | 98 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * |
113 | 113 | * @since 0.1.0 |
114 | 114 | */ |
115 | - public function parsePageViews($pageViewFolders) |
|
115 | + public function parsePageViews ($pageViewFolders) |
|
116 | 116 | { |
117 | 117 | if (empty($pageViewFolders)) |
118 | 118 | { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * |
144 | 144 | * @since 0.1.0 |
145 | 145 | */ |
146 | - public function trackNewContentItem(&$contentItem) |
|
146 | + public function trackNewContentItem (&$contentItem) |
|
147 | 147 | { |
148 | 148 | $collection = $contentItem->getCollection(); |
149 | 149 | $this->trackedItems[PageView::DYNAMIC_TYPE][$collection]->addContentItem($contentItem); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | /** |
153 | 153 | * {@inheritdoc} |
154 | 154 | */ |
155 | - protected function handleTrackableItem($filePath, $options = array()) |
|
155 | + protected function handleTrackableItem ($filePath, $options = array()) |
|
156 | 156 | { |
157 | 157 | $pageView = PageView::create($filePath); |
158 | 158 | $namespace = $pageView->getType(); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * |
184 | 184 | * @since 0.1.0 |
185 | 185 | */ |
186 | - private function handleTrackableStaticPageView(&$pageView) |
|
186 | + private function handleTrackableStaticPageView (&$pageView) |
|
187 | 187 | { |
188 | 188 | if (empty($pageView['title'])) |
189 | 189 | { |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * |
201 | 201 | * @since 0.1.0 |
202 | 202 | */ |
203 | - private function handleTrackableDynamicPageView(&$pageView) |
|
203 | + private function handleTrackableDynamicPageView (&$pageView) |
|
204 | 204 | { |
205 | 205 | $frontMatter = $pageView->getFrontMatter(false); |
206 | 206 | $collection = $frontMatter['collection']; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | protected $fs; |
25 | 25 | |
26 | - public function __construct() |
|
26 | + public function __construct () |
|
27 | 27 | { |
28 | 28 | $this->fs = new Filesystem(); |
29 | 29 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * {@inheritdoc} |
33 | 33 | */ |
34 | - public function setLogger(LoggerInterface $logger) |
|
34 | + public function setLogger (LoggerInterface $logger) |
|
35 | 35 | { |
36 | 36 | $this->output = $logger; |
37 | 37 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | private $themeData; |
22 | 22 | private $themeName; |
23 | 23 | |
24 | - public function __construct($themeName) |
|
24 | + public function __construct ($themeName) |
|
25 | 25 | { |
26 | 26 | parent::__construct(); |
27 | 27 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | /** |
56 | 56 | * {@inheritdoc} |
57 | 57 | */ |
58 | - public function refreshItem($filePath) |
|
58 | + public function refreshItem ($filePath) |
|
59 | 59 | { |
60 | 60 | $relativeFilePath = str_replace($this->themeFolderRelative . '/', '', $filePath); |
61 | 61 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * {@inheritdoc} |
70 | 70 | */ |
71 | - public function isHandled($filePath) |
|
71 | + public function isHandled ($filePath) |
|
72 | 72 | { |
73 | 73 | $isThemeAsset = (substr($filePath, 0, strlen($this->themeFolderRelative)) === $this->themeFolderRelative); |
74 | 74 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | /** |
79 | 79 | * {@inheritdoc} |
80 | 80 | */ |
81 | - public function createNewItem($filePath) |
|
81 | + public function createNewItem ($filePath) |
|
82 | 82 | { |
83 | 83 | $relativeFilePath = str_replace($this->themeFolderRelative . '/', '', $filePath); |
84 | 84 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | )); |
88 | 88 | } |
89 | 89 | |
90 | - public function copyFiles() |
|
90 | + public function copyFiles () |
|
91 | 91 | { |
92 | 92 | $this->output->notice('Copying theme files...'); |
93 | 93 |