public/main/inc/lib/formvalidator/Rule/UsernameAvailable.php
The parameter $current_username is not named in camelCase. Open
Open
public function validate($username, $current_username = null)
{
$user_table = Database::get_main_table(TABLE_MAIN_USER);
$username = Database::escape_string($username);
$current_username = Database::escape_string($current_username);
- 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 class HTML_QuickForm_Rule_UsernameAvailable is not named in CamelCase. Open
Open
class HTML_QuickForm_Rule_UsernameAvailable extends HTML_QuickForm_Rule
{
/**
* Function to check if a username is available.
*
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Variable "user_table" is not in valid camel caps format Open
Open
$sql = "SELECT * FROM $user_table WHERE username = '$username'";
- Exclude checks
Variable "current_username" is not in valid camel caps format Open
Open
$sql .= " AND username != '$current_username'";
- Exclude checks
Variable "user_table" is not in valid camel caps format Open
Open
$user_table = Database::get_main_table(TABLE_MAIN_USER);
- Exclude checks
Variable "current_username" is not in valid camel caps format Open
Open
$current_username = Database::escape_string($current_username);
- Exclude checks
Variable "current_username" is not in valid camel caps format Open
Open
if (!is_null($current_username)) {
- Exclude checks
Variable "current_username" is not in valid camel caps format Open
Open
$current_username = Database::escape_string($current_username);
- Exclude checks
Variable "current_username" is not in valid camel caps format Open
Open
public function validate($username, $current_username = null)
- Exclude checks
Class name "HTML_QuickForm_Rule_UsernameAvailable" is not in camel caps format Open
Open
class HTML_QuickForm_Rule_UsernameAvailable extends HTML_QuickForm_Rule
- Exclude checks
The variable $current_username is not named in camelCase. Open
Open
public function validate($username, $current_username = null)
{
$user_table = Database::get_main_table(TABLE_MAIN_USER);
$username = Database::escape_string($username);
$current_username = Database::escape_string($current_username);
- 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 $current_username is not named in camelCase. Open
Open
public function validate($username, $current_username = null)
{
$user_table = Database::get_main_table(TABLE_MAIN_USER);
$username = Database::escape_string($username);
$current_username = Database::escape_string($current_username);
- 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 $user_table is not named in camelCase. Open
Open
public function validate($username, $current_username = null)
{
$user_table = Database::get_main_table(TABLE_MAIN_USER);
$username = Database::escape_string($username);
$current_username = Database::escape_string($current_username);
- 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 $current_username is not named in camelCase. Open
Open
public function validate($username, $current_username = null)
{
$user_table = Database::get_main_table(TABLE_MAIN_USER);
$username = Database::escape_string($username);
$current_username = Database::escape_string($current_username);
- 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 $current_username is not named in camelCase. Open
Open
public function validate($username, $current_username = null)
{
$user_table = Database::get_main_table(TABLE_MAIN_USER);
$username = Database::escape_string($username);
$current_username = Database::escape_string($current_username);
- 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 $user_table is not named in camelCase. Open
Open
public function validate($username, $current_username = null)
{
$user_table = Database::get_main_table(TABLE_MAIN_USER);
$username = Database::escape_string($username);
$current_username = Database::escape_string($current_username);
- 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();
}
}