Showing 140 of 176 total issues
Function checkAdditionalRequirements
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function checkAdditionalRequirements()
{
$status = "good";
$msg = "Image passed image specific requirements";
- 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_item_version
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function get_item_version( $pv_browser_user_agent, $pv_search_string, $pv_b_break_last='', $pv_extra_search='' )
{
// 12 is the longest that will be required, handles release dates: 20020323; 0.8.0+
$substring_length = 15;
$start_pos = 0; // set $start_pos to 0 for first iteration
- 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 index
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function index(&$request, &$response)
{
$requestMethod = $request->getRequestMethod();
if (Request::GET === $requestMethod) {
- 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 addDependencies
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addDependencies($dependencies = array(), $component = null)
{
if ($this->environment->isProduction() && !empty($dependencies['production'])) {
$this->addDependencies($dependencies['production']);
}
Method createFeed
has 33 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.= "<opml xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n";
Method execute
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute ()
{
$ch = curl_init();
$this->setAuth($ch);
Function _set_interface
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _set_interface() {
// Apply the HTML markup into body tag
$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');
// Get page sizes
var arrPageSizes = ___getPageSize();
Function createFeed
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
$feed.= $this->_createStylesheetReferences();
$feed.= "<feed version=\"0.3\" xmlns=\"http://purl.org/atom/ns#\"";
- 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 _setMIME
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function _setMIME($format) {
switch (strtoupper($format)) {
case "2.0":
// fall through
- 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 addCacheBusters
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function addCacheBusters()
{
foreach ($this->requirementLists as $key => $list) {
if ($key === self::CSS_LIST || $key === self::JS_LIST) {
foreach ($list as $index => $dependency) {
- 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 createPreview
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function createPreview($newHeight,$newWidth)
{
if (empty($newHeight) && empty($newWidth)) {
$newHeight = 275;
$newWidth = 250;
- 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 11 (exceeds 5 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";
- 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 remove
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function remove(&$request, &$response)
{
$form = new Form(
array(
'action' => $this->getUrlPrefix() . $request->getId()
Method createFeed
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createStylesheetReferences();
$feed.= "<feed version=\"0.1\" xmlns=\"http://example.com/newformat#\">\n";
$feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
Method createSquareThumb
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createSquareThumb($thumb_size = "")
{
if (empty($thumb_size)) {
$thumb_size = 75;
}
Method buildOptions
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildOptions() {
foreach ($this->_matches[1] as $command) {
$command = trim($command);
Method checkAdditionalRequirements
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function checkAdditionalRequirements()
{
$status = "good";
$msg = "Image passed image specific requirements";
Function addLining
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
function addLining(ctx,x,y,width,height,opacity,inset,inner,color) {
Function _keyboard_action
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _keyboard_action(objEvent) {
// To ie
if ( objEvent == null ) {
escapeKey = 27;
keycode = event.keyCode;
Function resolvePartsFromNonRestfulUri
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function resolvePartsFromNonRestfulUri()
{
if ($this->uriParts[1] === 'index.php') {
array_shift($this->uriParts);
}
- 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"