Showing 4,652 of 306,333 total issues
Method __convertToUserFormat
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function __convertToUserFormat($date, $format)
{
\App\Log::trace('Start ' . __METHOD__ . ' ' . serialize($date) . ' | ' . $format);
if (!\is_array($date)) {
$date = explode(' ', $date);
Method process
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): void
{
if ($this->checkExceptions('CreatedHelpDesk')) {
return;
}
Method process
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process()
{
if (!$this->textParser->recordModel || !$this->textParser->recordModel->getModule()->isInventory()) {
return '';
}
Method getHistoryByType
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHistoryByType(string $roomType = 'global', ?int $messageId = null)
{
$columnMessage = static::COLUMN_NAME['message'][$roomType];
$columnRoomName = static::COLUMN_NAME['room_name'][$roomType];
$roomNameId = 'global' === $roomType || 'private' === $roomType ? static::COLUMN_NAME['room'][$roomType] : $columnMessage;
Method getExpectedTimes
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function getExpectedTimes(int $id, \Vtiger_Record_Model $recordModel, array $type): array
{
$return = [];
$date = new \DateTime();
if ($id && ($rules = self::getRulesForServiceContracts($id, $recordModel)) || ($rules = self::getSlaPolicyRulesForModule($recordModel))) {
Method process
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): int
{
$query = (new \App\Db\Query())->select([
'dbo.ARTYKUL.*',
'category' => 'dbo.KATEGORIA_ARTYKULU_TREE.NAZWA',
Method sanitizeSpecialChars
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function sanitizeSpecialChars(string $string, string $delimiter = '_'): string
{
$string = mb_convert_encoding((string) $string, 'UTF-8', mb_list_encodings());
$replace = [
'ъ' => '-', 'Ь' => '-', 'Ъ' => '-', 'ь' => '-',
Method updateSmtp
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateSmtp(App\Request $request)
{
$encryptInstance = \App\Encryption::getInstance();
$data = [
'mailer_type' => $request->getByType('mailer_type'),
Method getFields
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getFields(string $moduleName): array
{
$config = App\Config::security();
$fields = [
'proxyConnection' => [
Method setFieldMapping
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setFieldMapping($fieldValueMapping, $recordModel, $parentRecordModel)
{
$ownerFields = [];
$entityType = $this->entity_type;
foreach ($recordModel->getModule()->getFields() as $name => $fieldModel) {
Method getRecordsListQuery
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRecordsListQuery($skipRecords = false, $module = false, $lockRecords = false)
{
$cvId = $this->getId();
$moduleModel = $this->getModule();
$moduleName = $moduleModel->get('name');
Method checkLimits
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function checkLimits(App\Request $request)
{
$moduleName = $request->getModule();
$record = $request->getInteger('record');
if (!\App\Privilege::isPermitted($moduleName, 'EditView', $record)) {
File Module.php
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace App;
/**
Function registerIconsSelect
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerIconsSelect(container, params) {
AppConnector.request(
$.extend(
{
module: app.getModuleName(),
Function registerLanguage
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerLanguage() {
this.options.locale = {
name: CONFIG.langKey,
weekStart: this.weekStart,
weekdays: [
Method importLayout
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function importLayout($zipfile)
{
$name = $this->_modulexml->name;
$label = $this->_modulexml->label;
\App\Log::trace("Importing $name ... STARTED", __METHOD__);
Method getLicenseInformation
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getLicenseInformation($dir, $libraryName)
{
$licenseError = false;
$returnLicense = '';
$licenseToDisplay = '';
Method addAdvConditions
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function addAdvConditions(\App\QueryGenerator $queryGenerator, int $relationId, string $operator, ?array $condition, ?int $userId)
{
$relationModel = \Vtiger_Relation_Model::getInstanceById($relationId);
if (\Vtiger_Relation_Model::RELATION_M2M !== $relationModel->getRelationType()) {
$parentModuleName = $relationModel->getParentModuleModel()->getName();
Method getMenuHeaderLinks
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getMenuHeaderLinks(\App\Request $request): array
{
$userModel = \App\User::getCurrentUserModel();
$headerLinks = $headerLinkInstances = [];
Method getQueryMessage
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getQueryMessage(?int $messageId, string $condition = '>', ?string $searchVal = null, bool $isLimit = true): Db\Query
{
$query = null;
switch ($this->roomType) {
case 'crm':