Showing 5,566 of 7,504 total issues
Method sanitize_post_field
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function sanitize_post_field($field, $value, $post_id, $context) {
$int_fields = array('ID', 'post_parent', 'menu_order');
if ( in_array($field, $int_fields) )
$value = (int) $value;
Method wp_unique_post_slug
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function wp_unique_post_slug($slug, $post_ID, $post_status, $post_type, $post_parent) {
if ( in_array( $post_status, array( 'draft', 'pending' ) ) )
return $slug;
global $wpdb, $wp_rewrite;
Method remove_dot_segments
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function remove_dot_segments($input)
{
$output = '';
while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..')
{
Method remove_dot_segments
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function remove_dot_segments($input)
{
$output = '';
while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..')
{
Method get_option
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_option( $option, $default = false ) {
global $wpdb;
$option = trim( $option );
if ( empty( $option ) )
Method get_allowed_on_site
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function get_allowed_on_site( $blog_id = null ) {
static $allowed_themes = array();
if ( ! $blog_id || ! is_multisite() )
$blog_id = get_current_blog_id();
Method remove_user_from_blog
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function remove_user_from_blog($user_id, $blog_id = '', $reassign = '') {
global $wpdb;
switch_to_blog($blog_id);
$user_id = (int) $user_id;
/**
Method RegisterBundles
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-ui-{version}.js",
Method fill_query_vars
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fill_query_vars($array) {
$keys = array(
'error'
, 'm'
, 'p'
Method Handle
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public IEnumerable Handle(Func<Guid, ParticipantAggregate> al, CreateParticipant command)
{
var agg = al(command.Id);
if (agg.EventsLoaded > 0)
Method BuildMatchTableHtml
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public String BuildMatchTableHtml(Match match)
{
var scoreRows = "";
for (var i = 0; i < match.Home.Bowlers.Count; i++)
{
Function dnd
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
api.event.dnd = function (el, onHover, onDrop){
var _id, _type;
if( !onDrop ){
onDrop = onHover;
Function traverseFileTree
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function traverseFileTree(files, entry, path) {
if (entry != null) {
if (entry.isDirectory) {
var filePath = (path || '') + entry.name;
addFile({name: entry.name, type: 'directory', path: filePath});
Function traverseFileTree
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function traverseFileTree(files, entry, path) {
if (entry != null) {
if (entry.isDirectory) {
var filePath = (path || '') + entry.name;
addFile({name: entry.name, type: 'directory', path: filePath});
Function rebuildController
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var rebuildController = function ($http, $q) {
var vm = this;
vm.readmodels = [
{ Name: 'All' },
Function updateScoreInfo
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateScoreInfo(position) {
var homeBowler = ($.grep($scope.model.Home.Bowlers, function (o) { return o.Position == position; }) || [])[0];
var awayBowler = ($.grep($scope.model.Away.Bowlers, function (o) { return o.Position == position; }) || [])[0];
if ($scope.model.IsTeam) {
Function stepladderController
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var stepladderController = function ($http, $location, dataService) {
var url = $location.absUrl();
var lastSlash = url.lastIndexOf('/');
var year = url.slice(lastSlash + 1) || new Date().getFullYear();
Function _slide
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var _slide = function(params, complete, fade, door) {
var easing = this.getOptions('easing'),
distance = this.getStageWidth(),
from = { left: distance * ( params.rewind ? -1 : 1 ) },
Function inspector
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var inspector = function(event) {
event = jQuery.event.fix(event); // jQuery event normalization.
var element = event.target;
// @ TextNode -> nodeType == 3
element = (element.nodeType==3) ? element.parentNode : element;
Function toggleForm
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggleForm: function( showOrHide ) {
var self = this, $widget, $inside, complete;
$widget = this.container.find( 'div.widget:first' );
$inside = $widget.find( '.widget-inside:first' );