Showing 708 of 9,214 total issues
Method getArray
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getArray() {
$idea = array(
"id" => $this->id,
"title" => $this->title,
"description" => function_exists("format_post") ? format_post($this->description) : $this->description,
Method __construct
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($id = false) {
parent::__construct();
if (is_string($id)) {
$query = "SELECT id FROM timetable_points WHERE name = ? OR slug = ?";
Method embedRailpageDownload
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function embedRailpageDownload($e) {
if (pq($e)->attr("href") != pq($e)->text()) {
return $e;
}
Method preProcessBBCodeUIDs
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function preProcessBBCodeUIDs($string) {
$format_search = array(
'#\[url=(.*?)\](.*?)\[/url\] by \[url=(.*?)\](.*?)\[/url\], on Flickr#i',
"@\[b:([a-zA-Z0-9]+)]@i",
Method approve
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function approve($user_id) {
if (!$this->id || !$this->db) {
return false;
}
Method closeCorrection
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function closeCorrection($type, $reason) {
if (!isset($this->Resolution->User) || !$this->Resolution->User instanceof User) {
throw new Exception("Cannot close correction - User resolving this correction not specified");
}
Method convertCurrency
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function convertCurrency($amount, $dateObject = null) {
if (!$dateObject instanceof DateTime) {
return;
}
Method updateFeaturedImage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateFeaturedImage() {
$data = array(
"featured_photo" => $this->featured_photo_id
);
Method commit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function commit() {
$this->validate();
$data = array(
Method __construct
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($routeId = null, $gtfsProvider = null) {
if (function_exists("getRailpageConfig")) {
$this->Config = getRailpageConfig();
}
Method canUserVote
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function canUserVote(User $userObject, $imageObject = null) {
if (!filter_var($userObject->id, FILTER_VALIDATE_INT)) {
return false;
}
Method setAutoLogin
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setAutoLogin($cookieExpire) {
if (empty( $cookieExpire )) {
$cookieExpire = RP_AUTOLOGIN_EXPIRE;
}
Method findThumbnailSize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function findThumbnailSize() {
Debug::LogCLI("Finding the minimum image size required to cover the canvas");
$Image = array_slice($this->Images, 0, 1);
Method newAPIKey
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newAPIKey() {
$len = 32;
if (@is_readable('/dev/urandom')) {
Method updateHash
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateHash() {
$cookie = is_null(filter_input(INPUT_COOKIE, "rp_userhash")) ? "" : filter_input(INPUT_COOKIE, "rp_userhash"); # isset($_COOKIE['rp_userhash']) ? $_COOKIE['rp_userhash'] : "";
$hash = array();
$update = false;
Method find
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function find($keys = false, $value = false, $limit = 25) {
$timer = Debug::getTimer();
if (!$keys) {
Method unBanIp
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function unBanIp($banId, $ipAddress = null) {
/**
* Empty the cache
*/
Method getStylesheets
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getStylesheets() {
$tags = array();
$minify = array();
Method load
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function load($country, $region) {
if (filter_var($country, FILTER_VALIDATE_INT)) {
// We're looking up a WoE ID
$woe = $this->fetchWoE($country, $region);
Method CreateArticle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function CreateArticle($id) {
$Redis = AppCore::getRedis();
$Memcached = AppCore::getMemcached();
$Registry = Registry::getInstance();