Showing 4,652 of 306,333 total issues
Method testAttachImageToRecord
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testAttachImageToRecord($module, $field, $file): void
{
switch ($module) {
case 'Users':
$record = self::$cache['Users'] ?? \App\User::getUserIdByName('admin');
Method resetAllPasswords
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function resetAllPasswords(): void
{
$this->climate->arguments->add([
'confirmation' => [
'prefix' => 'c',
Method saveToDb
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveToDb(): bool
{
$db = \App\Db::getInstance();
$result = false;
$fieldName = $this->fieldModel->getName();
Method parse
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function parse($rows)
{
$address = [];
foreach ($rows as $row) {
switch ($row['types'][0]) {
Method getLinks
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getLinks(\Vtiger_Record_Model $recordModel, string $source): ?\Vtiger_Link_Model
{
$fields = $recordModel->getModule()->getFieldsByType('serverAccess', true);
$isActive = 0;
foreach ($fields as $fieldName => $fieldModel) {
Method getInventory
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getInventory(): array
{
$currencyId = $this->getBaseCurrency()['currencyId'];
if (!empty($this->row['DOK_WAL'])) {
$currencyId = $this->convertCurrency($this->row['SYM_WAL'], []);
Method getEmployeeHierarchy
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getEmployeeHierarchy($id)
{
\App\Log::trace('Entering getEmployeeHierarchy(' . $id . ') method ...');
$listViewHeader = [];
Method getModulePermissions
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getModulePermissions()
{
if (!isset($this->module_permissions)) {
$allModules = Vtiger_Module_Model::getAll([0], Settings_Profiles_Module_Model::getNonVisibleModulesList());
$profileTabPermissions = $this->getProfileTabPermissions();
Method transferListSearchParamsToFilterCondition
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function transferListSearchParamsToFilterCondition($searchParams, Settings_Vtiger_Module_Model $moduleModel)
{
if (empty($searchParams)) {
return [];
}
Method process
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$mode = $request->getMode();
if (!empty($mode)) {
echo $this->invokeExposedMethod($mode, $request);
Method getQuery
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getQuery(App\Request $request)
{
$moduleName = $request->getByType('source_module', \App\Purifier::ALNUM);
$sourceModule = $request->getModule();
$cvId = $request->isEmpty('viewname') ? '' : $request->getByType('viewname', \App\Purifier::ALNUM);
Method process
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$currentUser = \App\User::getCurrentUserModel();
$moduleName = $request->getModule();
$linkId = $request->getInteger('linkid');
Method getAccountsByIndustry
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAccountsByIndustry($owner, $dateFilter)
{
$moduleName = 'Accounts';
$query = new \App\Db\Query();
$query->select([
Method getParent
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getParent($id, &$parent, &$encountered, $depthBase = 0)
{
\App\Log::trace('Entering getParent(' . $id . ') method ...');
if ($depthBase == App\Config::module('MultiCompany', 'MAX_HIERARCHY_DEPTH')) {
\App\Log::error('Exiting getParent method ... - exceeded maximum depth of hierarchy');
Method getParent
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getParent(int $id, array &$parent, array &$encountered, int $depthBase = 0)
{
\App\Log::trace('Entering getParent(' . $id . ') method ...');
if ($depthBase == App\Config::module('Competition', 'MAX_HIERARCHY_DEPTH')) {
\App\Log::error('Exiting getParent method ... - exceeded maximum depth of hierarchy');
Method getAllUser
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getAllUser($type = 0)
{
$db = new App\Db\Query();
if (0 === $type) {
$db->select([
Method getLeadsByStatusConverted
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getLeadsByStatusConverted($owner, $dateFilter)
{
$query = new \App\Db\Query();
$query->select([
'leadstatusid' => 'vtiger_leadstatus.leadstatusid',
Method process
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$currentUserId = \App\User::getCurrentUserId();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
Method getDisplayValue
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
{
if (empty($value)) {
return '';
}
Method getOpenTickets
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getOpenTickets()
{
$ticketStatus = Settings_SupportProcesses_Module_Model::getTicketStatusNotModify();
$moduleName = 'HelpDesk';
$query = new \App\Db\Query();