Function activate_domain
has a Cognitive Complexity of 384 (exceeds 5 allowed). Consider refactoring. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- Read upRead up
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 activate_domain
has 538 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
File Plugin.php
has 625 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Detain\MyAdminOpenSRS;
use Detain\MyAdminOpenSRS\OpenSRS;
Avoid deeply nested control flow statements. Open
if ($db->Record['website_status'] == 'active') {
$website_active = true;
}
Avoid deeply nested control flow statements. Open
if (mb_strtoupper($extraInfo['country_of_birth']) == 'FR') {
$extraInfo['place_of_birth'] = $extra['country_of_birth'];
$extraInfo['postal_code_of_birth'] = $extra['country_of_birth'];
}
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return true;
Missing class import via use statement (line '745', column '22'). Open
(new \MyAdmin\Mail())->multiMail($subject, $email, $serviceClass->getEmail(), 'admin/domain_error.tpl');
- 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 '51', column '22'). Open
$addon = new \AddonHandler();
- 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 '399', column '43'). Open
$osrsRequestObj = new \opensrs\Request();
- 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 '658', column '48'). Open
$request = new \opensrs\Request();
- 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 '698', column '52'). Open
$request = new \opensrs\Request();
- 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 '619', column '36'). Open
$request = new \opensrs\Request();
- 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 '268', column '36'). Open
$request = new \opensrs\Request();
- 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
Avoid unused local variables such as '$loader'. Open
$loader = $event->getSubject();
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
The variable $d_remains is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $expiry_full_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $expiry_full_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $tld_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $redempt_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $website_active is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $date_only_today is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $au_registrant_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $d_remains is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $expiry_full_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $au_registrant_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $e_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $redempt_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $dns_array is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $date_today is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $website_id is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $au_registrant_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $expiry_full_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $website_active is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $tld_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $e_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $redempt_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $redempt_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $website_active is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $expiry_full_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $tld_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $date_today is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $date_only_today is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $au_registrant_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $au_registrant_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $tld_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $au_registrant_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $tld_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $website_id is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $redempt_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $website_id is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $au_registrant_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $au_registrant_info is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $expiry_full_date is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $dns_array is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 $dns_array is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- 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 method activate_domain is not named in camelCase. Open
public static function activate_domain($id)
{
page_title('Activate Domain');
$settings = get_module_settings('domains');
$db = get_module_db('domains');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}