include/notification.inc.php
Avoid using undefined variables such as '$item' which will lead to PHP notices. Open
Open
$item['name'] = $photo->getVar('photo_desc');
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$item' which will lead to PHP notices. Open
Open
$item['url'] = XOOPS_URL . '/modules/extgallery/public-album.php?id=' . $photo->getVar('photo_id');
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$item' which will lead to PHP notices. Open
Open
return $item;
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid unused parameters such as '$category'. Open
Open
function extgalleryNotifyIteminfo($category, $item_id)
- Read upRead up
- 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
The parameter $item_id is not named in camelCase. Open
Open
function extgalleryNotifyIteminfo($category, $item_id)
{
/** @var Extgallery\PublicPhotoHandler $photoHandler */
/** @var Extgallery\Photo $photo */
- Read upRead up
- 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 $item_id is not named in camelCase. Open
Open
function extgalleryNotifyIteminfo($category, $item_id)
{
/** @var Extgallery\PublicPhotoHandler $photoHandler */
/** @var Extgallery\Photo $photo */
- Read upRead up
- 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();
}
}