Passed
Push — v3.0 ( 7b2427...598da8 )
by Samir
23:40 queued 09:48
created
astpp/application/libraries/html2pdf/_tcpdf_5.0.002/qrcode.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1123,7 +1123,7 @@  discard block
 block discarded – undo
1123 1123
 		 * @param array $frame
1124 1124
 		 * @param int $maskNo
1125 1125
 		 * @param int $level
1126
-		 * @return array mask
1126
+		 * @return integer mask
1127 1127
 		 */
1128 1128
 		 protected function makeMask($width, $frame, $maskNo, $level) {
1129 1129
 			$masked = array_fill(0, $width, str_repeat("\0", $width));
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 		/**
1166 1166
 		 * evaluateSymbol
1167 1167
 		 * @param int $width
1168
-		 * @param array $frame
1168
+		 * @param integer $frame
1169 1169
 		 * @return int demerit
1170 1170
 		 */
1171 1171
 		 protected function evaluateSymbol($width, $frame) {
@@ -2035,7 +2035,7 @@  discard block
 block discarded – undo
2035 2035
 
2036 2036
 		/**
2037 2037
 		 * convertData
2038
-		 * @param array $items
2038
+		 * @param integer $items
2039 2039
 		 * @return array items
2040 2040
 		 */
2041 2041
 		 protected function convertData($items) {
@@ -2490,7 +2490,7 @@  discard block
 block discarded – undo
2490 2490
 
2491 2491
 		/**
2492 2492
 		 * Return BCH encoded format information pattern.
2493
-		 * @param array $mask
2493
+		 * @param integer $mask
2494 2494
 		 * @param int $level error correction level
2495 2495
 		 * @return BCH encoded format information pattern
2496 2496
 		 */
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -264,12 +264,12 @@
 block discarded – undo
264 264
 
265 265
 	// for compaibility with PHP4
266 266
 	if (!function_exists('str_split')) {
267
-    	/**
268
-    	 * Convert a string to an array (needed for PHP4 compatibility)
269
-    	 * @param string $string The input string.
270
-    	 * @param int $split_length Maximum length of the chunk.
271
-    	 * @return  string[] the optional split_length  parameter is specified, the returned array will be broken down into chunks with each being split_length  in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element.
272
-    	 */
267
+		/**
268
+		 * Convert a string to an array (needed for PHP4 compatibility)
269
+		 * @param string $string The input string.
270
+		 * @param int $split_length Maximum length of the chunk.
271
+		 * @return  string[] the optional split_length  parameter is specified, the returned array will be broken down into chunks with each being split_length  in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element.
272
+		 */
273 273
 		function str_split($string, $split_length=1) {
274 274
 			if ((strlen($string) > $split_length) OR (!$split_length)) {
275 275
 				do {
Please login to merge, or discard this patch.
web_interface/astpp/system/database/DB_result.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -64,6 +64,7 @@
 block discarded – undo
64 64
 	 * Custom query result.
65 65
 	 *
66 66
 	 * @param class_name A string that represents the type of object you want back
67
+	 * @param string $class_name
67 68
 	 * @return array of objects
68 69
 	 */
69 70
 	public function custom_result_object($class_name)
Please login to merge, or discard this patch.
web_interface/astpp/system/database/drivers/sqlsrv/sqlsrv_driver.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -164,6 +164,7 @@
 block discarded – undo
164 164
 	 *
165 165
 	 * @access	private called by execute()
166 166
 	 * @param	string	an SQL query
167
+	 * @param string $sql
167 168
 	 * @return	string
168 169
 	 */
169 170
 	function _prep_query($sql)
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -295,15 +295,15 @@
 block discarded – undo
295 295
 	// --------------------------------------------------------------------
296 296
 
297 297
 	/**
298
-	* Parse major version
299
-	*
300
-	* Grabs the major version number from the
301
-	* database server version string passed in.
302
-	*
303
-	* @access private
304
-	* @param string $version
305
-	* @return string major version number
306
-	*/
298
+	 * Parse major version
299
+	 *
300
+	 * Grabs the major version number from the
301
+	 * database server version string passed in.
302
+	 *
303
+	 * @access private
304
+	 * @param string $version
305
+	 * @return string major version number
306
+	 */
307 307
 	function _parse_major_version($version)
308 308
 	{
309 309
 		preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $ver_info);
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/Encrypt.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -293,6 +293,8 @@  discard block
 block discarded – undo
293 293
 	 * @access	private
294 294
 	 * @param	string
295 295
 	 * @param	string
296
+	 * @param string $string
297
+	 * @param string $key
296 298
 	 * @return	string
297 299
 	 */
298 300
 	function _xor_merge($string, $key)
@@ -365,6 +367,7 @@  discard block
 block discarded – undo
365 367
 	 * @param	string
366 368
 	 * @param	string
367 369
 	 * @param string $data
370
+	 * @param string $key
368 371
 	 * @return	string
369 372
 	 */
370 373
 	function _add_cipher_noise($data, $key)
@@ -396,6 +399,8 @@  discard block
 block discarded – undo
396 399
 	 *
397 400
 	 * @access	public
398 401
 	 * @param	type
402
+	 * @param string $data
403
+	 * @param string $key
399 404
 	 * @return	string
400 405
 	 */
401 406
 	function _remove_cipher_noise($data, $key)
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/Fpdf.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -1010,6 +1010,9 @@
 block discarded – undo
1010 1010
 	return $this->x;
1011 1011
 }
1012 1012
 
1013
+/**
1014
+ * @param integer $x
1015
+ */
1013 1016
 function SetX($x)
1014 1017
 {
1015 1018
 	// Set x position
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/Ftp.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -461,6 +461,7 @@
 block discarded – undo
461 461
 	 * @param	string	the file path
462 462
 	 * @param	string	the permissions
463 463
 	 * @param integer $perm
464
+	 * @param string $path
464 465
 	 * @return	bool
465 466
 	 */
466 467
 	function chmod($path, $perm)
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/Sha1.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -227,6 +227,7 @@
 block discarded – undo
227 227
 	 *
228 228
 	 * @access	private
229 229
 	 * @return	string
230
+	 * @param integer $b
230 231
 	 */
231 232
 	function _zero_fill($a, $b)
232 233
 	{
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/Xmlrpc.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -381,6 +381,9 @@
 block discarded – undo
381 381
 		return $this->sendPayload($msg);
382 382
 	}
383 383
 
384
+	/**
385
+	 * @param XML_RPC_Message $msg
386
+	 */
384 387
 	function sendPayload($msg)
385 388
 	{
386 389
 		$fp = @fsockopen($this->server, $this->port, $this->errno, $this->errstr, $this->timeout);
Please login to merge, or discard this patch.
web_interface/astpp/application/models/astpp_common.php 1 patch
Indentation   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -22,133 +22,133 @@
 block discarded – undo
22 22
 ###############################################################################
23 23
 
24 24
 class Astpp_common extends CI_Model {
25
-    // ------------------------------------------------------------------------
26
-    /**
27
-     * initialises the class inheriting the methods of the class Model 
28
-     *
29
-     * @return Usermodel
30
-     */
31
-    function Astpp_common() {
32
-        parent::__construct();
33
-    }
34
-    /**
35
-     * -------Here we write code for model astpp_common_model functions list_applyable_charges------
36
-     * Purpose: build array for applyable charge dropdown list.
37
-     * @param 
38
-     * @return return array of applyable chargelist.
39
-     */
40
-    function list_applyable_charges($accountid = '') {
41
-        $accountinfo = $this->session->userdata('accountinfo');
42
-        $reseller_id = $accountinfo['type'] == 1 ? $accountinfo['id'] : 0;
25
+	// ------------------------------------------------------------------------
26
+	/**
27
+	 * initialises the class inheriting the methods of the class Model 
28
+	 *
29
+	 * @return Usermodel
30
+	 */
31
+	function Astpp_common() {
32
+		parent::__construct();
33
+	}
34
+	/**
35
+	 * -------Here we write code for model astpp_common_model functions list_applyable_charges------
36
+	 * Purpose: build array for applyable charge dropdown list.
37
+	 * @param 
38
+	 * @return return array of applyable chargelist.
39
+	 */
40
+	function list_applyable_charges($accountid = '') {
41
+		$accountinfo = $this->session->userdata('accountinfo');
42
+		$reseller_id = $accountinfo['type'] == 1 ? $accountinfo['id'] : 0;
43 43
 	$q = " SELECT * FROM `charges` where reseller_id =$reseller_id and id NOT IN(select charge_id from charge_to_account where accountid  =$accountid) AND pricelist_id = '0'";
44
-        $item_arr = array();
45
-        $query = $this->db->query($q);
46
-        if ($query->num_rows() > 0) {
47
-            foreach ($query->result_array() as $row) {
48
-                if ($row['charge'] > 0) {
49
-                    $row['charge'] = $this->common_model->calculate_currency($row['charge']);
50
-                }
51
-                $item_arr[$row['id']] = $row['description'].' - '.$row['charge'];
52
-            }
53
-        }
54
-        return $item_arr;
55
-    }
56
-    function quote($inp) {
57
-        return "'".$this->db->escape_str($inp)."'";
58
-    }
44
+		$item_arr = array();
45
+		$query = $this->db->query($q);
46
+		if ($query->num_rows() > 0) {
47
+			foreach ($query->result_array() as $row) {
48
+				if ($row['charge'] > 0) {
49
+					$row['charge'] = $this->common_model->calculate_currency($row['charge']);
50
+				}
51
+				$item_arr[$row['id']] = $row['description'].' - '.$row['charge'];
52
+			}
53
+		}
54
+		return $item_arr;
55
+	}
56
+	function quote($inp) {
57
+		return "'".$this->db->escape_str($inp)."'";
58
+	}
59 59
 
60
-    /**
61
-     * @param string $q
62
-     * @param string $colname
63
-     */
64
-    function db_get_item($q, $colname) {
65
-        $item_arr = array();
66
-        $query = $this->db->query($q);
67
-        if ($query->num_rows() > 0) {
68
-            $row = $query->row_array();
69
-            return $row[$colname];
70
-        }
71
-        return '';
72
-    }
73
-    // Return the balance for a specific ASTPP account.
74
-    function accountbalance($account) {
75
-        $debit = 0;
76
-        $q = "SELECT SUM(debit) as val1 FROM cdrs WHERE accountid=".$this->quote($account)." AND status NOT IN (1, 2)";
77
-        $query = $this->db->query($q);
78
-        if ($query->num_rows() > 0) {
79
-            $row = $query->row_array();
80
-            $debit = $row['val1'];
81
-        }
82
-        $credit = 0;
83
-        $q = "SELECT SUM(credit) as val1  FROM cdrs WHERE accountid= ".$this->quote($account)." AND status NOT IN (1, 2)";
84
-        $query = $this->db->query($q);
85
-        if ($query->num_rows() > 0) {
86
-            $row = $query->row_array();
87
-            $credit = $row['val1'];
88
-        }
89
-        $posted_balance = 0;
90
-        $q = "SELECT * FROM accounts WHERE id = ".$this->quote($account);
91
-        $query = $this->db->query($q);
92
-        if ($query->num_rows() > 0) {
93
-            $row = $query->row_array();
94
-            $posted_balance = $row['balance'];
95
-        }
96
-        $balance = ($debit - $credit + $posted_balance);
97
-        return $balance;
98
-    }
99
-    function accounts_total_balance($reseller) {
100
-        $debit = 0;
101
-        $credit = 0;
102
-        if ($reseller == "") {
103
-            $q = "SELECT SUM(debit) as val1 FROM cdrs WHERE status NOT IN (1, 2)";
104
-            $debit = $this->db_get_item($q, 'val1');
60
+	/**
61
+	 * @param string $q
62
+	 * @param string $colname
63
+	 */
64
+	function db_get_item($q, $colname) {
65
+		$item_arr = array();
66
+		$query = $this->db->query($q);
67
+		if ($query->num_rows() > 0) {
68
+			$row = $query->row_array();
69
+			return $row[$colname];
70
+		}
71
+		return '';
72
+	}
73
+	// Return the balance for a specific ASTPP account.
74
+	function accountbalance($account) {
75
+		$debit = 0;
76
+		$q = "SELECT SUM(debit) as val1 FROM cdrs WHERE accountid=".$this->quote($account)." AND status NOT IN (1, 2)";
77
+		$query = $this->db->query($q);
78
+		if ($query->num_rows() > 0) {
79
+			$row = $query->row_array();
80
+			$debit = $row['val1'];
81
+		}
82
+		$credit = 0;
83
+		$q = "SELECT SUM(credit) as val1  FROM cdrs WHERE accountid= ".$this->quote($account)." AND status NOT IN (1, 2)";
84
+		$query = $this->db->query($q);
85
+		if ($query->num_rows() > 0) {
86
+			$row = $query->row_array();
87
+			$credit = $row['val1'];
88
+		}
89
+		$posted_balance = 0;
90
+		$q = "SELECT * FROM accounts WHERE id = ".$this->quote($account);
91
+		$query = $this->db->query($q);
92
+		if ($query->num_rows() > 0) {
93
+			$row = $query->row_array();
94
+			$posted_balance = $row['balance'];
95
+		}
96
+		$balance = ($debit - $credit + $posted_balance);
97
+		return $balance;
98
+	}
99
+	function accounts_total_balance($reseller) {
100
+		$debit = 0;
101
+		$credit = 0;
102
+		if ($reseller == "") {
103
+			$q = "SELECT SUM(debit) as val1 FROM cdrs WHERE status NOT IN (1, 2)";
104
+			$debit = $this->db_get_item($q, 'val1');
105 105
 
106
-            $q = "SELECT SUM(credit)  as val1 FROM cdrs WHERE status NOT IN (1, 2)";
107
-            $credit = $this->db_get_item($q, 'val1');
106
+			$q = "SELECT SUM(credit)  as val1 FROM cdrs WHERE status NOT IN (1, 2)";
107
+			$credit = $this->db_get_item($q, 'val1');
108 108
 
109
-            $tmp = "SELECT SUM(balance) as val1 FROM accounts WHERE reseller_id = ''";
110
-        } else {
111
-            $tmp = "SELECT SUM(balance) as val1 FROM accounts WHERE reseller_id = ".$this->quote($reseller);
112
-        }
113
-        $posted_balance = $this->db_get_item($tmp, "val1");
109
+			$tmp = "SELECT SUM(balance) as val1 FROM accounts WHERE reseller_id = ''";
110
+		} else {
111
+			$tmp = "SELECT SUM(balance) as val1 FROM accounts WHERE reseller_id = ".$this->quote($reseller);
112
+		}
113
+		$posted_balance = $this->db_get_item($tmp, "val1");
114 114
 
115
-        $balance = ($debit - $credit + $posted_balance);
116
-        return $balance;
117
-    }
118
-    function count_dids($test) {
119
-        $tmp = "SELECT COUNT(*) as val1 FROM dids ".$test;
120
-        return $this->db_get_item($tmp, 'val1');
121
-    }
115
+		$balance = ($debit - $credit + $posted_balance);
116
+		return $balance;
117
+	}
118
+	function count_dids($test) {
119
+		$tmp = "SELECT COUNT(*) as val1 FROM dids ".$test;
120
+		return $this->db_get_item($tmp, 'val1');
121
+	}
122 122
 
123
-    function count_callingcards($where, $field = 'COUNT(*)') {
124
-        $tmp = "SELECT $field as val FROM callingcards ".$where;
125
-        return $this->db_get_item($tmp, 'val');
126
-    }
123
+	function count_callingcards($where, $field = 'COUNT(*)') {
124
+		$tmp = "SELECT $field as val FROM callingcards ".$where;
125
+		return $this->db_get_item($tmp, 'val');
126
+	}
127 127
 
128
-    function count_accounts($test) {
129
-        $tmp = "SELECT COUNT(*) as val1 FROM accounts ".$test;
130
-        return $this->db_get_item($tmp, 'val1');
131
-    }
128
+	function count_accounts($test) {
129
+		$tmp = "SELECT COUNT(*) as val1 FROM accounts ".$test;
130
+		return $this->db_get_item($tmp, 'val1');
131
+	}
132 132
 
133
-    function count_rategroup($test) {
133
+	function count_rategroup($test) {
134 134
 	 $tmp = "SELECT COUNT(*) as val1 FROM pricelists ".$test;
135
-        return $this->db_get_item($tmp, 'val1');
136
-    }
135
+		return $this->db_get_item($tmp, 'val1');
136
+	}
137 137
 
138
-    function count_termination($test = '') {
138
+	function count_termination($test = '') {
139 139
 	 $tmp = "SELECT COUNT(*) as val1 FROM outbound_routes ".$test;
140
-        return $this->db_get_item($tmp, 'val1');
141
-    }
140
+		return $this->db_get_item($tmp, 'val1');
141
+	}
142 142
 
143
-    function count_trunk($test = '') {
143
+	function count_trunk($test = '') {
144 144
 	 $tmp = "SELECT COUNT(*) as val1 FROM trunks ".$test;
145
-        return $this->db_get_item($tmp, 'val1');
146
-    }
145
+		return $this->db_get_item($tmp, 'val1');
146
+	}
147 147
 
148
-    function count_origination($test = '') {
148
+	function count_origination($test = '') {
149 149
 	 $tmp = "SELECT COUNT(*) as val1 FROM routes ".$test;
150
-        return $this->db_get_item($tmp, 'val1');
151
-    }
150
+		return $this->db_get_item($tmp, 'val1');
151
+	}
152 152
 
153 153
 } 
154 154
 ?>
Please login to merge, or discard this patch.