Completed
Push — master ( 52b3ab...7d7738 )
by Sébastien
14:37 queued 04:04
created
author.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -62,6 +62,9 @@  discard block
 block discarded – undo
62 62
         return self::getEntryArray (self::SQL_AUTHORS_BY_FIRST_LETTER, array ($letter . "%"));
63 63
     }
64 64
 
65
+    /**
66
+     * @param string $query
67
+     */
65 68
     public static function getAuthorsForSearch($query) {
66 69
         return self::getEntryArray (self::SQL_AUTHORS_FOR_SEARCH, array ($query . "%", $query . "%"));
67 70
     }
@@ -70,6 +73,9 @@  discard block
 block discarded – undo
70 73
         return self::getEntryArray (self::SQL_ALL_AUTHORS, array ());
71 74
     }
72 75
 
76
+    /**
77
+     * @param string $query
78
+     */
73 79
     public static function getEntryArray ($query, $params) {
74 80
         return Base::getEntryArrayWithBookNumber ($query, self::AUTHOR_COLUMNS, $params, "Author");
75 81
     }
Please login to merge, or discard this patch.
data.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -139,6 +139,9 @@  discard block
 block discarded – undo
139 139
         return new Link ($href, $this->getMimeType (), Link::OPDS_ACQUISITION_TYPE, $title);
140 140
     }
141 141
 
142
+    /**
143
+     * @param Book $book
144
+     */
142 145
     public static function getDataByBook ($book) {
143 146
         $out = array ();
144 147
         $result = parent::getDb ()->prepare('select id, format, name
@@ -152,6 +155,9 @@  discard block
 block discarded – undo
152 155
         return $out;
153 156
     }
154 157
 
158
+    /**
159
+     * @param string $urlParam
160
+     */
155 161
     public static function handleThumbnailLink ($urlParam, $height) {
156 162
         global $config;
157 163
 
@@ -171,6 +177,10 @@  discard block
 block discarded – undo
171 177
         return $urlParam;
172 178
     }
173 179
 
180
+    /**
181
+     * @param string $type
182
+     * @param string $filename
183
+     */
174 184
     public static function getLink ($book, $type, $mime, $rel, $filename, $idData, $title = NULL, $height = NULL)
175 185
     {
176 186
         global $config;
Please login to merge, or discard this patch.
rating.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -38,6 +38,9 @@
 block discarded – undo
38 38
         return self::getEntryArray (self::SQL_ALL_RATINGS, array ());
39 39
     }
40 40
 
41
+    /**
42
+     * @param string $query
43
+     */
41 44
     public static function getEntryArray ($query, $params) {
42 45
         list (, $result) = parent::executeQuery ($query, self::RATING_COLUMNS, "", $params, -1);
43 46
         $entryArray = array();
Please login to merge, or discard this patch.
test/OPDSTest.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -26,6 +26,9 @@  discard block
 block discarded – undo
26 26
         unlink (TEST_FEED);
27 27
     }
28 28
 
29
+    /**
30
+     * @param string $relax
31
+     */
29 32
     function jingValidateSchema($feed, $relax = OPDS_RELAX_NG) {
30 33
         $path = "";
31 34
         if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
@@ -57,6 +60,9 @@  discard block
 block discarded – undo
57 60
             return true;
58 61
     }
59 62
 
63
+    /**
64
+     * @param string $feed
65
+     */
60 66
     function opdsCompleteValidation ($feed) {
61 67
         return $this->jingValidateSchema($feed) && $this->opdsValidator($feed);
62 68
     }
Please login to merge, or discard this patch.
test/Sauce.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -189,6 +189,10 @@
 block discarded – undo
189 189
         $this->assertEquals (14, count($filtered));
190 190
     }
191 191
 
192
+    /**
193
+     * @param string $src
194
+     * @param string $out
195
+     */
192 196
     public function normalSearch ($src, $out)
193 197
     {
194 198
         $driver = $this;
Please login to merge, or discard this patch.
transliteration.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
 /**
164 164
  * Replaces a Unicode character using the transliteration database.
165 165
  *
166
- * @param $ord
166
+ * @param integer $ord
167 167
  *   An ordinal Unicode character code.
168 168
  * @param $unknown
169 169
  *   Replacement string for characters that do not have a suitable ASCII
Please login to merge, or discard this patch.
base.php 1 patch
Doc Comments   +50 added lines patch added patch discarded remove patch
@@ -60,6 +60,9 @@  discard block
 block discarded – undo
60 60
     $_SERVER['REDIRECT_STATUS'] = 404;
61 61
 }
62 62
 
63
+/**
64
+ * @param string $name
65
+ */
63 66
 function getURLParam ($name, $default = NULL) {
64 67
     if (!empty ($_GET) && isset($_GET[$name]) && $_GET[$name] != "") {
65 68
         return $_GET[$name];
@@ -99,6 +102,11 @@  discard block
 block discarded – undo
99 102
     return $url . "?v=" . VERSION;
100 103
 }
101 104
 
105
+/**
106
+ * @param string $xml
107
+ *
108
+ * @return string
109
+ */
102 110
 function xml2xhtml($xml) {
103 111
     return preg_replace_callback('#<(\w+)([^>]*)\s*/>#s', create_function('$m', '
104 112
         $xhtml_tags = array("br", "hr", "input", "frame", "img", "area", "link", "col", "base", "basefont", "param");
@@ -312,6 +320,9 @@  discard block
 block discarded – undo
312 320
     return $phrase;
313 321
 }
314 322
 
323
+/**
324
+ * @param string $paramName
325
+ */
315 326
 function addURLParameter($urlParams, $paramName, $paramValue) {
316 327
     if (empty ($urlParams)) {
317 328
         $urlParams = "";
@@ -373,6 +384,9 @@  discard block
 block discarded – undo
373 384
         return $this->href;
374 385
     }
375 386
 
387
+    /**
388
+     * @return string
389
+     */
376 390
     public function getScriptName() {
377 391
         $parts = explode('/', $_SERVER["SCRIPT_NAME"]);
378 392
         return $parts[count($parts) - 1];
@@ -381,6 +395,9 @@  discard block
 block discarded – undo
381 395
 
382 396
 class LinkNavigation extends Link
383 397
 {
398
+    /**
399
+     * @param string $prel
400
+     */
384 401
     public function __construct($phref, $prel = NULL, $ptitle = NULL) {
385 402
         parent::__construct ($phref, Link::OPDS_NAVIGATION_TYPE, $prel, $ptitle);
386 403
         if (!is_null (GetUrlParam (DB))) $this->href = addURLParameter ($this->href, DB, GetUrlParam (DB));
@@ -395,6 +412,9 @@  discard block
 block discarded – undo
395 412
 
396 413
 class LinkFacet extends Link
397 414
 {
415
+    /**
416
+     * @param string $phref
417
+     */
398 418
     public function __construct($phref, $ptitle = NULL, $pfacetGroup = NULL, $pactiveFacet = FALSE) {
399 419
         parent::__construct ($phref, Link::OPDS_PAGING_TYPE, "http://opds-spec.org/facet", $ptitle, $pfacetGroup, $pactiveFacet);
400 420
         if (!is_null (GetUrlParam (DB))) $this->href = addURLParameter ($this->href, DB, GetUrlParam (DB));
@@ -448,6 +468,9 @@  discard block
 block discarded – undo
448 468
         return "#";
449 469
     }
450 470
 
471
+    /**
472
+     * @param string $pcontentType
473
+     */
451 474
     public function __construct($ptitle, $pid, $pcontent, $pcontentType, $plinkArray, $pclass = "", $pcount = 0) {
452 475
         global $config;
453 476
         $this->title = $ptitle;
@@ -1067,6 +1090,9 @@  discard block
 block discarded – undo
1067 1090
 
1068 1091
 class PageCustomize extends Page
1069 1092
 {
1093
+    /**
1094
+     * @param string $key
1095
+     */
1070 1096
     private function isChecked ($key, $testedValue = 1) {
1071 1097
         $value = getCurrentOption ($key);
1072 1098
         if (is_array ($value)) {
@@ -1081,6 +1107,9 @@  discard block
 block discarded – undo
1081 1107
         return "";
1082 1108
     }
1083 1109
 
1110
+    /**
1111
+     * @param string $key
1112
+     */
1084 1113
     private function isSelected ($key, $value) {
1085 1114
         if (getCurrentOption ($key) == $value) {
1086 1115
             return "selected='selected'";
@@ -1223,6 +1252,9 @@  discard block
 block discarded – undo
1223 1252
         }
1224 1253
     }
1225 1254
 
1255
+    /**
1256
+     * @param integer $database
1257
+     */
1226 1258
     public static function getDbName ($database = NULL) {
1227 1259
         global $config;
1228 1260
         if (self::isMultipleDatabaseEnabled ()) {
@@ -1236,6 +1268,9 @@  discard block
 block discarded – undo
1236 1268
         return "";
1237 1269
     }
1238 1270
 
1271
+    /**
1272
+     * @return string
1273
+     */
1239 1274
     public static function getDbDirectory ($database = NULL) {
1240 1275
         global $config;
1241 1276
         if (self::isMultipleDatabaseEnabled ()) {
@@ -1295,10 +1330,18 @@  discard block
 block discarded – undo
1295 1330
         self::$db = NULL;
1296 1331
     }
1297 1332
 
1333
+    /**
1334
+     * @param string $query
1335
+     */
1298 1336
     public static function executeQuerySingle ($query, $database = NULL) {
1299 1337
         return self::getDb ($database)->query($query)->fetchColumn();
1300 1338
     }
1301 1339
 
1340
+    /**
1341
+     * @param string $table
1342
+     * @param string $id
1343
+     * @param string $numberOfString
1344
+     */
1302 1345
     public static function getCountGeneric($table, $id, $pageId, $numberOfString = NULL) {
1303 1346
         if (!$numberOfString) {
1304 1347
             $numberOfString = $table . ".alphabetical";
@@ -1311,6 +1354,10 @@  discard block
 block discarded – undo
1311 1354
         return $entry;
1312 1355
     }
1313 1356
 
1357
+    /**
1358
+     * @param string $columns
1359
+     * @param string $category
1360
+     */
1314 1361
     public static function getEntryArrayWithBookNumber ($query, $columns, $params, $category) {
1315 1362
         /* @var $result PDOStatement */
1316 1363
 
@@ -1333,6 +1380,9 @@  discard block
 block discarded – undo
1333 1380
         return $entryArray;
1334 1381
     }
1335 1382
 
1383
+    /**
1384
+     * @param string $filter
1385
+     */
1336 1386
     public static function executeQuery($query, $columns, $filter, $params, $n, $database = NULL, $numberPerPage = NULL) {
1337 1387
         $totalResult = -1;
1338 1388
 
Please login to merge, or discard this patch.
customcolumn.php 1 patch
Doc Comments   +35 added lines, -5 removed lines patch added patch discarded remove patch
@@ -128,6 +128,9 @@  discard block
 block discarded – undo
128 128
     /** @var Entry[] */
129 129
     private $customValues = NULL;
130 130
 
131
+    /**
132
+     * @param string $pdatatype
133
+     */
131 134
     protected function __construct($pcustomId, $pdatatype)
132 135
     {
133 136
         $this->columnTitle = self::getTitleByCustomID($pcustomId);
@@ -236,7 +239,7 @@  discard block
 block discarded – undo
236 239
     /**
237 240
      * Encode a value of this column ready to be displayed in an HTML document
238 241
      *
239
-     * @param integer|string $value
242
+     * @param string $value
240 243
      * @return string
241 244
      */
242 245
     public function encodeHTMLValue($value)
@@ -404,6 +407,9 @@  discard block
 block discarded – undo
404 407
 
405 408
 class CustomColumnTypeText extends CustomColumnType
406 409
 {
410
+    /**
411
+     * @param integer $pcustomId
412
+     */
407 413
     protected function __construct($pcustomId)
408 414
     {
409 415
         parent::__construct($pcustomId, self::CUSTOM_TYPE_TEXT);
@@ -433,7 +439,7 @@  discard block
 block discarded – undo
433 439
     /**
434 440
      * Get the name of the linking column in the linktable
435 441
      *
436
-     * @return string|null
442
+     * @return string
437 443
      */
438 444
     private function getTableLinkColumn()
439 445
     {
@@ -501,6 +507,9 @@  discard block
 block discarded – undo
501 507
 
502 508
 class CustomColumnTypeSeries extends CustomColumnType
503 509
 {
510
+    /**
511
+     * @param integer $pcustomId
512
+     */
504 513
     protected function __construct($pcustomId)
505 514
     {
506 515
         parent::__construct($pcustomId, self::CUSTOM_TYPE_SERIES);
@@ -530,7 +539,7 @@  discard block
 block discarded – undo
530 539
     /**
531 540
      * Get the name of the linking column in the linktable
532 541
      *
533
-     * @return string|null
542
+     * @return string
534 543
      */
535 544
     private function getTableLinkColumn()
536 545
     {
@@ -596,6 +605,9 @@  discard block
 block discarded – undo
596 605
 
597 606
 class CustomColumnTypeEnumeration extends CustomColumnType
598 607
 {
608
+    /**
609
+     * @param integer $pcustomId
610
+     */
599 611
     protected function __construct($pcustomId)
600 612
     {
601 613
         parent::__construct($pcustomId, self::CUSTOM_TYPE_ENUM);
@@ -625,7 +637,7 @@  discard block
 block discarded – undo
625 637
     /**
626 638
      * Get the name of the linking column in the linktable
627 639
      *
628
-     * @return string|null
640
+     * @return string
629 641
      */
630 642
     private function getTableLinkColumn()
631 643
     {
@@ -691,6 +703,9 @@  discard block
 block discarded – undo
691 703
 
692 704
 class CustomColumnTypeDate extends CustomColumnType
693 705
 {
706
+    /**
707
+     * @param integer $pcustomId
708
+     */
694 709
     protected function __construct($pcustomId)
695 710
     {
696 711
         parent::__construct($pcustomId, self::CUSTOM_TYPE_DATE);
@@ -771,6 +786,9 @@  discard block
 block discarded – undo
771 786
 
772 787
 class CustomColumnTypeRating extends CustomColumnType
773 788
 {
789
+    /**
790
+     * @param integer $pcustomId
791
+     */
774 792
     protected function __construct($pcustomId)
775 793
     {
776 794
         parent::__construct($pcustomId, self::CUSTOM_TYPE_RATING);
@@ -800,7 +818,7 @@  discard block
 block discarded – undo
800 818
     /**
801 819
      * Get the name of the linking column in the linktable
802 820
      *
803
-     * @return string|null
821
+     * @return string
804 822
      */
805 823
     private function getTableLinkColumn()
806 824
     {
@@ -881,6 +899,9 @@  discard block
 block discarded – undo
881 899
         +1 => "customcolumn.boolean.yes",     // localize("customcolumn.boolean.yes")
882 900
     );
883 901
 
902
+    /**
903
+     * @param integer $pcustomId
904
+     */
884 905
     protected function __construct($pcustomId)
885 906
     {
886 907
         parent::__construct($pcustomId, self::CUSTOM_TYPE_BOOL);
@@ -961,6 +982,9 @@  discard block
 block discarded – undo
961 982
 
962 983
 class CustomColumnTypeInteger extends CustomColumnType
963 984
 {
985
+    /**
986
+     * @param integer $pcustomId
987
+     */
964 988
     protected function __construct($pcustomId)
965 989
     {
966 990
         parent::__construct($pcustomId, self::CUSTOM_TYPE_INT);
@@ -1032,6 +1056,9 @@  discard block
 block discarded – undo
1032 1056
 
1033 1057
 class CustomColumnTypeFloat extends CustomColumnType
1034 1058
 {
1059
+    /**
1060
+     * @param integer $pcustomId
1061
+     */
1035 1062
     protected function __construct($pcustomId)
1036 1063
     {
1037 1064
         parent::__construct($pcustomId, self::CUSTOM_TYPE_FLOAT);
@@ -1103,6 +1130,9 @@  discard block
 block discarded – undo
1103 1130
 
1104 1131
 class CustomColumnTypeComment extends CustomColumnType
1105 1132
 {
1133
+    /**
1134
+     * @param integer $pcustomId
1135
+     */
1106 1136
     protected function __construct($pcustomId)
1107 1137
     {
1108 1138
         parent::__construct($pcustomId, self::CUSTOM_TYPE_COMMENT);
Please login to merge, or discard this patch.
book.php 1 patch
Doc Comments   +21 added lines, -1 removed lines patch added patch discarded remove patch
@@ -341,6 +341,10 @@  discard block
 block discarded – undo
341 341
         return reset ($reduced);
342 342
     }
343 343
 
344
+    /**
345
+     * @param string $extension
346
+     * @param integer $idData
347
+     */
344 348
     public function getFilePath ($extension, $idData = NULL, $relative = false)
345 349
     {
346 350
         if ($extension == "jpg")
@@ -400,6 +404,9 @@  discard block
 block discarded – undo
400 404
         }
401 405
     }
402 406
 
407
+    /**
408
+     * @param string $outputfile
409
+     */
403 410
     public function getThumbnail ($width, $height, $outputfile = NULL) {
404 411
         if (is_null ($width) && is_null ($height)) {
405 412
             return false;
@@ -474,6 +481,9 @@  discard block
 block discarded – undo
474 481
             $this->getLinkArray (), $this);
475 482
     }
476 483
 
484
+    /**
485
+     * @param integer $database
486
+     */
477 487
     public static function getBookCount($database = NULL) {
478 488
         return parent::executeQuerySingle ('select count(*) from books', $database);
479 489
     }
@@ -522,7 +532,7 @@  discard block
 block discarded – undo
522 532
     }
523 533
 
524 534
     /**
525
-     * @param $customColumn CustomColumn
535
+     * @param CustomColumn $customColumn CustomColumn
526 536
      * @param $id integer
527 537
      * @param $n integer
528 538
      * @return array
@@ -546,6 +556,9 @@  discard block
 block discarded – undo
546 556
         return NULL;
547 557
     }
548 558
 
559
+    /**
560
+     * @param integer $dataId
561
+     */
549 562
     public static function getBookByDataId($dataId) {
550 563
         $result = parent::getDb ()->prepare('select ' . self::BOOK_COLUMNS . ', data.name, data.format
551 564
 from data, books ' . self::SQL_BOOKS_LEFT_JOIN . '
@@ -562,6 +575,10 @@  discard block
 block discarded – undo
562 575
         return NULL;
563 576
     }
564 577
 
578
+    /**
579
+     * @param integer $database
580
+     * @param integer $numberPerPage
581
+     */
565 582
     public static function getBooksByQuery($query, $n, $database = NULL, $numberPerPage = NULL) {
566 583
         $i = 0;
567 584
         $critArray = array ();
@@ -609,6 +626,9 @@  discard block
 block discarded – undo
609 626
         return $entryArray;
610 627
     }
611 628
 
629
+    /**
630
+     * @param integer $numberPerPage
631
+     */
612 632
     public static function getBooksByStartingLetter($letter, $n, $database = NULL, $numberPerPage = NULL) {
613 633
         return self::getEntryArray (self::SQL_BOOKS_BY_FIRST_LETTER, array ($letter . "%"), $n, $database, $numberPerPage);
614 634
     }
Please login to merge, or discard this patch.