Completed
Pull Request — master (#41)
by Vladimir
02:31
created
src/allejo/stakx/Manager/TwigManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/AssetManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         {
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/MenuManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/TrackingManager.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/PageManager.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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'];
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/BaseManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/ThemeManager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/DataManager.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         {
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/CollectionManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         {
Please login to merge, or discard this patch.