Showing 4,652 of 306,333 total issues
Function validate
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validate: function (dependentFieldList) {
var field = this.getElement();
var fieldInfo = field.data('fieldinfo');
var fieldLabel;
if (typeof fieldInfo === 'undefined') {
Function getPageController
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getPageController: function () {
if (window.pageController) {
return window.pageController;
}
const moduleName = app.getModuleName();
Method testUploadFiles
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testUploadFiles(): void
{
$request = $this->httpClient->post('Documents/Record/', \App\Utils::merge(['multipart' => [
['name' => 'notes_title', 'contents' => 'test request 1'],
['name' => 'filelocationtype', 'contents' => 'I'],
Method getFieldPermission
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getFieldPermission($tabMix, $fieldMix, $readOnly = true)
{
$tabId = $tabMix;
if (!is_numeric($tabMix)) {
$tabId = Module::getModuleId($tabMix);
Method findByEmailField
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function findByEmailField(string $moduleName, array $fields, array $emails): array
{
$activeFields = $conditions = $return = [];
foreach ($emails as $i => $email) {
if (isset(self::$emailsCache[$moduleName][$email])) {
Method getFieldInstances
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFieldInstances(): array
{
$company = \App\Company::getCompany();
$fields = [];
foreach (self::COMPANY_FORM_FIELDS as $fieldName) {
Method updateList
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateList(int $record): int
{
$sender = $this->getSender();
$return = 0;
if (!empty($sender['ip'])) {
Method getAddressFieldValue
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAddressFieldValue(string $type, string $fieldNameCrm, string $fieldName)
{
$methodName = 'getCrm' . \ucfirst($fieldNameCrm);
if (!empty($fieldParsed = $this->getAddressDataByType($type))) {
if (\method_exists($this, $methodName)) {
Method forVerification
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function forVerification(App\Request $request)
{
$rows = [];
$query = $this->getQuery($request);
$query->from('s_#__mail_rbl_request')->select(['id', 'type', 'datetime', 'user', 'header']);
Method checkLoop
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function checkLoop(): ?int
{
$error = null;
$groupsDown = $allGroups = $this->getMembersByType(\App\PrivilegeUtil::MEMBER_TYPE_GROUPS);
if (!$groupsDown) {
Method executeCron
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function executeCron($whoTrigger)
{
\App\Log::trace('Start executeCron');
if (!self::isPermissionToScan($whoTrigger)) {
\App\Log::warning(\App\Language::translate('ERROR_ACTIVE_CRON', 'OSSMailScanner'));
Method getChild
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChild($id, &$childRow, $depthBase)
{
if (empty($id) || $depthBase == App\Config::module('Partners', 'MAX_HIERARCHY_DEPTH')) {
\App\Log::error('Exiting getChild method ... - exceeded maximum depth of hierarchy');
Method moduleHandler
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function moduleHandler($moduleName, $eventType)
{
$dbCommand = \App\Db::getInstance()->createCommand();
if ('module.postinstall' === $eventType) {
$this->turnOn();
Method doTask
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doTask($recordModel)
{
if (empty($this->recordCollector)) {
return;
}
Method getComponentActivityStateLabel
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getComponentActivityStateLabel($key = '')
{
$pickListValues = App\Fields\Picklist::getValuesName('activitystatus');
if (!\is_array($pickListValues)) {
return [];
Method getHierarchyData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHierarchyData($id, $baseInfo, $recordId, &$listviewEntries, $getRawData = false, $getLinks = true)
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $recordId . ') method ...');
$currentUser = Users_Privileges_Model::getCurrentUserModel();
$hasRecordViewAccess = $currentUser->isAdminUser() || \App\Privilege::isPermitted('Competition', 'DetailView', $recordId);
Method getHierarchyData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHierarchyData($id, $accountInfoBase, $accountId, &$listViewEntries)
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $accountId . ') method ...');
$hasRecordViewAccess = \App\Privilege::isPermitted('Accounts', 'DetailView', $accountId);
foreach ($this->hierarchyFields as &$field) {
Method process
has 37 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 getHierarchyData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHierarchyData($id, $baseInfo, $recordId, &$listviewEntries, $getRawData = false, $getLinks = true)
{
\App\Log::trace('Entering getHierarchyData(' . $id . ',' . $recordId . ') method ...');
$currentUser = Users_Privileges_Model::getCurrentUserModel();
$hasRecordViewAccess = $currentUser->isAdminUser() || \App\Privilege::isPermitted('MultiCompany', 'DetailView', $recordId);
Method process
has 37 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();