smartinmedia/cunity

View on GitHub
lib/Skoch/Filter/File/Adapter/Gd.php

Summary

Maintainability
C
7 hrs
Test Coverage

Method crop has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function crop($x, $y, $x1, $y1, $file, $target, $thumbwidth)
    {
        list(, , $type) = getimagesize($file);

        $source = false;
Severity: Minor
Found in lib/Skoch/Filter/File/Adapter/Gd.php - About 1 hr to fix

Method thumbnail has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function thumbnail($file, $target, $thumbwidth)
    {
        list($width, $height, $type) = getimagesize($file);

        $source = false;
Severity: Minor
Found in lib/Skoch/Filter/File/Adapter/Gd.php - About 1 hr to fix

Method createThumbnail has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function createThumbnail($width, $height, $target, $thumb, $source, $oldWidth, $oldHeight)
    {
        imagealphablending($thumb, false);
        imagesavealpha($thumb, true);

Severity: Minor
Found in lib/Skoch/Filter/File/Adapter/Gd.php - About 1 hr to fix

Method crop has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function crop($x, $y, $x1, $y1, $file, $target, $thumbwidth)
Severity: Major
Found in lib/Skoch/Filter/File/Adapter/Gd.php - About 50 mins to fix

Method createThumbnail has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private function createThumbnail($width, $height, $target, $thumb, $source, $oldWidth, $oldHeight)
Severity: Major
Found in lib/Skoch/Filter/File/Adapter/Gd.php - About 50 mins to fix

Method calculateMetrics has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private function calculateMetrics($width, $height, $keepRatio, $keepSmaller, $oldWidth, $oldHeight)
Severity: Minor
Found in lib/Skoch/Filter/File/Adapter/Gd.php - About 45 mins to fix

Method resize has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function resize($width,
                           $height,
                           $keepRatio,
                           $file,
                           $target,
Severity: Minor
Found in lib/Skoch/Filter/File/Adapter/Gd.php - About 45 mins to fix

There are no issues that match your filters.

Category
Status