Remove unused code

- Remove commented code
- Remove unused/immediately overwritten variables
- Remove extraneous parameters
- Remove unreachable code
- Remove duplicate array keys
This commit is contained in:
Hypolite Petovan 2019-01-07 12:09:10 -05:00
parent 0c4f8277e6
commit 4a95ca280d
42 changed files with 43 additions and 218 deletions

View file

@ -298,8 +298,6 @@ class Image
$width = $this->getWidth();
$height = $this->getHeight();
$dest_width = $dest_height = 0;
if ((! $width)|| (! $height)) {
return false;
}
@ -502,8 +500,6 @@ class Image
$width = $this->getWidth();
$height = $this->getHeight();
$dest_width = $dest_height = 0;
if ((!$width)|| (!$height)) {
return false;
}
@ -693,8 +689,6 @@ class Image
return $string;
}
$quality = false;
ob_start();
// Enable interlacing
@ -736,7 +730,6 @@ class Image
Logger::log('Image: guessType: '.$filename . ($fromcurl?' from curl headers':''), Logger::DEBUG);
$type = null;
if ($fromcurl) {
$a = \get_app();
$headers=[];
$h = explode("\n", $header);
foreach ($h as $l) {
@ -835,8 +828,6 @@ class Image
*/
public static function getScalingDimensions($width, $height, $max)
{
$dest_width = $dest_height = 0;
if ((!$width) || (!$height)) {
return false;
}
@ -967,8 +958,6 @@ class Image
$hash = Photo::newResource();
$smallest = 0;
// Pictures are always public by now
//$defperm = '<'.$default_cid.'>';
$defperm = "";