Showing 4,652 of 306,333 total issues
Method deleteRelation
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function deleteRelation($sourceRecordId, $relatedRecordId)
{
$sourceModuleName = $this->getParentModuleModel()->getName();
$destinationModuleName = $this->getRelationModuleModel()->getName();
$result = false;
Method saveInventoryData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveInventoryData()
{
\App\Log::trace('Start ' . __METHOD__);
$inventoryData = $this->getInventoryData();
$prevValue = $this->getPreviousInventoryItems();
Method showInventoryEntries
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function showInventoryEntries(App\Request $request)
{
$recordId = $request->getInteger('record');
$pageNumber = $request->getInteger('page');
$moduleName = $request->getModule();
Method process
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$moduleName = $request->getModule();
$componentName = $request->getByType('name');
if (!empty($componentName)) {
Method saveRecord
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveRecord(App\Request $request)
{
$this->getRecordModelFromRequest($request);
$eventHandler = $this->record->getEventHandler();
$skipHandlers = $request->getArray('skipHandlers', \App\Purifier::ALNUM, [], \App\Purifier::INTEGER);
Method __construct
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct()
{
parent::__construct();
$this->exposeMethod('showDetailViewByMode');
$this->exposeMethod('showModuleDetailView');
Method getFieldInstanceByName
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFieldInstanceByName($name)
{
if (!isset($this->customFields[$name])) {
return parent::getFieldInstanceByName($name);
}
Method setRelatedFieldsInHierarchy
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setRelatedFieldsInHierarchy(Vtiger_Record_Model $recordModel, $fieldName)
{
$fieldValue = $recordModel->get($fieldName);
$relatedModules = \App\ModuleHierarchy::getRelationFieldByHierarchy($recordModel->getModuleName(), $fieldName);
if ($relatedModules && !empty($fieldValue) && $recordModel->getPreviousValue($fieldName) !== $fieldValue) {
Method get
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get(App\Request $request)
{
if ($request->isEmpty('key', true)) {
throw new \App\Exceptions\NoPermitted('Not Acceptable', 406);
}
Method getRecordRelatedListViewLinksLeftSide
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRecordRelatedListViewLinksLeftSide(Vtiger_RelationListView_Model $viewModel)
{
$links = parent::getRecordRelatedListViewLinksLeftSide($viewModel);
if (\App\Mail::checkMailClient()) {
if (\App\Mail::checkInternalMailClient()) {
Method getInventoryData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getInventoryData(XMLReader $xmlToImport, $keyType)
{
$recordInventoryData = [];
$labels = [];
$columnsName = [];
Method getDetailViewLinks
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDetailViewLinks(array $linkParams): array
{
$recordModel = $this->getRecord();
$linkModelList = parent::getDetailViewLinks($linkParams);
if (!$recordModel->isReadOnly()) {
Method findOutStartDates
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function findOutStartDates(&$node)
{
$maxTimeStampValue = 2147483647;
$firstDate = $this->iterateNodes($node, $maxTimeStampValue, function (&$child, $firstDate) {
if (!empty($child['start_date']) && '1970-01-01' !== $child['start_date']) {
Method process
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(): void
{
$handlerClass = $this->getActionClassName();
$this->request->loadData();
$this->debugRequest();
Method get
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get(): array
{
$response = [];
$moduleName = $this->controller->request->getModule();
$columns = array_flip(['id', 'type', 'label', 'wcol', 'sequence', 'data', 'name']);
Method post
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function post(): string
{
$multiFactorAuth = new \Api\Core\TwoFactorAuth($this);
if (!$multiFactorAuth->isActive()) {
$this->saveLoginHistory([
Method process
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$response = new Vtiger_Response();
try {
$ilon = $request->getByType('ilon', 'float');
Consider simplifying this complex logical expression. Open
Open
if (
initial === false &&
(this.tagName === 'SPAN' || this.selected) &&
((prevVal < num && prevVal >= 0) || (!prevVal && num > 0))
) {
Consider simplifying this complex logical expression. Open
Open
if (
fieldValue.indexOf('http://') === 0 ||
fieldValue.indexOf('https://') === 0 ||
fieldValue.indexOf('ftp://') === 0 ||
fieldValue.indexOf('ftps://') === 0 ||
Method addLink
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function addLink($tabid, $type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null, $linkParams = null)