The class MImage has 16 public methods. Consider refactoring MImage to keep number of public methods under 10. Open
class MImage extends MFile
{
protected $m_oImage;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
The class MImage has an overall complexity of 51 which is very high. The configured complexity threshold is 50. Open
class MImage extends MFile
{
protected $m_oImage;
- Create a ticketCreate a ticket
- Exclude checks
MImage
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class MImage extends MFile
{
protected $m_oImage;
- Create a ticketCreate a ticket
Function loadImage
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function loadImage() {
if (MImage::isImageMagickInstalled() && false) {
$this->handler = new MImageMagickHandler();
} else if (MImage::isGdInstalled()) {
- Read upRead up
- Create a ticketCreate a ticket
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 saveScaledImgAsFile
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function saveScaledImgAsFile($width, $height, $filePath = "")
{
if ($this->isJpeg()) {
$inputPel = new PelJpeg($this->getPath());
$oldExif = $inputPel->getExif();
- Create a ticketCreate a ticket
Function saveScaledImgAsFile
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function saveScaledImgAsFile($width, $height, $filePath = "")
{
if ($this->isJpeg()) {
$inputPel = new PelJpeg($this->getPath());
$oldExif = $inputPel->getExif();
- Read upRead up
- Create a ticketCreate a ticket
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 saveAsFile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function saveAsFile($filePath = "", $quality = 80)
{
if (!empty($filePath)) {
$sFilePath = $filePath;
- Read upRead up
- Create a ticketCreate a ticket
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
The method __construct has a boolean flag argument $loadImageResourceOnCreation, which is a certain sign of a Single Responsibility Principle violation. Open
public function __construct($filePath, $loadImageResourceOnCreation = false, $type = "jpg") {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Remove error control operator '@' on line 122. Open
public function readExifDate() {
$exifData = @exif_read_data($this->getPath());
if ( isset($exifData['DateTimeDigitized']) ) {
return MTimestampHelper::getTimestampFromExifFormatedDateTime(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
The method saveAsFile uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sFilePath = $this->getPath();
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method readExifDate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo "warn: " . $this->getPath() . " does not have defined exifdate.\n";
//var_dump($exifData);
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'webfilesframework\core\datasystem\file\format\media\image\MImage' in method 'loadImage'. Open
if (MImage::isImageMagickInstalled() && false) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'webfilesframework\core\datasystem\file\format\media\image\MImage' in method 'loadImage'. Open
} else if (MImage::isGdInstalled()) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method saveScaledImgAsFile uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$sFilePath = $this->getPath();
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method loadImage uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\webfilesframework\core\datatype\time\MTimestampHelper' in method 'readExifDate'. Open
return MTimestampHelper::getTimestampFromExifFormatedDateTime(
$exifData['DateTimeOriginal']); //e.g. 2016:12:22 14:49:07
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\webfilesframework\core\datatype\time\MTimestampHelper' in method 'readExifDate'. Open
return MTimestampHelper::getTimestampFromExifFormatedDateTime(
$exifData['DateTimeDigitized']); //e.g. 2016:12:22 14:49:07
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method saveScaledImgAsFileWithBiggerSize uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->saveScaledImgAsFileWithHeight($p_iBiggerSize, $p_sFilePath);
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid unused parameters such as '$outputPath'. Open
function copyMeta($inputPath, $outputPath) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$inputPath'. Open
function copyMeta($inputPath, $outputPath) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid excessively long variable names like $loadImageResourceOnCreation. Keep variable name length under 20. Open
public function __construct($filePath, $loadImageResourceOnCreation = false, $type = "jpg") {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
The parameter $p_sFilePath is not named in camelCase. Open
public function saveScaledImgAsFileWithHeight($p_iHeight, $p_sFilePath = "")
{
$iWidth = $this->getImageWidth();
$iHeight = $this->getImageHeight();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $m_sType is not named in camelCase. Open
class MImage extends MFile
{
protected $m_oImage;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $p_iHeight is not named in camelCase. Open
public function saveScaledImgAsFileWithHeight($p_iHeight, $p_sFilePath = "")
{
$iWidth = $this->getImageWidth();
$iHeight = $this->getImageHeight();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $m_oImage is not named in camelCase. Open
class MImage extends MFile
{
protected $m_oImage;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $p_iWidth is not named in camelCase. Open
public function saveScaledImgAsFileWithWidth($p_iWidth, $p_sFilePath = "")
{
$iWidth = $this->getImageWidth();
$iProportion = $p_iWidth / $iWidth;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $p_iBiggerSize is not named in camelCase. Open
public function saveScaledImgAsFileWithBiggerSize($p_iBiggerSize, $p_sFilePath = "")
{
// TODO exif informationen mitkopieren
ini_set ('gd.jpeg_ignore_warning', 1);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $p_sFilePath is not named in camelCase. Open
public function saveScaledImgAsFileWithBiggerSize($p_iBiggerSize, $p_sFilePath = "")
{
// TODO exif informationen mitkopieren
ini_set ('gd.jpeg_ignore_warning', 1);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $p_sFilePath is not named in camelCase. Open
public function saveScaledImgAsFileWithPercent($p_iPercent, $p_sFilePath = "")
{
$iNewHeigt = ceil($this->getImageHeight() * ($p_iPercent / 100));
$iNewWidth = ceil($this->getImageWidth() * ($p_iPercent / 100));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $p_sFilePath is not named in camelCase. Open
public function saveScaledImgAsFileWithWidth($p_iWidth, $p_sFilePath = "")
{
$iWidth = $this->getImageWidth();
$iProportion = $p_iWidth / $iWidth;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $p_iPercent is not named in camelCase. Open
public function saveScaledImgAsFileWithPercent($p_iPercent, $p_sFilePath = "")
{
$iNewHeigt = ceil($this->getImageHeight() * ($p_iPercent / 100));
$iNewWidth = ceil($this->getImageWidth() * ($p_iPercent / 100));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The variable $p_iHeight is not named in camelCase. Open
public function saveScaledImgAsFileWithHeight($p_iHeight, $p_sFilePath = "")
{
$iWidth = $this->getImageWidth();
$iHeight = $this->getImageHeight();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_iBiggerSize is not named in camelCase. Open
public function saveScaledImgAsFileWithBiggerSize($p_iBiggerSize, $p_sFilePath = "")
{
// TODO exif informationen mitkopieren
ini_set ('gd.jpeg_ignore_warning', 1);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_iBiggerSize is not named in camelCase. Open
public function saveScaledImgAsFileWithBiggerSize($p_iBiggerSize, $p_sFilePath = "")
{
// TODO exif informationen mitkopieren
ini_set ('gd.jpeg_ignore_warning', 1);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_sFilePath is not named in camelCase. Open
public function saveScaledImgAsFileWithBiggerSize($p_iBiggerSize, $p_sFilePath = "")
{
// TODO exif informationen mitkopieren
ini_set ('gd.jpeg_ignore_warning', 1);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_iPercent is not named in camelCase. Open
public function saveScaledImgAsFileWithPercent($p_iPercent, $p_sFilePath = "")
{
$iNewHeigt = ceil($this->getImageHeight() * ($p_iPercent / 100));
$iNewWidth = ceil($this->getImageWidth() * ($p_iPercent / 100));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_iWidth is not named in camelCase. Open
public function saveScaledImgAsFileWithWidth($p_iWidth, $p_sFilePath = "")
{
$iWidth = $this->getImageWidth();
$iProportion = $p_iWidth / $iWidth;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $img_y is not named in camelCase. Open
public function mirror()
{
$img_x = imagesx($this->m_oImage);
$img_y = imagesy($this->m_oImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_sFilePath is not named in camelCase. Open
public function saveScaledImgAsFileWithWidth($p_iWidth, $p_sFilePath = "")
{
$iWidth = $this->getImageWidth();
$iProportion = $p_iWidth / $iWidth;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $img_x is not named in camelCase. Open
public function mirror()
{
$img_x = imagesx($this->m_oImage);
$img_y = imagesy($this->m_oImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $img_x is not named in camelCase. Open
public function mirror()
{
$img_x = imagesx($this->m_oImage);
$img_y = imagesy($this->m_oImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $img_y is not named in camelCase. Open
public function mirror()
{
$img_x = imagesx($this->m_oImage);
$img_y = imagesy($this->m_oImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_iHeight is not named in camelCase. Open
public function saveScaledImgAsFileWithHeight($p_iHeight, $p_sFilePath = "")
{
$iWidth = $this->getImageWidth();
$iHeight = $this->getImageHeight();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $img_x is not named in camelCase. Open
public function mirror()
{
$img_x = imagesx($this->m_oImage);
$img_y = imagesy($this->m_oImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_iWidth is not named in camelCase. Open
public function saveScaledImgAsFileWithWidth($p_iWidth, $p_sFilePath = "")
{
$iWidth = $this->getImageWidth();
$iProportion = $p_iWidth / $iWidth;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_sFilePath is not named in camelCase. Open
public function saveScaledImgAsFileWithPercent($p_iPercent, $p_sFilePath = "")
{
$iNewHeigt = ceil($this->getImageHeight() * ($p_iPercent / 100));
$iNewWidth = ceil($this->getImageWidth() * ($p_iPercent / 100));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $img_x is not named in camelCase. Open
public function mirror()
{
$img_x = imagesx($this->m_oImage);
$img_y = imagesy($this->m_oImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $img_y is not named in camelCase. Open
public function mirror()
{
$img_x = imagesx($this->m_oImage);
$img_y = imagesy($this->m_oImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_sFilePath is not named in camelCase. Open
public function saveScaledImgAsFileWithBiggerSize($p_iBiggerSize, $p_sFilePath = "")
{
// TODO exif informationen mitkopieren
ini_set ('gd.jpeg_ignore_warning', 1);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $img_x is not named in camelCase. Open
public function mirror()
{
$img_x = imagesx($this->m_oImage);
$img_y = imagesy($this->m_oImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_sFilePath is not named in camelCase. Open
public function saveScaledImgAsFileWithHeight($p_iHeight, $p_sFilePath = "")
{
$iWidth = $this->getImageWidth();
$iHeight = $this->getImageHeight();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_iPercent is not named in camelCase. Open
public function saveScaledImgAsFileWithPercent($p_iPercent, $p_sFilePath = "")
{
$iNewHeigt = ceil($this->getImageHeight() * ($p_iPercent / 100));
$iNewWidth = ceil($this->getImageWidth() * ($p_iPercent / 100));
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $img_y is not named in camelCase. Open
public function mirror()
{
$img_x = imagesx($this->m_oImage);
$img_y = imagesy($this->m_oImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}