aristath/kirki

View on GitHub

Showing 449 of 644 total issues

Function runHooks has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  return function runHooks(hookName) {
    if (!hooks[hookName]) {
      hooks[hookName] = {
        handlers: [],
        runs: 0
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/hooks.js - About 1 hr to fix

Function postfix has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function postfix( expression ) {
    var terms = [],
        stack = [],
        match, operator, term, element;

Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/i18n.js - About 1 hr to fix

Function updateClassName has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  DomHelper.prototype.updateClassName = function (e, opt_add, opt_remove) {
    var add = opt_add || [],
        remove = opt_remove || [];

    var classes = e.className.split(/\s+/);

Method init_filesystem has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function init_filesystem() {
        $credentials = [];

        if ( ! defined( 'FS_METHOD' ) ) {
            define( 'FS_METHOD', 'direct' );
Severity: Minor
Found in packages/kirki-framework/util/src/Helper.php - About 1 hr to fix

Method default_control_types has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function default_control_types( $control_types = [] ) {
        $this->control_types = [
            'kirki-composite'       => '\Kirki\Control\Composite',
            'checkbox'              => '\Kirki\Control\Checkbox',
            'kirki-color'           => '\Kirki\Control\ReactColorful',
Severity: Minor
Found in packages/kirki-framework/compatibility/src/Init.php - About 1 hr to fix

Function exports has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (TYPE, $create) {
  var IS_MAP = TYPE == 1;
  var IS_FILTER = TYPE == 2;
  var IS_SOME = TYPE == 3;
  var IS_EVERY = TYPE == 4;
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 hr to fix

Method field_add_control_args has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function field_add_control_args( $args ) {
        if ( isset( $args['active_callback'] ) ) {
            if ( is_array( $args['active_callback'] ) ) {
                if ( ! is_callable( $args['active_callback'] ) ) {

Function run has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var run = function (reaction) {
      var handler = ok ? reaction.ok : reaction.fail;
      var resolve = reaction.resolve;
      var reject = reaction.reject;
      var domain = reaction.domain;
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 hr to fix

Method add has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function add($prefix, $paths, $prepend = false)
    {
        if (!$prefix) {
            if ($prepend) {
                $this->fallbackDirsPsr0 = array_merge(
Severity: Minor
Found in packages/composer/ClassLoader.php - About 1 hr to fix

Function parse has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  FontApiParser.prototype.parse = function() {
    var length = this.fontFamilies_.length;

    for (var i = 0; i < length; i++) {
      var elements = this.fontFamilies_[i].split(":");

Method getLoader has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getLoader()
    {
        if (null !== self::$loader) {
            return self::$loader;
        }
Severity: Minor
Found in packages/composer/autoload_real.php - About 1 hr to fix

Function getSubstitution has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
    var tailPos = position + matched.length;
    var m = captures.length;
    var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
    if (namedCaptures !== undefined) {
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 hr to fix

Function kirkiTooltipAdd has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function kirkiTooltipAdd( control ) {
    _.each( kirkiTooltips, function ( tooltip ) {
        if ( tooltip.id !== control.id ) {
            return;
        }
Severity: Minor
Found in packages/kirki-framework/module-tooltips/src/control.js - About 1 hr to fix

Method addPsr4 has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function addPsr4($prefix, $paths, $prepend = false)
    {
        if (!$prefix) {
            // Register directories for the root namespace.
            if ($prepend) {
Severity: Minor
Found in packages/composer/ClassLoader.php - About 1 hr to fix

Method content_template has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function content_template() {
        ?>

        <div class="kirki-switch-control kirki-{{ data.checkboxType }}">
            <# if ( data.label || data.description ) { #>

Function isContextuallyActive has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        isContextuallyActive: function() {
            var section = this,
                children,
                activeCount = 0;
            if ( 'kirki-nested' !== this.params.type ) {
Severity: Minor
Found in packages/kirki-framework/module-sections/src/script.js - About 1 hr to fix

Function 73 has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"11":11}],73:[function(_dereq_,module,exports){
'use strict';
// 19.1.2.1 Object.assign(target, source, ...)
var getKeys = _dereq_(83);
var gOPS = _dereq_(80);
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 hr to fix

Function initialize has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        initialize: function (id, options) {
            var control = this,
                args = options || {};

            args.params = args.params || {};
Severity: Minor
Found in packages/kirki-framework/control-base/src/dynamic-control.js - About 1 hr to fix

Function 222 has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"40":40,"98":98}],222:[function(_dereq_,module,exports){
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var dP = _dereq_(75);
var gOPD = _dereq_(77);
var getPrototypeOf = _dereq_(81);
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 hr to fix

Method content_template has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function content_template() {
        ?>
        <label class='kirki-sortable'>
            <span class="customize-control-title">
                {{{ data.label }}}
Severity: Minor
Found in packages/kirki-framework/control-sortable/src/Control/Sortable.php - About 1 hr to fix
Severity
Category
Status
Source
Language