Showing 4,652 of 306,333 total issues
Function sidebarKeyboard
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sidebarKeyboard: function (e) {
let target = $(e.target);
if (e.which == this.keyboard.LEFT) {
if (target.hasClass('js-submenu-toggler') && !target.hasClass('collapsed')) {
target.click();
Function cb
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
cb: (modal) => {
if (btn.data('iframe')) {
let iframe = btn.siblings('iframe');
let message = iframe.clone();
if (message[0].hasAttribute('srcdoctemp')) {
Method testEditRole
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testEditRole()
{
$recordModel = \Settings_Roles_Record_Model::getInstanceById(self::$id);
$this->assertNotNull($recordModel);
Method updateBySelect
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function updateBySelect(): void
{
$options = [];
$toInstall = \App\YetiForce\Updater::getToInstall();
foreach ($toInstall as $package) {
Method getColumnPermission
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getColumnPermission($tabMix, $columnName, $readOnly = true)
{
$tabId = $tabMix;
if (!is_numeric($tabMix)) {
$tabId = Module::getModuleId($tabMix);
Method populateSharingtmptables
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function populateSharingtmptables($userid)
{
$dbCommand = \App\Db::getInstance()->createCommand();
\vtlib\Deprecated::checkFileAccessForInclusion('user_privileges/sharing_privileges_' . $userid . '.php');
Method preProcessAjax
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function preProcessAjax(\App\Request $request)
{
$moduleName = $request->getModule(false);
$view = $request->getByType('view', 2);
if ($this->modalId) {
Method check
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function check(string $password): array
{
$status = ['status' => true];
$product = \App\YetiForce\Register::getProduct('YetiForcePassword');
if (empty($password) || !\App\RequestUtil::isNetConnection() || empty($product['params']['login']) || empty($product['params']['pass'])) {
Method send
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function send()
{
$config = \App\Config::component('YetiForce');
if (empty($config['watchdogUrl']) || !\App\RequestUtil::isNetConnection()) {
return;
Method getNumberOfNewMessages
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getNumberOfNewMessages(?array $roomInfo = null): array
{
$numberOfNewMessages = 0;
$roomList = [];
$lastMessagesData = [];
Method afterLogin
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function afterLogin(array $params): void
{
$file = ROOT_DIRECTORY . '/app_data/PwnedPassword.php';
$userName = \App\Session::get('user_name');
$config = \Settings_Password_Record_Model::getUserPassConfig();
Method initUsers
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function &initUsers($status = 'Active', $assignedUser = '', $private = '', $roles = false)
{
$cacheKeyMod = 'private' === $private ? $this->moduleName : '';
$cacheKeyAss = \is_array($assignedUser) ? md5(json_encode($assignedUser)) : $assignedUser;
$cacheKeyRole = \is_array($roles) ? md5(json_encode($roles)) : $roles;
Method getAvailableUsersQuery
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAvailableUsersQuery(): QueryGenerator
{
$queryGenerator = (new QueryGenerator('Users'))
->setFields(['id'])
->addCondition('status', 'Active', 'e')
Method formatToDb
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function formatToDb($value, $leadingZeros = false)
{
if ($leadingZeros) {
$delim = ['/', '.'];
foreach ($delim as $delimiter) {
Method getChildModules
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getChildModules($moduleName, $hierarchy = [1])
{
$modules = [];
switch (static::getModuleLevel($moduleName)) {
case 0:
Method saveInventoryCrm
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveInventoryCrm(\Vtiger_Record_Model $recordModel, Maps\Inventory $mapModel): bool
{
$inventoryData = [];
$savedAllProducts = true;
if ($mapModel->dataCrm['currency_id']) {
Method search
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function search(): array
{
if (!$this->isActive()) {
return [];
}
Method save
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save()
{
$db = \App\Db::getInstance();
$id = $this->getId();
$tableName = Settings_Currency_Module_Model::TABLE_NAME;
Method fetchCurrencyRates
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function fetchCurrencyRates($dateCur, $cron = false)
{
if (!\App\RequestUtil::isNetConnection()) {
return false;
}
Method update
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function update(App\Request $request): void
{
$response = new Vtiger_Response();
try {
$fieldInstance = Settings_LayoutEditor_Field_Model::getInstance($request->getInteger('fieldId'));