Showing 922 of 922 total issues
Function createFormConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
createFormConfig: function (renderer)
{
var configIterator, config, field, fields = [], useDescriptionElemement;
for (configIterator in renderer.rendererConfigs)
- 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 parseQuantity
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
parseQuantity: function( quantity )
{
try {
quantity = quantity.trim();
const regex = /[^\d+-.]/g;
- 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 initComponent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
initComponent: function ()
{
this.infoGrid = Ext.create("PartKeepr.Components.Part.PartInfoGrid", {
mode: 'short',
- 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 onApply
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
onApply: function ()
{
var i;
this.appliedFilters = this.getFilters();
- 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 getAppliedPartCount
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getAppliedPartCount: function (grid) {
var subParts = grid.parentRecord.subParts();
var i, total;
- 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 onBeforeEdit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
onBeforeEdit: function (e, context)
{
if (context.field !== "distributor")
{
return;
- 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 getProjectParts
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getProjectParts: function (rec) {
var report = rec.getReport(),
i,j, project, projectPart, projectPartQuantities = [];
for (i=0;i<report.reportProjects().getCount();i++) {
- 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 initComponent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
initComponent: function () {
/**
* @event itemDeselect
* Fires if a record was deselected within the grid.
- 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 __invoke
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function __invoke(Request $request)
{
list($resourceType) = $this->extractAttributes($request);
$items = $this->dataProvider->getCollection($resourceType);
- 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 ensureAuthKey
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function ensureAuthKey(Request $request)
{
$data = json_decode($request->getContent(), true);
if (!is_array($data) || !array_key_exists('authKey', $data) || !$this->verifyAuthKey($data['authKey'])) {
- 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 recalculateNormalizedValues
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function recalculateNormalizedValues()
{
if ($this->getSiPrefix() === null) {
$this->setNormalizedValue($this->getValue());
} 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 getExtJSAssertMappings
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getExtJSAssertMappings(ClassMetadata $cm, $field)
{
$asserts = [];
$propertyAnnotations = $this->reader->getPropertyAnnotations($cm->getReflectionProperty($field));
- 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 onFlush
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function onFlush(OnFlushEventArgs $eventArgs)
{
$entityManager = $eventArgs->getEntityManager();
$uow = $entityManager->getUnitOfWork();
- 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 onFlush
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function onFlush(OnFlushEventArgs $eventArgs)
{
$entityManager = $eventArgs->getEntityManager();
$uow = $entityManager->getUnitOfWork();
- 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 initComponent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
initComponent: function ()
{
this.createHintTemplate = Ext.create("Ext.Template", [
"<code>CREATE USER {user} WITH UNENCRYPTED PASSWORD '{password}'; CREATE DATABASE {dbname}; GRANT ALL PRIVILEGES ON DATABASE {dbname} TO {user};<br/><br/></code>"
]);
- 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 renderer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
renderer: function (val, metaData, record)
{
if (record.get("waiting")) {
return '<span title="Waiting" style="vertical-align: top;" class="web-icon cog"></span>';
}
- 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 intTestDBVersionAction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function intTestDBVersionAction(Request $request)
{
if (!$this->ensureAuthKey($request)) {
return $this->getAuthKeyErrorResponse();
}
- 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 initComponent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
initComponent: function ()
{
this.createHintTemplate = Ext.create("Ext.Template", [
"CREATE DATABASE {name} CHARACTER SET UTF8;\nGRANT USAGE ON *.* TO {user}@{localhost} IDENTIFIED BY '{password}';\nGRANT ALL PRIVILEGES ON {name}.* TO {user}@{localhost};"
]);
- 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 onFlush
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function onFlush(OnFlushEventArgs $eventArgs)
{
$entityManager = $eventArgs->getEntityManager();
$uow = $entityManager->getUnitOfWork();
- 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 getRenderParameters
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getRenderParameters()
{
if ($this->getParameter('partkeepr.maintenance') !== false) {
$renderParams['maintenanceTitle'] = $this->getParameter('partkeepr.maintenance.title');
$renderParams['maintenanceMessage'] = $this->getParameter('partkeepr.maintenance.message');
- 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"