@@ -43,6 +43,10 @@ |
||
43 | 43 | public function setSmarty($smarty) { |
44 | 44 | $this->smarty = $smarty; |
45 | 45 | } |
46 | + |
|
47 | + /** |
|
48 | + * @param User $user |
|
49 | + */ |
|
46 | 50 | public function setUser($user) { |
47 | 51 | $this->user = $user; |
48 | 52 | } |
@@ -68,11 +68,7 @@ |
||
68 | 68 | /** |
69 | 69 | * We fill our data array here |
70 | 70 | * @param string $msg Debug Message |
71 | - * @param string $file [optional] File name |
|
72 | - * @param integer $line [optional] Line inside the $file |
|
73 | 71 | * @param integer $debug [optional] Debugging level, default 1 |
74 | - * @param string $class [optional] Class this is called from |
|
75 | - * @param string $method [optional] Method this is called from |
|
76 | 72 | * @return none |
77 | 73 | */ |
78 | 74 | function append($msg, $debug=1) { |
@@ -137,6 +137,9 @@ |
||
137 | 137 | |
138 | 138 | } |
139 | 139 | |
140 | + /** |
|
141 | + * @param string $path |
|
142 | + */ |
|
140 | 143 | private function _getTemplatesTreeRecursive($path) { |
141 | 144 | if( !is_dir($path) ) { |
142 | 145 | return preg_match("/\.tpl$/", $path); |
@@ -394,6 +394,10 @@ |
||
394 | 394 | public function createDebitAPRecord($account_id, $coin_address, $amount) { |
395 | 395 | return $this->createDebitRecord($account_id, $coin_address, $amount, 'Debit_AP'); |
396 | 396 | } |
397 | + |
|
398 | + /** |
|
399 | + * @param string $type |
|
400 | + */ |
|
397 | 401 | private function createDebitRecord($account_id, $coin_address, $amount, $type) { |
398 | 402 | // Calculate and deduct txfee from amount |
399 | 403 | $type == 'Debit_MP' ? $txfee = $this->config['txfee_manual'] : $txfee = $this->config['txfee_auto']; |
@@ -34,6 +34,10 @@ discard block |
||
34 | 34 | public function getUserNameAnon($id) { |
35 | 35 | return $this->getSingle($id, 'is_anonymous', 'id'); |
36 | 36 | } |
37 | + |
|
38 | + /** |
|
39 | + * @param string $email |
|
40 | + */ |
|
37 | 41 | public function getUserNameByEmail($email) { |
38 | 42 | return $this->getSingle($email, 'username', 'email', 's'); |
39 | 43 | } |
@@ -46,12 +50,20 @@ discard block |
||
46 | 50 | public function getUserEmail($username, $lower=false) { |
47 | 51 | return $this->getSingle($username, 'email', 'username', 's', $lower); |
48 | 52 | } |
53 | + |
|
54 | + /** |
|
55 | + * @param integer $id |
|
56 | + */ |
|
49 | 57 | public function getUserEmailById($id) { |
50 | 58 | return $this->getSingle($id, 'email', 'id', 'i'); |
51 | 59 | } |
52 | 60 | public function getUserPasswordHashById($id) { |
53 | 61 | return $this->getSingle($id, 'pass', 'id', 'i'); |
54 | 62 | } |
63 | + |
|
64 | + /** |
|
65 | + * @param integer $id |
|
66 | + */ |
|
55 | 67 | public function getUserPinHashById($id) { |
56 | 68 | return $this->getSingle($id, 'pin', 'id', 'i'); |
57 | 69 | } |
@@ -73,6 +85,10 @@ discard block |
||
73 | 85 | public function getLastLogin($id) { |
74 | 86 | return $this->getSingle($id, 'last_login', 'id'); |
75 | 87 | } |
88 | + |
|
89 | + /** |
|
90 | + * @param string $email |
|
91 | + */ |
|
76 | 92 | public function getEmail($email) { |
77 | 93 | return $this->getSingle($email, 'email', 'email', 's'); |
78 | 94 | } |
@@ -99,6 +115,10 @@ discard block |
||
99 | 115 | $this->log->log("warn", $this->getUserName($id)." changed no_fees to ".$this->isNoFee($id)); |
100 | 116 | return $this->updateSingle($id, $field); |
101 | 117 | } |
118 | + |
|
119 | + /** |
|
120 | + * @param integer $value |
|
121 | + */ |
|
102 | 122 | public function setLocked($id, $value) { |
103 | 123 | $field = array('name' => 'is_locked', 'type' => 'i', 'value' => $value); |
104 | 124 | $this->log->log("warn", $this->getUserName($id)." changed is_locked to $value"); |
@@ -113,6 +133,11 @@ discard block |
||
113 | 133 | $field = array( 'name' => 'failed_logins', 'type' => 'i', 'value' => $value); |
114 | 134 | return $this->updateSingle($id, $field); |
115 | 135 | } |
136 | + |
|
137 | + /** |
|
138 | + * @param integer $id |
|
139 | + * @param integer $value |
|
140 | + */ |
|
116 | 141 | public function setUserPinFailed($id, $value) { |
117 | 142 | $field = array( 'name' => 'failed_pins', 'type' => 'i', 'value' => $value); |
118 | 143 | return $this->updateSingle($id, $field); |
@@ -121,6 +146,10 @@ discard block |
||
121 | 146 | $field = array( 'name' => 'failed_logins', 'type' => 'i', 'value' => $this->getUserFailed($id) + 1); |
122 | 147 | return $this->updateSingle($id, $field); |
123 | 148 | } |
149 | + |
|
150 | + /** |
|
151 | + * @param integer $id |
|
152 | + */ |
|
124 | 153 | private function incUserPinFailed($id) { |
125 | 154 | $field = array( 'name' => 'failed_pins', 'type' => 'i', 'value' => $this->getUserPinFailed($id) + 1); |
126 | 155 | return $this->updateSingle($id, $field); |
@@ -694,7 +723,7 @@ discard block |
||
694 | 723 | |
695 | 724 | /** |
696 | 725 | * Fetch this classes table name |
697 | - * @return table string This classes table name |
|
726 | + * @return string string This classes table name |
|
698 | 727 | **/ |
699 | 728 | public function getTableName() { |
700 | 729 | $this->debug->append("STA " . __METHOD__, 4); |
@@ -2,6 +2,9 @@ |
||
2 | 2 | class PushNotification extends Base { |
3 | 3 | var $tableSettings = 'push_notification_settings'; |
4 | 4 | |
5 | + /** |
|
6 | + * @param string $file |
|
7 | + */ |
|
5 | 8 | private static function getClassesInFile($file){ |
6 | 9 | $classes = array(); |
7 | 10 | $tokens = token_get_all(file_get_contents($file)); |
@@ -8,6 +8,9 @@ |
||
8 | 8 | protected $account_id = null; |
9 | 9 | private $__lazyWrite; |
10 | 10 | |
11 | + /** |
|
12 | + * @param integer $account_id |
|
13 | + */ |
|
11 | 14 | public function __construct($account_id, $lazy_write = true){ |
12 | 15 | $this->account_id = $account_id; |
13 | 16 | $this->__lazyWrite = $lazy_write; |
@@ -71,7 +71,7 @@ |
||
71 | 71 | * @param account_id integer Account ID to bind the invitation to |
72 | 72 | * @param email string Email address the invite was sent to |
73 | 73 | * @param token_id integer Token ID used during invitation |
74 | - * @return bool boolean True of false |
|
74 | + * @return boolean|null boolean True of false |
|
75 | 75 | **/ |
76 | 76 | public function createInvitation($account_id, $email, $token_id) { |
77 | 77 | $this->debug->append("STA " . __METHOD__, 4); |
@@ -78,6 +78,7 @@ |
||
78 | 78 | * Insert or update a setting |
79 | 79 | * @param name string Name of the variable |
80 | 80 | * @param value string Variable value |
81 | + * @param string $type |
|
81 | 82 | * @return bool |
82 | 83 | **/ |
83 | 84 | public function setStatus($name, $type, $value) { |