@@ -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 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * |
29 | 29 | * @return array |
30 | 30 | */ |
31 | - public function getDataItems() |
|
31 | + public function getDataItems () |
|
32 | 32 | { |
33 | 33 | return $this->trackedItems; |
34 | 34 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @param string[] $folders An array of folders to be searched for to contain DataItems |
42 | 42 | */ |
43 | - public function parseDataItems($folders) |
|
43 | + public function parseDataItems ($folders) |
|
44 | 44 | { |
45 | 45 | if ($folders === null) |
46 | 46 | { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @param string[] $dataSets An array of DataSets |
68 | 68 | */ |
69 | - public function parseDataSets($dataSets) |
|
69 | + public function parseDataSets ($dataSets) |
|
70 | 70 | { |
71 | 71 | if ($dataSets === null) |
72 | 72 | { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | /** |
99 | 99 | * {@inheritdoc} |
100 | 100 | */ |
101 | - protected function handleTrackableItem($filePath, $options = array()) |
|
101 | + protected function handleTrackableItem ($filePath, $options = array()) |
|
102 | 102 | { |
103 | 103 | $relFilePath = $this->fs->getRelativePath($filePath); |
104 | 104 | $ext = strtolower($this->fs->getExtension($filePath)); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * |
133 | 133 | * @return array |
134 | 134 | */ |
135 | - private function fromCsv($content) |
|
135 | + private function fromCsv ($content) |
|
136 | 136 | { |
137 | 137 | $rows = array_map('str_getcsv', explode("\n", trim($content))); |
138 | 138 | $columns = array_shift($rows); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | * |
154 | 154 | * @return array |
155 | 155 | */ |
156 | - private function fromJson($content) |
|
156 | + private function fromJson ($content) |
|
157 | 157 | { |
158 | 158 | return json_decode($content, true); |
159 | 159 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * |
166 | 166 | * @return array |
167 | 167 | */ |
168 | - private function fromXml($content) |
|
168 | + private function fromXml ($content) |
|
169 | 169 | { |
170 | 170 | return json_decode(json_encode(simplexml_load_string($content)), true); |
171 | 171 | } |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | * |
178 | 178 | * @return array |
179 | 179 | */ |
180 | - private function fromYaml($content) |
|
180 | + private function fromYaml ($content) |
|
181 | 181 | { |
182 | 182 | return Yaml::parse($content, Yaml::PARSE_DATETIME); |
183 | 183 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * |
190 | 190 | * @return array |
191 | 191 | */ |
192 | - private function fromYml($content) |
|
192 | + private function fromYml ($content) |
|
193 | 193 | { |
194 | 194 | return $this->fromYaml($content); |
195 | 195 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | * |
202 | 202 | * @throws DependencyMissingException |
203 | 203 | */ |
204 | - private function handleDependencies($extension) |
|
204 | + private function handleDependencies ($extension) |
|
205 | 205 | { |
206 | 206 | if ($extension === 'xml' && !function_exists('simplexml_load_string')) |
207 | 207 | { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * |
58 | 58 | * @return JailObject[][] |
59 | 59 | */ |
60 | - public function getJailedCollections() |
|
60 | + public function getJailedCollections () |
|
61 | 61 | { |
62 | 62 | $jailItems = array(); |
63 | 63 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @param string[][] $collections An array of definitions for collections |
79 | 79 | */ |
80 | - public function parseCollections($collections) |
|
80 | + public function parseCollections ($collections) |
|
81 | 81 | { |
82 | 82 | if ($collections === null) |
83 | 83 | { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | /** |
119 | 119 | * {@inheritdoc} |
120 | 120 | */ |
121 | - public function createNewItem($filePath) |
|
121 | + public function createNewItem ($filePath) |
|
122 | 122 | { |
123 | 123 | $collection = $this->getTentativeCollectionName($filePath); |
124 | 124 | |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | /** |
131 | 131 | * {@inheritdoc} |
132 | 132 | */ |
133 | - public function refreshItem($filePath) |
|
133 | + public function refreshItem ($filePath) |
|
134 | 134 | { |
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
138 | 138 | * {@inheritdoc} |
139 | 139 | */ |
140 | - protected function handleTrackableItem($filePath, $options = array()) |
|
140 | + protected function handleTrackableItem ($filePath, $options = array()) |
|
141 | 141 | { |
142 | 142 | $collectionName = $options['namespace']; |
143 | 143 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * |
163 | 163 | * @return string |
164 | 164 | */ |
165 | - private function getTentativeCollectionName($filePath) |
|
165 | + private function getTentativeCollectionName ($filePath) |
|
166 | 166 | { |
167 | 167 | foreach ($this->collectionDefinitions as $collection) |
168 | 168 | { |
@@ -31,19 +31,19 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * {@inheritdoc} |
33 | 33 | */ |
34 | - public function createJail() |
|
34 | + public function createJail () |
|
35 | 35 | { |
36 | 36 | return new JailObject($this, array_merge(self::$whiteListFunctions, array( |
37 | 37 | 'getCollection', |
38 | 38 | )), array('getPageView' => 'getJailedPageView')); |
39 | 39 | } |
40 | 40 | |
41 | - public function getCollection() |
|
41 | + public function getCollection () |
|
42 | 42 | { |
43 | 43 | return $this->parentCollection; |
44 | 44 | } |
45 | 45 | |
46 | - public function setCollection($collection) |
|
46 | + public function setCollection ($collection) |
|
47 | 47 | { |
48 | 48 | $this->parentCollection = $collection; |
49 | 49 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return string |
55 | 55 | */ |
56 | - public function getContent() |
|
56 | + public function getContent () |
|
57 | 57 | { |
58 | 58 | if (!$this->bodyContentEvaluated) |
59 | 59 | { |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | $this->bodyContentEvaluated = true; |
64 | 64 | } |
65 | 65 | |
66 | - return (string)$this->bodyContent; |
|
66 | + return (string) $this->bodyContent; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
70 | 70 | * Parse the Twig that is embedded inside a ContentItem's body. |
71 | 71 | */ |
72 | - private function parseTwig() |
|
72 | + private function parseTwig () |
|
73 | 73 | { |
74 | 74 | $twig = TwigManager::getInstance(); |
75 | 75 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | /** |
84 | 84 | * Parse the ContentItem's body based on the extension of the file. |
85 | 85 | */ |
86 | - private function parseEngines() |
|
86 | + private function parseEngines () |
|
87 | 87 | { |
88 | 88 | switch ($this->getExtension()) |
89 | 89 | { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | return $this->parentPageView; |
114 | 114 | } |
115 | 115 | |
116 | - public function getJailedPageView() |
|
116 | + public function getJailedPageView () |
|
117 | 117 | { |
118 | 118 | return $this->parentPageView->createJail(); |
119 | 119 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * |
124 | 124 | * @param PageView $pageView |
125 | 125 | */ |
126 | - public function setPageView(&$pageView) |
|
126 | + public function setPageView (&$pageView) |
|
127 | 127 | { |
128 | 128 | $this->parentPageView = &$pageView; |
129 | 129 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | /** |
132 | 132 | * {@inheritdoc} |
133 | 133 | */ |
134 | - public function jsonSerialize() |
|
134 | + public function jsonSerialize () |
|
135 | 135 | { |
136 | 136 | return array_merge($this->getFrontMatter(), array( |
137 | 137 | 'content' => $this->getContent(), |
@@ -14,7 +14,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
56 | 56 | * |
57 | 57 | * @param array $frontMatter |
58 | 58 | */ |
59 | - public function setFrontMatter(array $frontMatter); |
|
59 | + public function setFrontMatter (array $frontMatter); |
|
60 | 60 | } |
@@ -35,7 +35,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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(); |
@@ -37,7 +37,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -19,5 +19,5 @@ |
||
19 | 19 | * |
20 | 20 | * @return JailObject |
21 | 21 | */ |
22 | - public function createJail(); |
|
22 | + public function createJail (); |
|
23 | 23 | } |
@@ -19,7 +19,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |