Completed
Push — master ( d208aa...25518b )
by Lars
12:37
created
src/Intraface/Kernel.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      *
81 81
      * Used for instance in Page to give the correct submenu.
82 82
      *
83
-     * @return module object or false
83
+     * @return boolean object or false
84 84
      */
85 85
     function getPrimaryModule()
86 86
     {
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      *
168 168
      * @param $count (integer) how many characters to return?
169 169
      *
170
-     * @return  random key (string) only letters
170
+     * @return  string key (string) only letters
171 171
      */
172 172
     function randomKey($length = 1)
173 173
     {
Please login to merge, or discard this patch.
src/Intraface/LegacyCpdf.php 1 patch
Doc Comments   +59 added lines, -8 removed lines patch added patch discarded remove patch
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
     /**
347 347
      * Constructor - starts a new document
348 348
      *
349
-     * @param array $pageSize Array of 4 numbers, defining the bottom left and upper right corner of the page. first two are normally zero.
349
+     * @param integer[] $pageSize Array of 4 numbers, defining the bottom left and upper right corner of the page. first two are normally zero.
350 350
      *
351 351
      * @return void
352 352
      */
@@ -384,6 +384,8 @@  discard block
 block discarded – undo
384 384
     /**
385 385
      * destination object, used to specify the location for the user to jump to, presently on opening
386 386
      * @access private
387
+     * @param integer $id
388
+     * @param string $action
387 389
      */
388 390
     private function o_destination($id, $action, $options = '')
389 391
     {
@@ -421,6 +423,7 @@  discard block
 block discarded – undo
421 423
     /**
422 424
      * sets the viewer preferences
423 425
      * @access private
426
+     * @param string $action
424 427
      */
425 428
     private function o_viewerPreferences($id, $action, $options = '')
426 429
     {
@@ -461,6 +464,8 @@  discard block
 block discarded – undo
461 464
     /**
462 465
      * define the document catalog, the overall controller for the document
463 466
      * @access private
467
+     * @param integer $id
468
+     * @param string $action
464 469
      */
465 470
     private function o_catalog($id, $action, $options = '')
466 471
     {
@@ -513,6 +518,8 @@  discard block
 block discarded – undo
513 518
     /**
514 519
      * object which is a parent to the pages in the document
515 520
      * @access private
521
+     * @param integer $id
522
+     * @param string $action
516 523
      */
517 524
     private function o_pages($id, $action, $options = '')
518 525
     {
@@ -633,6 +640,8 @@  discard block
 block discarded – undo
633 640
     /**
634 641
      * defines the outlines in the doc, empty for now
635 642
      * @access private
643
+     * @param integer $id
644
+     * @param string $action
636 645
      */
637 646
     private function o_outlines($id, $action, $options = '')
638 647
     {
@@ -665,6 +674,8 @@  discard block
 block discarded – undo
665 674
     /**
666 675
      * an object to hold the font description
667 676
      * @access private
677
+     * @param integer $id
678
+     * @param string $action
668 679
      */
669 680
     private function o_font($id, $action, $options = '')
670 681
     {
@@ -851,6 +862,8 @@  discard block
 block discarded – undo
851 862
     /**
852 863
      * a font descriptor, needed for including additional fonts
853 864
      * @access private
865
+     * @param integer $id
866
+     * @param string $action
854 867
      */
855 868
     private function o_fontDescriptor($id, $action, $options = '')
856 869
     {
@@ -904,6 +917,8 @@  discard block
 block discarded – undo
904 917
     /**
905 918
      * the font encoding
906 919
      * @access private
920
+     * @param integer $id
921
+     * @param string $action
907 922
      */
908 923
     private function o_fontEncoding($id, $action, $options = '')
909 924
     {
@@ -943,6 +958,7 @@  discard block
 block discarded – undo
943 958
     /**
944 959
      * a descendent cid font, needed for unicode fonts
945 960
      * @access private
961
+     * @param string $action
946 962
      */
947 963
     private function o_fontDescendentCID($id, $action, $options = '')
948 964
     {
@@ -1018,6 +1034,7 @@  discard block
 block discarded – undo
1018 1034
     /**
1019 1035
       * a font glyph to character map, needed for unicode fonts
1020 1036
       * @access private
1037
+      * @param string $action
1021 1038
       */
1022 1039
     private function o_fontGIDtoCIDMap($id, $action, $options = '')
1023 1040
     {
@@ -1056,6 +1073,7 @@  discard block
 block discarded – undo
1056 1073
     /**
1057 1074
      * define the document information
1058 1075
      * @access private
1076
+     * @param integer $id
1059 1077
      */
1060 1078
     private function o_info($id, $action, $options = '')
1061 1079
     {
@@ -1102,6 +1120,8 @@  discard block
 block discarded – undo
1102 1120
     /**
1103 1121
      * an action object, used to link to URLS initially
1104 1122
      * @access private
1123
+     * @param integer $id
1124
+     * @param string $action
1105 1125
      */
1106 1126
     private function o_action($id, $action, $options = '')
1107 1127
     {
@@ -1147,6 +1167,8 @@  discard block
 block discarded – undo
1147 1167
      * an annotation object, this will add an annotation to the current page.
1148 1168
      * initially will support just link annotations
1149 1169
      * @access private
1170
+     * @param integer $id
1171
+     * @param string $action
1150 1172
      */
1151 1173
     private function o_annotation($id, $action, $options = '')
1152 1174
     {
@@ -1201,6 +1223,7 @@  discard block
 block discarded – undo
1201 1223
     /**
1202 1224
      * a page object, it also creates a contents object to hold its contents
1203 1225
      * @access private
1226
+     * @param string $action
1204 1227
      */
1205 1228
     private function o_page($id, $action, $options = '')
1206 1229
     {
@@ -1272,6 +1295,7 @@  discard block
 block discarded – undo
1272 1295
     /**
1273 1296
      * the contents objects hold all of the content which appears on pages
1274 1297
      * @access private
1298
+     * @param string $action
1275 1299
      */
1276 1300
     private function o_contents($id, $action, $options = '')
1277 1301
     {
@@ -1324,6 +1348,8 @@  discard block
 block discarded – undo
1324 1348
     /**
1325 1349
      * an image object, will be an XObject in the document, includes description and data
1326 1350
      * @access private
1351
+     * @param integer $id
1352
+     * @param string $action
1327 1353
      */
1328 1354
     private function o_image($id, $action, $options = '')
1329 1355
     {
@@ -1402,6 +1428,8 @@  discard block
 block discarded – undo
1402 1428
     /**
1403 1429
      * encryption object.
1404 1430
      * @access private
1431
+     * @param integer $id
1432
+     * @param string $action
1405 1433
      */
1406 1434
     private function o_encryption($id, $action, $options = '')
1407 1435
     {
@@ -1458,8 +1486,8 @@  discard block
 block discarded – undo
1458 1486
     
1459 1487
     /**
1460 1488
      * owner part of the encryption
1461
-     * @param $owner - owner password plus padding
1462
-     * @param $user - user password plus padding
1489
+     * @param string $owner - owner password plus padding
1490
+     * @param string $user - user password plus padding
1463 1491
      * @access private
1464 1492
      */
1465 1493
     private function encryptOwner($owner, $user)
@@ -1498,9 +1526,9 @@  discard block
 block discarded – undo
1498 1526
     /**
1499 1527
      *
1500 1528
      * user part of the encryption
1501
-     * @param $user - user password plus padding
1502
-     * @param $ownerDict - encrypted owner entry
1503
-     * @param $permissions - permission set (print, copy, modify, ...)
1529
+     * @param string $user - user password plus padding
1530
+     * @param string $ownerDict - encrypted owner entry
1531
+     * @param string $permissions - permission set (print, copy, modify, ...)
1504 1532
      */
1505 1533
     function encryptUser($user, $ownerDict, $permissions)
1506 1534
     {
@@ -1563,6 +1591,9 @@  discard block
 block discarded – undo
1563 1591
         return $hex;
1564 1592
     }
1565 1593
     
1594
+    /**
1595
+     * @param string $hex
1596
+     */
1566 1597
     protected function hexToStr($hex)
1567 1598
     {
1568 1599
         $str = '';
@@ -2005,7 +2036,7 @@  discard block
 block discarded – undo
2005 2036
      * @param string  $encoding Which encoding to use
2006 2037
      * @param integer $set      What is this
2007 2038
      *
2008
-     * @return void
2039
+     * @return integer
2009 2040
      * @access public
2010 2041
      */
2011 2042
     public function selectFont($fontName, $encoding = '', $set = 1, $subsetFont = false)
@@ -2331,6 +2362,11 @@  discard block
 block discarded – undo
2331 2362
     /**
2332 2363
      * draw a part of an ellipse
2333 2364
      * @access public
2365
+     * @param integer $x0
2366
+     * @param integer $y0
2367
+     * @param integer $astart
2368
+     * @param integer $afinish
2369
+     * @param integer $r1
2334 2370
      */
2335 2371
     public function partEllipse($x0, $y0, $astart, $afinish, $r1, $r2 = 0, $angle = 0, $nSeg = 8)
2336 2372
     {
@@ -2494,6 +2530,7 @@  discard block
 block discarded – undo
2494 2530
      * draw a rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not
2495 2531
      * the coordinates of the upper-right corner
2496 2532
      * @access public
2533
+     * @param integer $height
2497 2534
      */
2498 2535
     public function rectangle($x1, $y1, $width, $height)
2499 2536
     {
@@ -2593,6 +2630,7 @@  discard block
 block discarded – undo
2593 2630
     /**
2594 2631
      * return the height in units of the current font in the given size
2595 2632
      * @access public
2633
+     * @param integer $size
2596 2634
      */
2597 2635
     public function getFontHeight($size)
2598 2636
     {
@@ -2611,6 +2649,7 @@  discard block
 block discarded – undo
2611 2649
      * if you add this number to the baseline, you get the level of the bottom of the font
2612 2650
      * it is in the pdf user units
2613 2651
      * @access public
2652
+     * @param integer $size
2614 2653
      */
2615 2654
     public function getFontDecender($size)
2616 2655
     {
@@ -2775,6 +2814,8 @@  discard block
 block discarded – undo
2775 2814
      * on the page the text will end
2776 2815
      *
2777 2816
      * @access protected
2817
+     * @param integer $angle
2818
+     * @param integer $wa
2778 2819
      */
2779 2820
     protected function getTextPosition($x, $y, $angle, $size, $wa, $text)
2780 2821
     {
@@ -2792,6 +2833,7 @@  discard block
 block discarded – undo
2792 2833
      * wrapper function for checkTextDirective1
2793 2834
      *
2794 2835
      * @access private
2836
+     * @param integer $f
2795 2837
      */
2796 2838
     private function checkTextDirective(&$text, $i, &$f)
2797 2839
     {
@@ -2808,6 +2850,7 @@  discard block
 block discarded – undo
2808 2850
      * if the directive does not require a font change, then $f should be set to 0
2809 2851
      *
2810 2852
      * @access private
2853
+     * @param integer $final
2811 2854
      */
2812 2855
     private function checkTextDirective1(&$text, $i, &$f, $final, &$x, &$y, $size = 0, $angle = 0, $wordSpaceAdjust = 0)
2813 2856
     {
@@ -3132,6 +3175,8 @@  discard block
 block discarded – undo
3132 3175
      * do a part of the calculation for sorting out the justification of the text
3133 3176
      *
3134 3177
      * @access private
3178
+     * @param integer $adjust
3179
+     * @param string $justification
3135 3180
      */
3136 3181
     private function adjustWrapText($text, $actual, $width, &$x, &$adjust, $justification)
3137 3182
     {
@@ -3393,6 +3438,7 @@  discard block
 block discarded – undo
3393 3438
     /**
3394 3439
      * after an object has been created, it wil only show if it has been added, using this function.
3395 3440
      * @access public
3441
+     * @param integer $id
3396 3442
      */
3397 3443
     public function addObject($id, $options = 'add')
3398 3444
     {
@@ -3477,6 +3523,8 @@  discard block
 block discarded – undo
3477 3523
      * extract an integer from a position in a byte stream
3478 3524
      *
3479 3525
      * @access private
3526
+     * @param integer $pos
3527
+     * @param integer $num
3480 3528
      */
3481 3529
     private function getBytes(&$data, $pos, $num)
3482 3530
     {
@@ -3491,7 +3539,7 @@  discard block
 block discarded – undo
3491 3539
 
3492 3540
     /**
3493 3541
      * reads the PNG chunk
3494
-     * @param $data - binary part of the png image
3542
+     * @param string $data - binary part of the png image
3495 3543
      * @access private
3496 3544
      */
3497 3545
     private function readPngChunks(&$data)
@@ -3738,6 +3786,7 @@  discard block
 block discarded – undo
3738 3786
     /**
3739 3787
      * add a JPEG image into the document, from a file
3740 3788
      * @access public
3789
+     * @param string $img
3741 3790
      */
3742 3791
     public function addJpegFromFile($img, $x, $y, $w = 0, $h = 0)
3743 3792
     {
@@ -3870,6 +3919,7 @@  discard block
 block discarded – undo
3870 3919
     /**
3871 3920
      * common code used by the two JPEG adding functions
3872 3921
      * @access private
3922
+     * @param string $data
3873 3923
      */
3874 3924
     private function addJpegImage_common(&$data, $x, $y, $w = 0, $h = 0, $imageWidth, $imageHeight, $channels = 3)
3875 3925
     {
@@ -3955,6 +4005,7 @@  discard block
 block discarded – undo
3955 4005
     /**
3956 4006
      * used to add messages for use in debugging
3957 4007
      * @access protected
4008
+     * @param integer $error_type
3958 4009
      */
3959 4010
     protected function debug($message, $error_type = E_USER_NOTICE)
3960 4011
     {
Please login to merge, or discard this patch.
src/Intraface/ModuleHandler.php 1 patch
Doc Comments   +7 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,6 +39,9 @@  discard block
 block discarded – undo
39 39
         }
40 40
     }
41 41
 
42
+    /**
43
+     * @param string $module_name
44
+     */
42 45
     function setPrimaryModule($module_name)
43 46
     {
44 47
         if (!empty($this->primary_module_object) and is_object($this->primary_module_object)) {
@@ -169,8 +172,8 @@  discard block
 block discarded – undo
169 172
     /**
170 173
      * getModule()
171 174
      *
172
-     * @param string $module_name
173 175
      *
176
+     * @param string $name
174 177
      * @return object
175 178
      */
176 179
     function getModule($name)
@@ -250,6 +253,9 @@  discard block
 block discarded – undo
250 253
         return false;
251 254
     }
252 255
 
256
+    /**
257
+     * @param string $name
258
+     */
253 259
     private static function isValidModuleName($name)
254 260
     {
255 261
         return preg_match("/^[a-z0-9]+$/", $name);
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Account.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -450,7 +450,7 @@
 block discarded – undo
450 450
      * @param $date_from (date) yyyy-mm-dd Der s�ges jo kun i indev�rende �r
451 451
      * @param $date_to (date) yyyy-mm-dd   Der s�ges kun i indev�rende �r
452 452
      *
453
-     * @return (array) med debet, credit og total saldo
453
+     * @return boolean med debet, credit og total saldo
454 454
      *
455 455
      *
456 456
      *
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Post.php 1 patch
Doc Comments   +10 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,6 +36,9 @@  discard block
 block discarded – undo
36 36
         }
37 37
     }
38 38
 
39
+    /**
40
+     * @param integer $post_id
41
+     */
39 42
     public function factory($year, $post_id)
40 43
     {
41 44
         return Intraface_modules_accounting_PostGateway::getFromYearAndPostId($year, $post_id);
@@ -76,6 +79,13 @@  discard block
 block discarded – undo
76 79
         return 1;
77 80
     }
78 81
 
82
+    /**
83
+     * @param string $date
84
+     * @param integer $account_id
85
+     * @param string $text
86
+     * @param double $debet
87
+     * @param double $credit
88
+     */
79 89
     private function validate($date, $account_id, $text, $debet, $credit)
80 90
     {
81 91
         $validator = new Intraface_Validator($this->error);
@@ -99,9 +109,7 @@  discard block
 block discarded – undo
99 109
     /**
100 110
      * States the posts
101 111
      *
102
-     * @param integer $year_id
103 112
      * @param string  $date
104
-     * @param string  $voucher_number
105 113
      * @param string  $text
106 114
      * @param integer $account_id
107 115
      * @param float   $debet
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Voucher.php 1 patch
Doc Comments   +1 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,6 @@  discard block
 block discarded – undo
22 22
      * Constructor
23 23
      *
24 24
      * @param object  $year_object
25
-     * @param integer $post_id (optional)
26 25
      *
27 26
      * @return void
28 27
      */
@@ -45,7 +44,7 @@  discard block
 block discarded – undo
45 44
      * @param object $year
46 45
      * @param string $voucher_number
47 46
      *
48
-     * @return void
47
+     * @return Voucher
49 48
      */
50 49
     function factory($year, $voucher_number)
51 50
     {
@@ -339,9 +338,7 @@  discard block
 block discarded – undo
339 338
     /**
340 339
      * Prepares amounts for stating, e.g. whether the accounts needs vat calculations
341 340
      *
342
-     * @param integer $year_id
343 341
      * @param string  $date
344
-     * @param string  $voucher_number
345 342
      * @param string  $text
346 343
      * @param integer $account_id
347 344
      * @param float   $debet
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Year.php 1 patch
Doc Comments   +13 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     /**
44 44
      * Funktion til at sætte et regnskabsår, som brugeren redigerer i.
45 45
      *
46
-     * @return true
46
+     * @return boolean
47 47
      */
48 48
     function setYear()
49 49
     {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      *
86 86
      * @param boolean $redirect Set to true if a redirect should occur if no year isset
87 87
      *
88
-     * @return boolean
88
+     * @return null|boolean
89 89
      */
90 90
     function checkYear($redirect = true)
91 91
     {
@@ -439,11 +439,17 @@  discard block
 block discarded – undo
439 439
         return $this->kernel->getSetting()->set('intranet', 'accounting.'.$setting, $value, $this->get('id'));
440 440
     }
441 441
 
442
+    /**
443
+     * @param string $setting
444
+     */
442 445
     function getSetting($setting)
443 446
     {
444 447
         return $this->kernel->getSetting()->get('intranet', 'accounting.' . $setting, $this->get('id'));
445 448
     }
446 449
 
450
+    /**
451
+     * @param string $type
452
+     */
447 453
     function createAccounts($type, $last_year_id = 0)
448 454
     {
449 455
         if ($this->getId() == 0) {
@@ -742,7 +748,8 @@  discard block
 block discarded – undo
742 748
 
743 749
     /**
744 750
      * @param $from->year (object)
745
-     * @param $setting (string)
751
+     * @param string $setting (string)
752
+     * @param Year $from_year
746 753
      */
747 754
     function transferAccountSetting($from_year, $setting)
748 755
     {
@@ -874,6 +881,9 @@  discard block
 block discarded – undo
874 881
         return true;
875 882
     }
876 883
 
884
+    /**
885
+     * @return string
886
+     */
877 887
     public function getId()
878 888
     {
879 889
         return $this->get('id');
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/YearGateway.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -58,6 +58,9 @@
 block discarded – undo
58 58
         return $account_years;
59 59
     }
60 60
 
61
+    /**
62
+     * @param string $voucher_id
63
+     */
61 64
     function findByVoucherId($voucher_id)
62 65
     {
63 66
         $sql = "SELECT id FROM accounting_voucher
Please login to merge, or discard this patch.
src/Intraface/modules/cms/CKEditor.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -468,6 +468,7 @@
 block discarded – undo
468 468
 
469 469
     /**
470 470
      * Return path to ckeditor.js.
471
+     * @return string
471 472
      */
472 473
     private function ckeditorPath()
473 474
     {
Please login to merge, or discard this patch.