Showing 385 of 385 total issues
Identical blocks of code found in 2 locations. Consider refactoring. Open
public function __construct(
\Magento\Directory\Api\CountryInformationAcquirerInterface $countryInformation,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
\Magento\Framework\Module\ModuleList $moduleList,
\Magento\Sales\Model\Order $order,
- 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 104.
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
public function __construct(
\Magento\Directory\Api\CountryInformationAcquirerInterface $countryInformation,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
\Magento\Framework\Module\ModuleList $moduleList,
\Magento\Sales\Model\Order $order,
- 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 104.
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 _fnSortAria
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnSortAria(settings) {
var label;
var nextSort;
var columns = settings.aoColumns;
var aSort = _fnSortFlatten(settings);
Function dateVerify
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function dateVerify(fieldName) {
day = fieldName.value.substring(0, 2);
month = fieldName.value.substring(3, 5);
year = fieldName.value.substring(6, 10);
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
\Magento\Framework\Mail\Template\TransportBuilder $transportBuilder,
\Magento\Framework\Model\ResourceModel\Db\Context $context,
\Magento\Backend\Model\Session $session,
\Magento\Sales\Model\Order $order,
Function events
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
events: function () {
a.on('keydown.mask', function (c) {
a.data('mask-keycode', c.keyCode || c.which);
})
.on(
Function _fnUpdateInfo
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnUpdateInfo(settings) {
/* Show information about the table */
var nodes = settings.aanFeatures.i;
if (nodes.length === 0) {
return;
Method execute
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
//$cardInternational = $this->getRequest()->getParam('card_international');
Similar blocks of code found in 3 locations. Consider refactoring. Open
c ||
((c = new this.constructor(
b.currentTarget,
this.getDelegateOptions()
)),
- 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 57.
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
(c ||
((c = new this.constructor(
b.currentTarget,
this.getDelegateOptions()
)),
- 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 57.
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
c ||
((c = new this.constructor(
b.currentTarget,
this.getDelegateOptions()
)),
- 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 57.
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 _addNumericSort
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _addNumericSort(decimalPlace) {
$.each(
{
// Plain numbers
num: function (d) {
Function extend
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_Api.extend = function (scope, obj, ext) {
// Only extend API instances and static properties of the API
if (!ext.length || !obj || (!(obj instanceof _Api) && !obj.__dt_wrapper)) {
return;
}
Function _fnAjaxUpdateDraw
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnAjaxUpdateDraw(settings, json) {
// v1.10 uses camelCase variables, while 1.9 uses Hungarian notation.
// Support both
var compat = function (old, modern) {
return json[old] !== undefined ? json[old] : json[modern];
Function _fnFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnFilter(settings, input, force, regex, smart, caseInsensitive) {
var rpSearch = _fnFilterCreateSearch(input, regex, smart, caseInsensitive);
var prevSearch = settings.oPreviousSearch.sSearch;
var displayMaster = settings.aiDisplayMaster;
var display, invalidated, i;
Function _toSettings
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _toSettings = function (mixed) {
var idx, jq;
var settings = DataTable.settings;
var tables = $.map(settings, function (el, i) {
return el.nTable;
Method setBillingInformation
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function setBillingInformation()
{
$billing = $this->getBillingAddress();
if ($billing) {
if (count($billing->getStreet()) === 4) {
Function toMoney
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
(i.toMoney = function(a, b) {
if (((b = f(b)), b.zeroCents)) {
b.lastOutput = b.lastOutput || '';
var c = '(' + b.separator + '[0]{0,' + b.precision + '})',
d = new RegExp(c, 'g'),
Function refresh
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
(b.prototype.refresh = function() {
var b = this,
c = 'offset',
d = 0;
(this.offsets = []),
Identical blocks of code found in 2 locations. Consider refactoring. Open
$.extend(preSearch[column], {
sSearch: input + '',
bRegex: regex === null ? false : regex,
bSmart: smart === null ? true : smart,
bCaseInsensitive: caseInsen === null ? true : caseInsen,
- 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 56.
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