Showing 708 of 9,214 total issues
Method getConfig
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getConfig() {
$Registry = Registry::getInstance();
try {
$Config = $Registry->get("config");
Method commit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function commit() {
$this->validate();
$data = array(
"event_id" => $this->Event->id,
Method populate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function populate() {
$this->mckey = sprintf("railpage.locos.date=%d", $this->id);
$update = false;
Method commit
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function commit($force = false) {
$this->validate($force);
Utility\UserUtility::clearCache($this);
Method commit
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function commit() {
$this->validate();
$this->hash = md5($this->meta['url']);
Method getHeadTags
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getHeadTags() {
$tags = array();
if (count($this->rp_meta_tags)) {
Method reviewImage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function reviewImage(Image $imageObject, User $userObject, $publish = 0, $pick = 0) {
$publish = (bool) intval($publish);
$pick = (bool) intval($pick);
Method nearby
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function nearby($lat = false, $lon = false, $radius = false) {
if (!$lat) {
throw new Exception("Cannot fetch locations near co-ordinates: no latitude value given");
}
Method commit
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function commit() {
$this->validate();
$data = array(
"type" => $this->Type->id,
Method getLogger
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getLogger() {
$Registry = Registry::getInstance();
$Config = self::getConfig();
Method InsertOriginalSize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function InsertOriginalSize() {
$Database = (new AppCore)->getDatabaseConnection();
$query = "SELECT id, path FROM gallery_mig_image WHERE hidden = 0 AND id NOT IN (SELECT photo_id FROM gallery_mig_image_sizes WHERE size = 'original')";
Method __construct
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($id = NULL) {
$timer = Debug::getTimer();
parent::__construct();
Method populate
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function populate() {
$timer = Debug::getTimer();
$this->mckey = sprintf("railpage:organisations.organisation=%d", $this->id);
Method findGeoPlaceID
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function findGeoPlaceID($lat, $lon) {
if (!filter_var($lat, FILTER_VALIDATE_FLOAT) || !filter_var($lon, FILTER_VALIDATE_FLOAT)) {
throw new InvalidArgumentException("Invalid geographic co-ordinates");
}
Method getVideos
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getVideos($num = 25) {
if (!$this->video_store_url) {
return false;
}
Method commit
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function commit() {
$this->validate();
/**
Method getPreferences
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPreferences($section = false) {
$prefs = is_object($this->preferences) ? json_decode(json_encode($this->preferences), true) : $this->preferences;
if (is_string($prefs)) {
Method purge
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function purge() {
// Purge pending accounts older than 24 hours
$age = strtotime("-2 weeks");
$query = "SELECT u.username, u.user_id, u.user_regdate, u.user_actkey
Method validate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function validate() {
if (empty($this->name)) {
throw new Exception("Verification failed - download must have a name");
}
Method processExif
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function processExif($row) {
$key = $row['label'];
$column_lookup = [