Showing 58 of 136 total issues
Function option
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Results.prototype.option = function (data) {
var option = document.createElement('li');
option.classList.add('select2-results__option');
option.classList.add('select2-results__option--selectable');
File simplesearch.php
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Grav\Plugin;
use Grav\Common\Page\Collection;
use Grav\Common\Plugin;
File problems.php
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Grav\Plugin;
use Grav\Common\Cache;
use Grav\Common\Plugin;
Function bind
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Search.prototype.bind = function (decorated, container, $container) {
var self = this;
var resultsId = container.id + '-results';
Function query
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AjaxAdapter.prototype.query = function (params, callback) {
var matches = [];
var self = this;
if (this._request != null) {
Function Select2
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Select2 = function ($element, options) {
if (Utils.GetData($element[0], 'select2') != null) {
Utils.GetData($element[0], 'select2').destroy();
}
Function query
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tags.prototype.query = function (decorated, params, callback) {
var self = this;
this._removeOldTags();
Function bind
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BaseSelection.prototype.bind = function (container, $container) {
var self = this;
var resultsId = container.id + '-results';
Function Decorate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Utils.Decorate = function (SuperClass, DecoratorClass) {
var decoratedMethods = getMethods(DecoratorClass);
var superMethods = getMethods(SuperClass);
function DecoratedClass () {
Method notFound
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function notFound($query, $page, $taxonomies)
{
$searchable_types = ['title', 'content', 'taxonomy'];
$results = true;
$search_content = $this->config->get('plugins.simplesearch.search_content');
Method checkForPermissions
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function checkForPermissions($collection)
{
$user = $this->grav['user'];
$returnCollection = new Collection();
foreach ($collection as $page) {
Function bind
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MultipleSelection.prototype.bind = function (container, $container) {
var self = this;
MultipleSelection.__super__.bind.apply(this, arguments);
Function _resolveWidth
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Select2.prototype._resolveWidth = function ($element, method) {
var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
if (method == 'resolve') {
var styleWidth = this._resolveWidth($element, 'style');
Function update
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MultipleSelection.prototype.update = function (data) {
this.clear();
if (data.length === 0) {
return;
Method renderProblems
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function renderProblems()
{
$theme = 'antimatter';
/** @var Uri $uri */
Function item
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SelectAdapter.prototype.item = function ($option) {
var data = {};
data = Utils.GetData($option[0], 'data');
Function wrapper
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function wrapper (obj, child) {
var data = obj.results;
for (var i = 0; i < data.length; i++) {
var option = data[i];
Function tokenizer
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
var separators = options.get('tokenSeparators') || [];
var term = params.term;
var i = 0;
Function _handleClear
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AllowClear.prototype._handleClear = function (_, evt) {
// Ignore the event if it is disabled
if (this.isDisabled()) {
return;
}
Function convertToOptions
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ArrayAdapter.prototype.convertToOptions = function (data) {
var self = this;
var $existing = this.$element.find('option');
var existingIds = $existing.map(function () {