@@ -24,12 +24,13 @@ |
||
24 | 24 | $downloadType = $recordInstance->get('filelocationtype'); |
25 | 25 | if ($downloadType == 'I') { |
26 | 26 | $filesize = $value; |
27 | - if ($filesize < 1024) |
|
28 | - $value = $filesize . ' B'; |
|
29 | - elseif ($filesize > 1024 && $filesize < 1048576) |
|
30 | - $value = round($filesize / 1024, 2) . ' KB'; |
|
31 | - else if ($filesize > 1048576) |
|
32 | - $value = round($filesize / (1024 * 1024), 2) . ' MB'; |
|
27 | + if ($filesize < 1024) { |
|
28 | + $value = $filesize . ' B'; |
|
29 | + } elseif ($filesize > 1024 && $filesize < 1048576) { |
|
30 | + $value = round($filesize / 1024, 2) . ' KB'; |
|
31 | + } else if ($filesize > 1048576) { |
|
32 | + $value = round($filesize / (1024 * 1024), 2) . ' MB'; |
|
33 | + } |
|
33 | 34 | } else { |
34 | 35 | $value = ' --'; |
35 | 36 | } |
@@ -133,8 +133,9 @@ |
||
133 | 133 | */ |
134 | 134 | public static function getInstanceById($userId, $module = null) |
135 | 135 | { |
136 | - if (empty($userId)) |
|
137 | - return null; |
|
136 | + if (empty($userId)) { |
|
137 | + return null; |
|
138 | + } |
|
138 | 139 | |
139 | 140 | if (isset(self::$userPrivilegesModelCache[$userId])) { |
140 | 141 | return self::$userPrivilegesModelCache[$userId]; |
@@ -94,7 +94,6 @@ discard block |
||
94 | 94 | |
95 | 95 | /** |
96 | 96 | * Function to check whether the user has access to the specified action/operation on a given module by tabid |
97 | - * @param <Number> $tabId |
|
98 | 97 | * @param <String/Number> $action |
99 | 98 | * @return boolean true/false |
100 | 99 | */ |
@@ -112,7 +111,7 @@ discard block |
||
112 | 111 | /** |
113 | 112 | * Static Function to get the instance of the User Privileges model from the given list of key-value array |
114 | 113 | * @param <Array> $valueMap |
115 | - * @return Users_Privilege_Model object |
|
114 | + * @return Users_Privileges_Model object |
|
116 | 115 | */ |
117 | 116 | public static function getInstance($valueMap) |
118 | 117 | { |
@@ -187,6 +186,9 @@ discard block |
||
187 | 186 | |
188 | 187 | protected static $lockEditCache = []; |
189 | 188 | |
189 | + /** |
|
190 | + * @param string $moduleName |
|
191 | + */ |
|
190 | 192 | public static function checkLockEdit($moduleName, Vtiger_Record_Model $recordModel) |
191 | 193 | { |
192 | 194 | $recordId = $recordModel->getId(); |
@@ -273,6 +275,8 @@ discard block |
||
273 | 275 | |
274 | 276 | /** |
275 | 277 | * Function to get set Shared Owner Recursively |
278 | + * @param integer $recordId |
|
279 | + * @param string $moduleName |
|
276 | 280 | */ |
277 | 281 | public static function getSharedRecordsRecursively($recordId, $moduleName) |
278 | 282 | { |
@@ -36,8 +36,9 @@ |
||
36 | 36 | $viewer->assign('USERID', $userid); |
37 | 37 | $viewer->assign('DELETE_USER_NAME', $userRecordModel->getName()); |
38 | 38 | $viewer->assign('USER_LIST', $usersList); |
39 | - if ($request->get('mode') == 'permanent') |
|
40 | - $viewer->assign('PERMANENT', true); |
|
39 | + if ($request->get('mode') == 'permanent') { |
|
40 | + $viewer->assign('PERMANENT', true); |
|
41 | + } |
|
41 | 42 | $viewer->view('DeleteUser.tpl', $moduleName); |
42 | 43 | } |
43 | 44 | } |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | } else { |
33 | 33 | $saveRecord = true; |
34 | 34 | } |
35 | - if (!$saveRecord) |
|
36 | - return [ |
|
35 | + if (!$saveRecord) { |
|
36 | + return [ |
|
37 | 37 | 'save_record' => $saveRecord, |
38 | 38 | 'type' => 0, |
39 | 39 | 'info' => [ |
@@ -42,8 +42,9 @@ discard block |
||
42 | 42 | 'type' => 'error' |
43 | 43 | ] |
44 | 44 | ]; |
45 | - else |
|
46 | - return ['save_record' => true]; |
|
45 | + } else { |
|
46 | + return ['save_record' => true]; |
|
47 | + } |
|
47 | 48 | } |
48 | 49 | |
49 | 50 | public function getConfig($id, $module, $baseModule) |
@@ -31,10 +31,11 @@ |
||
31 | 31 | */ |
32 | 32 | public function isPermitted($actionName) |
33 | 33 | { |
34 | - if ($actionName == 'EditView' || $actionName == 'CreateView') |
|
35 | - return false; |
|
36 | - else |
|
37 | - return ($this->isActive() && Users_Privileges_Model::isPermitted($this->getName(), $actionName)); |
|
34 | + if ($actionName == 'EditView' || $actionName == 'CreateView') { |
|
35 | + return false; |
|
36 | + } else { |
|
37 | + return ($this->isActive() && Users_Privileges_Model::isPermitted($this->getName(), $actionName)); |
|
38 | + } |
|
38 | 39 | } |
39 | 40 | |
40 | 41 | /** |
@@ -111,8 +111,9 @@ |
||
111 | 111 | $getAllTicketStatus = self::getAllTicketStatus(); |
112 | 112 | foreach ($getTicketStatusClosed as $key => $closedStatus) { |
113 | 113 | foreach ($getAllTicketStatus as $key => $status) { |
114 | - if ($closedStatus == $status) |
|
115 | - unset($getAllTicketStatus[$key]); |
|
114 | + if ($closedStatus == $status) { |
|
115 | + unset($getAllTicketStatus[$key]); |
|
116 | + } |
|
116 | 117 | } |
117 | 118 | } |
118 | 119 | $result = $getAllTicketStatus; |
@@ -9,8 +9,8 @@ |
||
9 | 9 | use yii\base\InvalidConfigException; |
10 | 10 | use yii\base\InvalidParamException; |
11 | 11 | use yii\base\UnknownClassException; |
12 | -use yii\log\Logger; |
|
13 | 12 | use yii\di\Container; |
13 | +use yii\log\Logger; |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Gets the application start timestamp. |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | |
513 | 513 | /** |
514 | 514 | * Configures an object with the initial property values. |
515 | - * @param object $object the object to be configured |
|
515 | + * @param base\Object $object the object to be configured |
|
516 | 516 | * @param array $properties the property initial values given in terms of name-value pairs. |
517 | 517 | * @return object the object itself |
518 | 518 | */ |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | * This method is provided such that we can get the public member variables of an object. |
531 | 531 | * It is different from "get_object_vars()" because the latter will return private |
532 | 532 | * and protected variables if it is called within the object itself. |
533 | - * @param object $object the object to be handled |
|
533 | + * @param base\ArrayableTrait $object the object to be handled |
|
534 | 534 | * @return array the public member variables of the object |
535 | 535 | */ |
536 | 536 | public static function getObjectVars($object) |
@@ -8,9 +8,9 @@ |
||
8 | 8 | namespace yii\db\sqlite; |
9 | 9 | |
10 | 10 | use yii\base\NotSupportedException; |
11 | +use yii\db\ColumnSchema; |
|
11 | 12 | use yii\db\Expression; |
12 | 13 | use yii\db\TableSchema; |
13 | -use yii\db\ColumnSchema; |
|
14 | 14 | use yii\db\Transaction; |
15 | 15 | |
16 | 16 | /** |
@@ -29,8 +29,9 @@ discard block |
||
29 | 29 | protected function log($message, $delimiter = '\n') |
30 | 30 | { |
31 | 31 | static $file = null; |
32 | - if ($file === null) |
|
33 | - $file = dirname(__FILE__) . '/../../cache/logs/viewer-debug.log'; |
|
32 | + if ($file === null) { |
|
33 | + $file = dirname(__FILE__) . '/../../cache/logs/viewer-debug.log'; |
|
34 | + } |
|
34 | 35 | if (self::$debugViewer) { |
35 | 36 | file_put_contents($file, $message . $delimiter, FILE_APPEND); |
36 | 37 | } |
@@ -177,10 +178,11 @@ discard block |
||
177 | 178 | foreach ($this->tpl_vars as $key => $smarty_variable) { |
178 | 179 | // Determine type of value being pased. |
179 | 180 | $valueType = 'literal'; |
180 | - if (is_object($smarty_variable->value)) |
|
181 | - $valueType = get_class($smarty_variable->value); |
|
182 | - else if (is_array($smarty_variable->value)) |
|
183 | - $valueType = 'array'; |
|
181 | + if (is_object($smarty_variable->value)) { |
|
182 | + $valueType = get_class($smarty_variable->value); |
|
183 | + } else if (is_array($smarty_variable->value)) { |
|
184 | + $valueType = 'array'; |
|
185 | + } |
|
184 | 186 | $this->log(sprintf("DATA: %s, TYPE: %s", $key, $valueType)); |
185 | 187 | } |
186 | 188 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | /** |
24 | 24 | * log message into the file if in debug mode. |
25 | - * @param type $message |
|
25 | + * @param string $message |
|
26 | 26 | * @param type $delimiter |
27 | 27 | */ |
28 | 28 | protected function log($message, $delimiter = '\n') |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * @param string $templateName |
163 | 163 | * @param string $moduleName |
164 | 164 | * @param boolean $fetch |
165 | - * @return html data |
|
165 | + * @return string|boolean data |
|
166 | 166 | */ |
167 | 167 | public function view($templateName, $moduleName = '', $fetch = false) |
168 | 168 | { |