Showing 4,652 of 306,333 total issues
Method showRecentActivities
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function showRecentActivities(App\Request $request)
{
$moduleName = $request->getModule();
include_once 'modules/ModTracker/ModTracker.php';
$type = 'changes';
Method process
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process(App\Request $request, $widget = null)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$data = $request->getAll();
Function registerSwitchEvents
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
registerSwitchEvents() {
let isWorkDays,
switchShowTypeVal,
switchContainer = $('.js-calendar__tab--filters'),
switchShowType = switchContainer.find('.js-switch--showType'),
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function registerAjaxParams
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
registerAjaxParams(selectElement, params) {
params.tags = false;
params.language.searching = function () {
return app.vtranslate('JS_SEARCHING');
};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getPageController
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
getPageController: function () {
if (window.pageController) {
return window.pageController;
}
const moduleName = app.getModuleName();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function testGetGeneralVariable
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function testGetGeneralVariable()
{
$arr = \App\TextParser::getInstance('IStorages')->getGeneralVariable();
$this->assertIsArray($arr, 'Expected array type');
$this->assertNotEmpty($arr, 'Expected any general variables data');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function export
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function export()
{
$timings = [];
$stack = [];
foreach ($this->messages as $i => $log) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getFieldPermission
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function getFieldPermission($tabMix, $fieldMix, $readOnly = true)
{
$tabId = $tabMix;
if (!is_numeric($tabMix)) {
$tabId = Module::getModuleId($tabMix);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getYarnLibraries
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function getYarnLibraries(string $integrityFile, string $srcDir): array
{
$libraries = [];
if (file_exists($integrityFile)) {
$yarnFile = \App\Json::decode(file_get_contents($integrityFile), true);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getMenuHeaderLinks
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function getMenuHeaderLinks(\App\Request $request): array
{
$userModel = \App\User::getCurrentUserModel();
$headerLinks = $headerLinkInstances = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getFooterScripts
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function getFooterScripts(\App\Request $request)
{
$moduleName = $request->getModule();
$jsFileNames = [
'modules.Vtiger.resources.Menu',
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function calculate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function calculate()
{
$product = \App\YetiForce\Register::getProduct('YetiForceMap');
if (!\App\RequestUtil::isNetConnection() || ((empty($product['params']['login']) || empty($product['params']['pass'])) && empty($product['params']['token']))) {
throw new \App\Exceptions\AppException('ERR_NO_INTERNET_CONNECTION');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function showHelp
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function showHelp(): void
{
if ($this->climate->arguments->defined('module')) {
$module = $this->climate->arguments->get('module');
$className = "\\App\\Cli\\{$module}";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getByModule
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function getByModule(string $moduleName, ?bool $onlyActive = false, ?string $relatedModuleName = null): array
{
if (Cache::has('App\Relation::getByModule', $moduleName)) {
$allRelations = Cache::get('App\Relation::getByModule', $moduleName);
} else {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function loadFromContent
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function loadFromContent(string $contents, $name = false, array $param = [])
{
if (empty($contents)) {
Log::warning("Empty content, unable to create file: $name | Size: " . \strlen($contents), __CLASS__);
return false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getChildModules
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function getChildModules($moduleName, $hierarchy = [1])
{
$modules = [];
switch (static::getModuleLevel($moduleName)) {
case 0:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getLabel
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function getLabel($mixedId)
{
$multiMode = \is_array($mixedId);
$ids = $multiMode ? $mixedId : [$mixedId];
$missing = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function process
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function process(): int
{
$query = (new \App\Db\Query())->select([
'ID_DOKUMENTU_HANDLOWEGO', 'ID_FIRMY', 'ID_KONTRAHENTA', 'ID_DOK_ORYGINALNEGO',
'NUMER', 'FORMA_PLATNOSCI', 'UWAGI', 'KONTRAHENT_NAZWA', 'WARTOSC_NETTO', 'WARTOSC_BRUTTO', 'DOK_KOREKTY', 'DATA_KURS_WAL', 'DOK_WAL', 'SYM_WAL',
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function process
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function process(): int
{
$query = (new \App\Db\Query())->from('dbo.KONTAKT');
$pauser = \App\Pauser::getInstance('WaproContactsLastId');
if ($val = $pauser->getValue()) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function process
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function process(): int
{
$query = (new \App\Db\Query())->from('dbo.KONTRAHENT');
$pauser = \App\Pauser::getInstance('WaproAccountLastId');
if ($val = $pauser->getValue()) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"