Code Duplication    Length = 15-15 lines in 2 locations

src/cli/cms/data/abe-sql.js 2 locations

@@ 386-400 (lines=15) @@
383
    return shouldAdd
384
  }
385
386
  static whereNotEquals(where, value, compare, json) {
387
    var shouldAdd = true
388
    if(where.left === 'template' || where.left === 'abe_meta.template') {
389
      if (value && value.indexOf('/') > -1 && value === compare) { 
390
        shouldAdd = false 
391
      } else if (value && value.indexOf('/') === -1 && compare && compare.indexOf(value) !== -1) { 
392
        shouldAdd = false
393
      }
394
    }else {
395
      if(value === compare) { // only none is Array
396
        shouldAdd = false
397
      }
398
    }
399
    return shouldAdd
400
  }
401
402
  static whereLike(where, value, compare, json) {
403
    var shouldAdd = true
@@ 370-384 (lines=15) @@
367
    return res
368
  }
369
370
  static whereEquals(where, value, compare) {
371
    var shouldAdd = true
372
    if(where === 'template' || where === 'abe_meta.template') {
373
      if(value && value.indexOf('/') > -1 && value !== compare) {
374
        shouldAdd = false
375
      }else if(value && value.indexOf('/') === -1 && compare && compare.indexOf(value) === -1) {
376
        shouldAdd = false
377
      }
378
    }else {
379
      if(value !== compare) { // only none is Array
380
        shouldAdd = false
381
      }
382
    }
383
    return shouldAdd
384
  }
385
386
  static whereNotEquals(where, value, compare, json) {
387
    var shouldAdd = true