getFormFeedback accesses the super-global variable $GLOBALS. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
getFormFeedback accesses the super-global variable $_SERVER. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Method getFormFeedback
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
The method getFormFeedback() has 128 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- Exclude checks
Missing class import via use statement (line '83', column '26'). Open
$recipient = new \XoopsFormText(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '187', column '31'). Open
$form->addElement(new \XoopsFormButtonTray('', \_SUBMIT, 'submit', '', false));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '96', column '26'). Open
$your_name = new \XoopsFormText(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '178', column '40'). Open
$editor = new \XoopsFormEditor(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '186', column '31'). Open
$form->addElement(new \XoopsFormHidden('op', 'send'));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '109', column '26'). Open
$your_site = new \XoopsFormText(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method getFormFeedback has a boolean flag argument $action, which is a certain sign of a Single Responsibility Principle violation. Open
public function getFormFeedback($action = false): \XoopsThemeForm
- Read upRead up
- 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
Missing class import via use statement (line '73', column '21'). Open
$form = new \XoopsThemeForm(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '135', column '29'). Open
$fbtypeSelect = new \XoopsFormSelect(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '122', column '26'). Open
$your_mail = new \XoopsFormText(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 28 and the first side effect is on line 23. Open
<?php declare(strict_types=1);
- Exclude checks
The variable $your_name is not named in camelCase. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- 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();
}
}
Source
The variable $your_name is not named in camelCase. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- 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();
}
}
Source
The variable $your_name is not named in camelCase. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- 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();
}
}
Source
The variable $your_mail is not named in camelCase. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- 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();
}
}
Source
The variable $your_site is not named in camelCase. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- 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();
}
}
Source
The variable $your_site is not named in camelCase. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- 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();
}
}
Source
The variable $your_mail is not named in camelCase. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- 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();
}
}
Source
The variable $your_mail is not named in camelCase. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- 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();
}
}
Source
The variable $your_site is not named in camelCase. Open
public function getFormFeedback($action = false): \XoopsThemeForm
{
if (!$action) {
$action = $_SERVER['REQUEST_URI'];
}
- 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();
}
}