@@ -30,7 +30,7 @@ |
||
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * |
| 33 | - * @param $slug |
|
| 33 | + * @param string $slug |
|
| 34 | 34 | * @return bool|ProductModel |
| 35 | 35 | */ |
| 36 | 36 | public static function fromSlug($slug) |
@@ -488,6 +488,9 @@ |
||
| 488 | 488 | return $this->redirect('shop/cart'); |
| 489 | 489 | } |
| 490 | 490 | |
| 491 | + /** |
|
| 492 | + * @param string $subject |
|
| 493 | + */ |
|
| 491 | 494 | public function mailUpdateAdmin(TransactionModel $transaction, $subject = null) |
| 492 | 495 | { |
| 493 | 496 | $recipient = Config::get('email'); |
@@ -46,6 +46,9 @@ |
||
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | + /** |
|
| 50 | + * @param string $fieldName |
|
| 51 | + */ |
|
| 49 | 52 | private function saveFileFromWeb($fieldName) |
| 50 | 53 | { |
| 51 | 54 | if ($this->has($fieldName) && |
@@ -26,6 +26,9 @@ discard block |
||
| 26 | 26 | return self::$_user; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | + /** |
|
| 30 | + * @return callable |
|
| 31 | + */ |
|
| 29 | 32 | private static function getUserId() |
| 30 | 33 | { |
| 31 | 34 | $user = self::getUser(); |
@@ -55,7 +58,7 @@ discard block |
||
| 55 | 58 | } |
| 56 | 59 | |
| 57 | 60 | /** |
| 58 | - * @return AclCollection |
|
| 61 | + * @return AclModel |
|
| 59 | 62 | */ |
| 60 | 63 | private static function getAclModel() |
| 61 | 64 | { |
@@ -90,6 +93,9 @@ discard block |
||
| 90 | 93 | return false; |
| 91 | 94 | } |
| 92 | 95 | |
| 96 | + /** |
|
| 97 | + * @param string $entity |
|
| 98 | + */ |
|
| 93 | 99 | public static function removePermission( |
| 94 | 100 | $usergroup, |
| 95 | 101 | $entity, |
@@ -117,6 +123,9 @@ discard block |
||
| 117 | 123 | return $success == true; |
| 118 | 124 | } |
| 119 | 125 | |
| 126 | + /** |
|
| 127 | + * @param string $entity |
|
| 128 | + */ |
|
| 120 | 129 | public static function addPermission($permission, $entity, $usergroup, $module, $action = '*', $extra = '*') |
| 121 | 130 | { |
| 122 | 131 | $acl = self::getAclModel(); |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @param bool $clean |
| 24 | - * @return bool |
|
| 24 | + * @return boolean|null |
|
| 25 | 25 | */ |
| 26 | 26 | private function validateModels($clean = true) |
| 27 | 27 | { |
@@ -2,6 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | class Ajde_Component_Embed extends Ajde_Component |
| 4 | 4 | { |
| 5 | + /** |
|
| 6 | + * @param string $attributes |
|
| 7 | + */ |
|
| 5 | 8 | public static function processStatic(Ajde_Template_Parser $parser, $attributes) |
| 6 | 9 | { |
| 7 | 10 | $instance = new self($parser, $attributes); |
@@ -14,6 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Save the file to the specified path |
| 16 | 16 | * |
| 17 | + * @param string $path |
|
| 17 | 18 | * @return boolean TRUE on success |
| 18 | 19 | */ |
| 19 | 20 | function save($path) |
@@ -35,6 +36,9 @@ discard block |
||
| 35 | 36 | return true; |
| 36 | 37 | } |
| 37 | 38 | |
| 39 | + /** |
|
| 40 | + * @return string |
|
| 41 | + */ |
|
| 38 | 42 | function getName() |
| 39 | 43 | { |
| 40 | 44 | return $_GET['qqfile']; |
@@ -58,6 +62,7 @@ discard block |
||
| 58 | 62 | /** |
| 59 | 63 | * Save the file to the specified path |
| 60 | 64 | * |
| 65 | + * @param string $path |
|
| 61 | 66 | * @return boolean TRUE on success |
| 62 | 67 | */ |
| 63 | 68 | function save($path) |
@@ -69,6 +74,9 @@ discard block |
||
| 69 | 74 | return true; |
| 70 | 75 | } |
| 71 | 76 | |
| 77 | + /** |
|
| 78 | + * @return string |
|
| 79 | + */ |
|
| 72 | 80 | function getName() |
| 73 | 81 | { |
| 74 | 82 | return $_FILES['qqfile']['name']; |
@@ -115,6 +123,9 @@ discard block |
||
| 115 | 123 | } |
| 116 | 124 | } |
| 117 | 125 | |
| 126 | + /** |
|
| 127 | + * @param string $str |
|
| 128 | + */ |
|
| 118 | 129 | private function toBytes($str) |
| 119 | 130 | { |
| 120 | 131 | $val = trim($str); |
@@ -54,6 +54,10 @@ |
||
| 54 | 54 | throw new Ajde_Component_Exception('Missing required attributes for component call'); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | + /** |
|
| 58 | + * @param integer $width |
|
| 59 | + * @param integer $height |
|
| 60 | + */ |
|
| 57 | 61 | public static function getImageTag( |
| 58 | 62 | $filename, |
| 59 | 63 | $width = null, |
@@ -113,6 +113,9 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | class FineDiffInsertOp extends FineDiffOp |
| 115 | 115 | { |
| 116 | + /** |
|
| 117 | + * @param string $text |
|
| 118 | + */ |
|
| 116 | 119 | public function __construct($text) |
| 117 | 120 | { |
| 118 | 121 | $this->text = $text; |
@@ -146,12 +149,18 @@ discard block |
||
| 146 | 149 | |
| 147 | 150 | class FineDiffReplaceOp extends FineDiffOp |
| 148 | 151 | { |
| 152 | + /** |
|
| 153 | + * @param string $text |
|
| 154 | + */ |
|
| 149 | 155 | public function __construct($fromLen, $text) |
| 150 | 156 | { |
| 151 | 157 | $this->fromLen = $fromLen; |
| 152 | 158 | $this->text = $text; |
| 153 | 159 | } |
| 154 | 160 | |
| 161 | + /** |
|
| 162 | + * @return integer|null |
|
| 163 | + */ |
|
| 155 | 164 | public function getFromLen() |
| 156 | 165 | { |
| 157 | 166 | return $this->fromLen; |
@@ -430,6 +439,8 @@ discard block |
||
| 430 | 439 | |
| 431 | 440 | /** |
| 432 | 441 | * Entry point to compute the diff. |
| 442 | + * @param string $from_text |
|
| 443 | + * @param string $to_text |
|
| 433 | 444 | */ |
| 434 | 445 | private function doDiff($from_text, $to_text) |
| 435 | 446 | { |
@@ -759,6 +770,10 @@ discard block |
||
| 759 | 770 | } |
| 760 | 771 | } |
| 761 | 772 | |
| 773 | + /** |
|
| 774 | + * @param string $opcode |
|
| 775 | + * @param integer $from_offset |
|
| 776 | + */ |
|
| 762 | 777 | private static function renderDiffToHTMLFromOpcode($opcode, $from, $from_offset, $from_len) |
| 763 | 778 | { |
| 764 | 779 | if ($opcode === 'c') { |