Completed
Pull Request — master (#81)
by
unknown
02:53
created
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/Router.php 1 patch
Doc Comments   +22 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,11 +129,18 @@  discard block
 block discarded – undo
129 129
     }
130 130
 
131 131
 
132
+    /**
133
+     * @param string $uri
134
+     */
132 135
     private function isURIClean($uri, $uriChunks)
133 136
     {
134 137
         if (!preg_match("/^[a-z0-9:_\/\.\[\]-]+$/i", $uri)
135 138
             || array_filter(
136 139
                 $uriChunks,
140
+
141
+                /**
142
+                 * @param string $uriChunk
143
+                 */
137 144
                 function ($uriChunk) {
138 145
                     if (strpos($uriChunk, '__') !== false) {
139 146
                         return true;
@@ -148,6 +155,10 @@  discard block
 block discarded – undo
148 155
     }
149 156
 
150 157
     //@TODO add Security class.
158
+
159
+    /**
160
+     * @param string $data
161
+     */
151 162
     private function normalize($data)
152 163
     {
153 164
         if (is_numeric($data)) {
@@ -225,6 +236,9 @@  discard block
 block discarded – undo
225 236
         return $normalizedURI;
226 237
     }
227 238
 
239
+    /**
240
+     * @param string $uri
241
+     */
228 242
     private function discoverRoute($uri)
229 243
     {
230 244
         $routes = $this->configuration->routes;
@@ -259,6 +273,7 @@  discard block
 block discarded – undo
259 273
      * Normalize the $_SERVER vars for formatting the URI.
260 274
      *
261 275
      * @access public
276
+     * @param string $uri
262 277
      * @return string formatted/u/r/l
263 278
      */
264 279
     private function uri($uri)
@@ -312,6 +327,9 @@  discard block
 block discarded – undo
312 327
         return array_merge($return, array_values($uriChunks));
313 328
     }
314 329
 
330
+    /**
331
+     * @param string $url
332
+     */
315 333
     private function addQueryString($url, $key, $value)
316 334
     {
317 335
         $url = preg_replace('/(.*)(\?|&)' . $key . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&');
@@ -323,6 +341,9 @@  discard block
 block discarded – undo
323 341
         }
324 342
     }
325 343
 
344
+    /**
345
+     * @param string $url
346
+     */
326 347
     private function removeQueryString($url, $key)
327 348
     {
328 349
         $url = preg_replace('/(.*)(\?|&)' . $key . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&');
@@ -394,7 +415,7 @@  discard block
 block discarded – undo
394 415
      * Set optional status header, and redirect to provided URL
395 416
      *
396 417
      * @access public
397
-     * @return bool
418
+     * @return false|null
398 419
      */
399 420
     public function redirect($url = '/', $status = null)
400 421
     {
Please login to merge, or discard this patch.
Zewa/View.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -200,6 +200,9 @@  discard block
 block discarded – undo
200 200
         return false;
201 201
     }
202 202
 
203
+    /**
204
+     * @param string|boolean $layout
205
+     */
203 206
     public function setLayout($layout)
204 207
     {
205 208
         if ($layout === false) {
@@ -241,6 +244,10 @@  discard block
 block discarded – undo
241 244
      * @return string processed content
242 245
      */
243 246
     //@TODO: come back and clean up this and the way the view receives stuff
247
+
248
+    /**
249
+     * @param string|boolean $file
250
+     */
244 251
     private function process($file)
245 252
     {
246 253
         ob_start();
Please login to merge, or discard this patch.
Zewa/App.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,6 @@  discard block
 block discarded – undo
172 172
      * Attach (or remove) multiple callbacks to an event and trigger those callbacks when that event is called.
173 173
      *
174 174
      * @param string $event    name
175
-     * @param mixed  $value    the optional value to pass to each callback
176 175
      * @param mixed  $callback the method or function to call - FALSE to remove all callbacks for event
177 176
      */
178 177
 
@@ -186,6 +185,9 @@  discard block
 block discarded – undo
186 185
         }
187 186
     }
188 187
 
188
+    /**
189
+     * @param string $event
190
+     */
189 191
     public function callEvent($event, $method = false, $arguments = [])
190 192
     {
191 193
         if (isset(self::$events[$event])) {
Please login to merge, or discard this patch.