Function process
has a Cognitive Complexity of 149 (exceeds 5 allowed). Consider refactoring. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 process
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
File ImapAbuseCheck.php
has 395 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* TF Related Functionality
* @author Joe Huss <detain@interserver.net>
* @copyright 2019
Function getpart
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function getpart($mid, $p, $partno)
{
// $partno = '1', '2', '2.1', '2.1.3', etc for multipart, 0 if simple
// DECODE DATA
$data = $partno ? imap_fetchbody($this->mbox, $mid, $partno) : // multipart
- 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 getpart
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getpart($mid, $p, $partno)
{
// $partno = '1', '2', '2.1', '2.1.3', etc for multipart, 0 if simple
// DECODE DATA
$data = $partno ? imap_fetchbody($this->mbox, $mid, $partno) : // multipart
Function fix_headers
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function fix_headers($headers)
{
$out = '';
$state = 0;
$headers = false;
- 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
The class ImapAbuseCheck has 26 fields. Consider redesigning ImapAbuseCheck to keep the number of fields under 15. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
Method __construct
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($imap_server, $username, $password, $db, $delete_attachments = 1, $limit_ips = false)
{
$this->imap_server = $imap_server;
$this->imap_folder = preg_replace('/^{.*}/m', '', $this->imap_server);
$this->imap_username = $username;
Avoid deeply nested control flow statements. Open
if ($db->num_rows() > 0) {
$db->next_record(MYSQL_ASSOC);
$data = $GLOBALS['tf']->accounts->read($db->Record['mail_custid']);
$email = (!isset($data['email_abuse']) || trim($data['email_abuse']) == '') ? $data['account_lid'] : $data['email_abuse'];
$server_data = [
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($imap_server, $username, $password, $db, $delete_attachments = 1, $limit_ips = false)
Function __construct
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($imap_server, $username, $password, $db, $delete_attachments = 1, $limit_ips = false)
{
$this->imap_server = $imap_server;
$this->imap_folder = preg_replace('/^{.*}/m', '', $this->imap_server);
$this->imap_username = $username;
- 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
The method getpart() has a Cyclomatic Complexity of 18. The configured cyclomatic complexity threshold is 10. Open
public function getpart($mid, $p, $partno)
{
// $partno = '1', '2', '2.1', '2.1.3', etc for multipart, 0 if simple
// DECODE DATA
$data = $partno ? imap_fetchbody($this->mbox, $mid, $partno) : // multipart
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The method process() has a Cyclomatic Complexity of 48. The configured cyclomatic complexity threshold is 10. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Missing class import via use statement (line '85', column '38'). Open
$this->mongo_client= new \MongoDB\Client('mongodb://'.ZONEMTA_USERNAME.':'.rawurlencode(ZONEMTA_PASSWORD).'@'.ZONEMTA_HOST.':27017/');
- 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 '353', column '34'). Open
(new \MyAdmin\Mail())->clientMail($subject, $message, $email, 'client/abuse.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
The method connect() contains an exit expression. Open
$this->mbox = imap_open($this->imap_server, $this->imap_username, $this->imap_password) or die('Cannot connect to '.$this->imap_server);
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Avoid unused local variables such as '$abused'. Open
$abused = 0;
- 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
Avoid unused local variables such as '$h'. Open
$h = imap_headerinfo($this->mbox, $mid);
- 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 property $ip_regex is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $mongo_client is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $client_ips is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $imap_password is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $all_ips is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 $delete_attachments is not named in camelCase. Open
public function __construct($imap_server, $username, $password, $db, $delete_attachments = 1, $limit_ips = false)
{
$this->imap_server = $imap_server;
$this->imap_folder = preg_replace('/^{.*}/m', '', $this->imap_server);
$this->imap_username = $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 property $mb_users is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $preg_match_all is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $email_headers is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 $all_ips is not named in camelCase. Open
public function set_all_ips($all_ips)
{
$this->all_ips = $all_ips;
}
- 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 property $imap_server is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $delete_attachments is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $imap_folder is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $imap_username is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 $limit_ips is not named in camelCase. Open
public function __construct($imap_server, $username, $password, $db, $delete_attachments = 1, $limit_ips = false)
{
$this->imap_server = $imap_server;
$this->imap_folder = preg_replace('/^{.*}/m', '', $this->imap_server);
$this->imap_username = $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 property $preg_match is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $mb_ips is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 $imap_server is not named in camelCase. Open
public function __construct($imap_server, $username, $password, $db, $delete_attachments = 1, $limit_ips = false)
{
$this->imap_server = $imap_server;
$this->imap_folder = preg_replace('/^{.*}/m', '', $this->imap_server);
$this->imap_username = $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 property $limit_ips is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 property $mb_db is not named in camelCase. Open
class ImapAbuseCheck
{
public $imap_server;
public $imap_username;
public $imap_password;
- Read upRead up
- 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 variable $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_res is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_against is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_against is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $imap_server is not named in camelCase. Open
public function __construct($imap_server, $username, $password, $db, $delete_attachments = 1, $limit_ips = false)
{
$this->imap_server = $imap_server;
$this->imap_folder = preg_replace('/^{.*}/m', '', $this->imap_server);
$this->imap_username = $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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_against is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_against is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_res is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_against is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_against is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_against is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $email_template is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $email_template is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $delete_attachments is not named in camelCase. Open
public function __construct($imap_server, $username, $password, $db, $delete_attachments = 1, $limit_ips = false)
{
$this->imap_server = $imap_server;
$this->imap_folder = preg_replace('/^{.*}/m', '', $this->imap_server);
$this->imap_username = $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 $limit_ips is not named in camelCase. Open
public function __construct($imap_server, $username, $password, $db, $delete_attachments = 1, $limit_ips = false)
{
$this->imap_server = $imap_server;
$this->imap_folder = preg_replace('/^{.*}/m', '', $this->imap_server);
$this->imap_username = $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 $match_against is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_res is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $all_ips is not named in camelCase. Open
public function set_all_ips($all_ips)
{
$this->all_ips = $all_ips;
}
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $server_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_data is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 $match_res is not named in camelCase. Open
public function process($type = 'spam', $limit = false)
{
//print_r($this->MC);
if ($this->MC->Nmsgs > 0) {
$abused = 0;
- 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 load_all_ips is not named in camelCase. Open
public function load_all_ips()
{
//echo "Loading IP Blocks\n";
function_requirements('get_all_ips_from_ipblocks');
$this->all_ips = get_all_ips_from_ipblocks(true);
- 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() {
}
}
Source
The method list_folders is not named in camelCase. Open
public function list_folders()
{
/* This Gave me this:
<h1>Mailboxes</h1>
{mx.interserver.net:143/imap/readonly}INBOX.Archives.2009<br />
- 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() {
}
}
Source
The method get_ip_regex is not named in camelCase. Open
public function get_ip_regex()
{
return $this->ip_regex;
}
- 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() {
}
}
Source
The method register_preg_match is not named in camelCase. Open
public function register_preg_match($regex, $against = 'headers', $field = 'ip')
{
$regex = str_replace('%IP%', $this->get_ip_regex(), $regex);
$this->preg_match[] = [
'regex' => $regex,
- 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() {
}
}
Source
The method get_folders is not named in camelCase. Open
public function get_folders()
{
/* This Gave me this:
(0) {mx.interserver.net:143/imap/readonly}INBOX.Archives.2009,'.',64<br />
...
- 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() {
}
}
Source
The method delete_messages is not named in camelCase. Open
public function delete_messages()
{
imap_expunge($this->mbox);
}
- 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() {
}
}
Source
The method set_default_email_headers is not named in camelCase. Open
public function set_default_email_headers()
{
$this->email_headers = "MIME-Version: 1.0\nContent-type: text/html; charset=UTF-8\nFrom: Abuse <abuse@interserver.net>\n";
}
- 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() {
}
}
Source
The method fix_headers is not named in camelCase. Open
public static function fix_headers($headers)
{
$out = '';
$state = 0;
$headers = false;
- 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() {
}
}
Source
The method register_preg_match_all is not named in camelCase. Open
public function register_preg_match_all($regex, $against = 'headers', $field = 'ip')
{
$regex = str_replace('%IP%', $this->get_ip_regex(), $regex);
$this->preg_match_all[] = [
'regex' => $regex,
- 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() {
}
}
Source
The method set_all_ips is not named in camelCase. Open
public function set_all_ips($all_ips)
{
$this->all_ips = $all_ips;
}
- 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() {
}
}
Source
The method load_client_ips is not named in camelCase. Open
public function load_client_ips()
{
//echo "Loading IP Blocks\n";
function_requirements('get_client_ips');
$this->client_ips = get_client_ips(true);
- 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() {
}
}