Showing 68 of 124 total issues
Function destroy
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
destroy: function () {
var element=this.opts.element, select2 = element.data("select2"), self = this;
this.close();
Function callback
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
callback: this.bind(function (data) {
var def; // default choice
// ignore old responses
if (queryNumber != this.queryCount) {
Function val
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
val: function (val, triggerChange) {
var oldData, self=this;
if (arguments.length === 0) {
return this.getVal();
Function monitorSource
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
monitorSource: function () {
var el = this.opts.element, observer, self = this;
el.on("change.select2", this.bind(function (e) {
if (this.opts.element.data("select2-change-triggered") !== true) {
Method readConversationAction
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function readConversationAction()
{
if (!$this->zfcUserAuthentication()->hasIdentity()) {
return $this->redirect()->toRoute($this->zfcUserOptions->getLoginRedirectRoute());
}
Function initContainerWidth
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initContainerWidth: function () {
function resolveContainerWidth() {
var style, attrs, matches, i, l, attr;
if (this.opts.width === "off") {
Function loadMoreIfNeeded
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadMoreIfNeeded: function () {
var results = this.results,
more = results.find("li.select2-more-results"),
below, // pixels the element is below the scroll fold, below==0 is when the element is starting to be visible
page = this.resultsPage + 1,
Function onSelect
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onSelect: function (data, options) {
if (!this.triggerSelect(data) || data.text === "") { return; }
this.addSelectedChoice(data);
Method indexAction
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function indexAction()
{
if (!$this->zfcUserAuthentication()->hasIdentity()) {
return $this->redirect()->toRoute($this->zfcUserOptions->getLoginRedirectRoute());
}
Function defaultTokenizer
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defaultTokenizer(input, selection, selectCallback, opts) {
var original = input, // store the original so we can compare and know if we need to tell the search to update its text
dupe = false, // check for whether a token we extracted represents a duplicate selected choice
token, // token
index, // position at which the separator was found
Function opening
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
opening: function () {
var el, range, len;
if (this.opts.minimumResultsForSearch >= 0) {
this.showSearch(true);
Function initSelection
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
opts.initSelection = opts.initSelection || function (element, callback) {
var ids = splitVal(element.val(), opts.separator, opts.transformVal);
//search in data by array of ids, storing matching items in a list
var matches = [];
opts.query({
Method newMessage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newMessage(ConversationInterface $conversation, $messageText, UserInterface $user)
{
$this->getEventManager()->trigger(
'newMessage.pre',
$this,
Method getUserReceives
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getUserReceives($userId)
{
$queryBuilder = $this->objectManager->createQueryBuilder();
$queryBuilder->select('r')
->from($this->options->getConversationReceiverEntity(), 'r')
Function resolveContainerWidth
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function resolveContainerWidth() {
var style, attrs, matches, i, l, attr;
if (this.opts.width === "off") {
return null;
Function postprocessResults
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
postprocessResults: function (data, initial, noHighlightUpdate) {
var val = this.getVal(),
choices = this.results.find(".select2-result"),
compound = this.results.find(".select2-result-with-children"),
self = this;
Function unselect
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
unselect: function (selected) {
var val = this.getVal(),
data,
index;
selected = selected.closest(".select2-search-choice");
Function prepareOpts
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
prepareOpts: function () {
var opts = this.parent.prepareOpts.apply(this, arguments),
self=this;
if (opts.element.get(0).tagName.toLowerCase() === "select") {
Function query
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
opts.query = this.bind(function (query) {
var data = { results: [], more: false },
term = query.term,
children, placeholderOption, process;
Method newConversation
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newConversation(array $data, UserInterface $user)
{
$this->getEventManager()->trigger(
'newConversation.pre',
$this,