Completed
Pull Request — master (#64)
by Josh
02:35
created
Zewa/App.php 1 patch
Doc Comments   +9 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,6 +170,9 @@  discard block
 block discarded – undo
170 170
         $this->class = '\\App\\Modules\\' . $this->module . '\\Controllers\\' . ucfirst($this->controller);
171 171
     }
172 172
 
173
+    /**
174
+     * @param string $service
175
+     */
173 176
     public static function getService($service, $new = false, $options = [])
174 177
     {
175 178
         if ($new === false) {
@@ -180,6 +183,9 @@  discard block
 block discarded – undo
180 183
         }
181 184
     }
182 185
 
186
+    /**
187
+     * @param string $service
188
+     */
183 189
     public static function setService($service, $class)
184 190
     {
185 191
         self::$services->$service = $class;
@@ -329,7 +335,6 @@  discard block
 block discarded – undo
329 335
      * Attach (or remove) multiple callbacks to an event and trigger those callbacks when that event is called.
330 336
      *
331 337
      * @param string $event name
332
-     * @param mixed $value the optional value to pass to each callback
333 338
      * @param mixed $callback the method or function to call - FALSE to remove all callbacks for event
334 339
      */
335 340
 
@@ -344,6 +349,9 @@  discard block
 block discarded – undo
344 349
 
345 350
     }
346 351
 
352
+    /**
353
+     * @param string $event
354
+     */
347 355
     public function callEvent($event, $method = false, $arguments = [])
348 356
     {
349 357
         if (isset(self::$events[$event])) {
Please login to merge, or discard this patch.
Zewa/Router.php 1 patch
Doc Comments   +18 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,6 +122,9 @@  discard block
 block discarded – undo
122 122
     }
123 123
 
124 124
 
125
+    /**
126
+     * @param string $uri
127
+     */
125 128
     private function isURIClean($uri, $uriChunks)
126 129
     {
127 130
         if (!preg_match("/^[a-z0-9:_\/\.\[\]-]+$/i", $uri)
@@ -138,6 +141,10 @@  discard block
 block discarded – undo
138 141
     }
139 142
 
140 143
     //@TODO add Security class.
144
+
145
+    /**
146
+     * @param string $data
147
+     */
141 148
     private function normalize($data)
142 149
     {
143 150
         if (is_numeric($data)) {
@@ -218,6 +225,9 @@  discard block
 block discarded – undo
218 225
         return $normalizedURI;
219 226
     }
220 227
 
228
+    /**
229
+     * @param string $uri
230
+     */
221 231
     private function discoverRoute($uri)
222 232
     {
223 233
         $routes = $this->configuration->routes;
@@ -249,6 +259,7 @@  discard block
 block discarded – undo
249 259
      * Normalize the $_SERVER vars for formatting the URI.
250 260
      *
251 261
      * @access public
262
+     * @param string $uri
252 263
      * @return string formatted/u/r/l
253 264
      */
254 265
     private function uri($uri)
@@ -307,6 +318,9 @@  discard block
 block discarded – undo
307 318
         return array_merge($return, array_values($uriChunks));
308 319
     }
309 320
 
321
+    /**
322
+     * @param string $url
323
+     */
310 324
     private function addQueryString($url, $key, $value)
311 325
     {
312 326
         $url = preg_replace('/(.*)(\?|&)' . $key . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&');
@@ -318,6 +332,9 @@  discard block
 block discarded – undo
318 332
         }
319 333
     }
320 334
 
335
+    /**
336
+     * @param string $url
337
+     */
321 338
     private function removeQueryString($url, $key)
322 339
     {
323 340
         $url = preg_replace('/(.*)(\?|&)' . $key . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&');
@@ -392,7 +409,7 @@  discard block
 block discarded – undo
392 409
      * Set optional status header, and redirect to provided URL
393 410
      *
394 411
      * @access public
395
-     * @return bool
412
+     * @return false|null
396 413
      */
397 414
     public function redirect($url = '/', $status = null)
398 415
     {
Please login to merge, or discard this patch.
Zewa/SessionHandler.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -162,6 +162,9 @@
 block discarded – undo
162 162
 
163 163
     }
164 164
 
165
+    /**
166
+     * @param string $sessionId
167
+     */
165 168
     public function destroy($sessionId)
166 169
     {
167 170
         $success = false;
Please login to merge, or discard this patch.
Zewa/View.php 1 patch
Doc Comments   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,6 @@  discard block
 block discarded – undo
89 89
      *
90 90
      * @access public
91 91
      *
92
-     * @param string $requestedView relative path for the view
93
-     * @param string $renderName array of data to expose to view
94 92
      *
95 93
      * @throws \Exception when a view can not be found
96 94
      */
@@ -185,6 +183,10 @@  discard block
 block discarded – undo
185 183
      * @return string processed content
186 184
      */
187 185
     //@TODO: come back and clean up this and the way the view receives stuff
186
+
187
+    /**
188
+     * @param string|boolean $file
189
+     */
188 190
     private function process($file)
189 191
     {
190 192
         ob_start();
Please login to merge, or discard this patch.