Showing 110 of 127 total issues
Method render
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
echo "<h2>Settings for " . $this->moduleName . "</h2>\n";
if (isset($module->about)) {
echo "<p class=\"lead\">" . $module->about . "</p>\n";
File Folder.php
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace CameraLife\Models;
/**
* Folder class.
Function resize
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function resize($filename, $newSize, $quality = 91)
{
$baseImage = $this->originalImage;
$baseSize = $this->size;
- 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 render
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
echo "<h2>Site comments review</h2>";
echo "<p class=\"lead\">";
if ($this->checkpointId > 0) {
Function render
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
if ($this->photo->get('status') != 0) {
echo '<p class="alert alert-danger lead"><strong>Notice:</strong> This photo is not publicly viewable</p>';
}
- 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 handleGet
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleGet($get, $post, $files, $cookies)
{
$start = isset($get['start']) ? $get['start'] : 0;
$section = isset($get['section']) ? $get['section'] : null;
$this->model->setPage($start);
Method handleGet
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleGet($get, $post, $files, $cookies)
{
$this->htmlHeader($cookies);
/* Set up the page view */
Function render
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
echo '<div>' . PHP_EOL;
foreach ($this->openGraphObjects as $view) {
$openGraphObject = $view;
- 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 handleGet
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleGet($get, $post, $files, $cookies)
{
$this->htmlHeader($cookies);
/* Set up the page view */
Method handleGet
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleGet($get, $post, $files, $cookies)
{
if (Models\User::currentUser($cookies)->authorizationLevel < 5) {
throw new \Exception('You are not authorized to view this page');
}
Method resize
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function resize($filename, $newSize, $quality = 91)
{
$baseImage = $this->originalImage;
$baseSize = $this->size;
Function getRelated
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function getRelated()
{
//todo pass in referrer
global $_SERVER;
$retval = array($this->getFolder());
- 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 render
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
$start = $this->start;
$total = $this->total;
$perPage = $this->perPage;
- 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 checkPrerequesites
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function checkPrerequesites()
{
global $_SERVER;
$prerequesitesAreMet = true;
- 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 handleGet
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleGet($get, $post, $files, $cookies)
{
$photoCount = $this->model->getPhotoCount();
$folderCount = $this->model->getFolderCount();
$albumCount = $this->model->getTagCount();
Method handleGet
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleGet($get, $post, $files, $cookies)
{
if (Models\User::currentUser($cookies)->authorizationLevel < 5) {
throw new \Exception('You are not authorized to view this page');
}
Method findChangesOnDisk
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function findChangesOnDisk()
{
$retval = array();
$fileStore = FileStore::fileStoreWithName('photo');
Function handleGet
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function handleGet($get, $post, $files, $cookies)
{
$nextInstaller = null;
if (!Models\Database::installedSchemaIsCorrectVersion()) {
$driver = Models\Database::driverName();
- 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 handlePost
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function handlePost($get, $post, $files, $cookies)
{
if (Models\User::currentUser($cookies)->authorizationLevel < 5) {
throw new \Exception('You are not authorized to view this page');
}
- 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 handlePost
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function handlePost($get, $post, $files, $cookies)
{
if (Models\User::currentUser($cookies)->authorizationLevel < 5) {
throw new \Exception('You are not authorized to view this page');
}
- 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"