Showing 1,375 of 1,375 total issues
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (!empty($rows)) {
$result = (bool) $this->getConnection()->insertArray($this->getMainTable(), array_keys($fields), $rows);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 43.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (!empty($rows)) {
$result = (bool) $this->getConnection()->insertArray($this->getMainTable(), array_keys($fields), $rows);
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 43.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Smile\ElasticsuiteAnalytics\Model\Search\Usage\Kpi\Report $report,
\Magento\Framework\Serialize\Serializer\Json $serializer,
array $data = []
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 63.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
return [
$this->metricFactory->create(
['name' => 'minDate', 'field' => 'date', 'type' => MetricInterface::TYPE_MIN]
),
$this->metricFactory->create(
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 63.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
$metrics = [
$this->metricFactory->create(
['name' => 'unique_sessions', 'field' => 'session_id', 'type' => MetricInterface::TYPE_CARDINALITY]
),
$this->metricFactory->create(
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 63.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function __construct(
$name,
array $queries,
array $metrics = [],
array $childBuckets = [],
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 63.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function _measureText
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _measureText(ctx, data, gc, longest, string) {
Function _updateBezierControlPoints
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _updateBezierControlPoints(points, options, area, loop, indexAxis) {
Method getPreviewResults
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
ContainerConfigurationInterface $containerConfiguration,
ApplierList $applier,
$size,
$queryText = null,
$category = null
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
DbContext $context,
RuleFactory $ruleFactory,
SerializerInterface $serializer,
array $containerToLimitationDataMapping = [],
$connectionName = null
Function determineUnitForFormatting
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Backend\Block\Context $context,
\Magento\Framework\Data\FormFactory $formFactory,
\Smile\ElasticsuiteCatalogRule\Model\RuleFactory $ruleFactory,
\Magento\Framework\Registry $registry,
array $data = []
Function getNearestItems
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function getNearestItems(chart, position, axis, intersect, useFinalPosition) {
Function lttbDecimation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function lttbDecimation(data, start, count, availableWidth, options) {
Function optimizedEvaluateItems
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function optimizedEvaluateItems(chart, axis, position, handler, intersect) {
Function skip
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function skip(ticks, newTicks, spacing, majorStart, majorEnd) {
Function determineLimits
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function determineLimits(angle, pos, size, min, max) {
Function _steppedLineTo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _steppedLineTo(ctx, previous, target, flip, mode) {
Function _createResolver
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _createResolver(scopes, prefixes = [''], rootScopes = scopes, fallback, getTarget = () => scopes[0]) {
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
ItemFactory $itemFactory,
Collection\Provider $productCollectionProvider,
ConfigurationHelper $configurationHelper,
ContextInterface $searchContext,
$type = self::AUTOCOMPLETE_TYPE