Showing 140 of 176 total issues
Function createFeed
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
$feed.= $this->_createStylesheetReferences();
$feed.= "<rss version=\"".$this->RSSVersion."\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function addInstant
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addInstant() {
var theimages = getImages('instant');
var image; var object; var canvas; var context;
var border = 16; var offset = 8; var inset = 2;
var icolor = ''; var ishadow = 0; var noshading;
Method fetch
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fetch($URI)
{
//preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
$URI_PARTS = parse_url($URI);
Method _httpsrequest
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
{
if($this->passcookies && $this->_redirectaddr)
$this->setcookies();
Method createFeed
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
$feed.= $this->_createStylesheetReferences();
$feed.= "<rss version=\"".$this->RSSVersion."\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n";
Function _prepare_post_body
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function _prepare_post_body($formvars, $formfiles)
{
settype($formvars, "array");
settype($formfiles, "array");
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function addIEInstant
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addIEInstant() {
var theimages = getImages('instant');
var image; var object; var vml; var display;
var border = 16; var offset = 8; var scale = 1;
var icolor = ''; var ishadow = 0; var noshading;
File jquery.lightbox.js
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* jQuery lightBox plugin
* This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
* and adapted to me for use like a plugin from jQuery.
* @name jquery-lightbox-0.5.js
Function buildOptions
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function buildOptions() {
foreach ($this->_matches[1] as $command) {
$command = trim($command);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function createFeed
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function createFeed() {
// if there is styleless output, use the content of this variable and ignore the rest
if ($this->stylelessOutput!="") {
return $this->stylelessOutput;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_mobile_data
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function get_mobile_data( $pv_browser_user_agent )
{
$mobile_browser = '';
$mobile_browser_number = '';
$mobile_device = '';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function FeedDate
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function FeedDate($dateString="") {
if ($dateString=="") $dateString = date("r");
if (is_numeric($dateString)) {
$this->unix = $dateString;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function add
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
add: function(image, options) {
Reflection.remove(image);
doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity }
if (options) {
Request
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class Request
{
const GET = 'GET';
const POST = 'POST';
const DELETE = 'DELETE';
Function add
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
add: function(image, options) {
Reflection.remove(image);
doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity }
if (options) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method createFeed
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createFeed() {
// if there is styleless output, use the content of this variable and ignore the rest
if ($this->stylelessOutput!="") {
return $this->stylelessOutput;
}
Function addDependencies
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function addDependencies($dependencies = array(), $component = null)
{
if ($this->environment->isProduction() && !empty($dependencies['production'])) {
$this->addDependencies($dependencies['production']);
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method get_mobile_data
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_mobile_data( $pv_browser_user_agent )
{
$mobile_browser = '';
$mobile_browser_number = '';
$mobile_device = '';
Method __toString
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __toString()
{
$hour = substr($this->getValue(), 0, 2);
if ($hour >= 12) {
$ampm = 'pm';
Method createFeed
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
if ($this->cssStyleSheet=="") {
$cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css";