Showing 117 of 749 total issues
Effect
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Effect {
private $out = '';
private $cookie = '';
private $response = 0;
private $hide_output = false;
MaybeA
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class MaybeA implements MaybeI {
protected $_x;
protected $_errors;
/** @var MaybeA */
public static $FALSE;
DB
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class DB {
protected $_db;
public $errors;
public $logs = [];
public $host;
Consider simplifying this complex logical expression. Open
Open
if(f=f||" "!==h[0],d.push(i),e++,"+"===h[0])for(g=!0;"+"===h[0];)c.push(h),h=a.lines[++a.index];i.substr(1)===h.substr(1)?(c.push(h),a.index++):g=!0}if("+"===(b[e]||"")[0]&&f&&(g=!0),g)return c;for(;e<b.length;)d.push(b[e++]);return{merged:d,changes:c}}function t(a){return a.reduce(function(a,b){return a&&"-"===b[0]},!0)}function u(a,b,c){for(var d=0;d<c;d++){var e=b[b.length-c+d].substr(1);if(a.lines[a.index+d]!==" "+e)return!1}return a.index+=c,!0}function v(a){var b=0,c=0;return a.forEach(function(a){if("string"!=typeof a){var d=v(a.mine),e=v(a.theirs);void 0!==b&&(d.oldLines===e.oldLines?b+=d.oldLines:b=void 0),void 0!==c&&(d.newLines===e.newLines?c+=d.newLines:c=void 0)}else void 0===c||"+"!==a[0]&&" "!==a[0]||c++,void 0===b||"-"!==a[0]&&" "!==a[0]||b++}),{oldLines:b,newLines:c}}b.__esModule=!0,b.calcLineCount=e,/*istanbul ignore start*/
Consider simplifying this complex logical expression. Open
Open
if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
isFunction$1(bCtor) && bCtor instanceof bCtor)
&& ('constructor' in a && 'constructor' in b)) {
return false;
}
Method malware_creator
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function malware_creator(string $path, string $per_unknown, bool $php_count, $frequency, $max_len, $size, $known): callable
Function f
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
r(/*istanbul ignore end*/s);return{oldFileName:a,newFileName:b,oldHeader:f,newHeader:g,hunks:l}}function f(a,b,c,d,f,g,h){var i=e(a,b,c,d,f,g,h),j=[];a==b&&j.push("Index: "+a),j.push("==================================================================="),j.push("--- "+i.oldFileName+("undefined"==typeof i.oldHeader?"":"\t"+i.oldHeader)),j.push("+++ "+i.newFileName+("undefined"==typeof i.newHeader?"":"\t"+i.newHeader));for(var k=0;k<i.hunks.length;k++){var l=i.hunks[k];j.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@"),j.push.apply(j,l.lines)}return j.join("\n")+"\n"}function g(a,b,c,d,e,g){return f(a,a,b,c,d,e,g)}b.__esModule=!0,b.structuredPatch=e,/*istanbul ignore start*/
Method block_now
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function block_now(int $code, string $parameter, string $value, string $pattern, int $block_time = 0, ?Request $req = null, ?string $custom_err = null) : Effect {
Function e
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function e(a,b,c,e,f,g,i){// Append an empty value to make cleanup easier
Method new_block
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function new_block(int $code, string $parameter, string $value, string $pattern, int $block_time = 0, ?Request $req = null) : MaybeBlock {
Avoid deeply nested control flow statements. Open
Open
if (in_array($bit_lower, ['_COOKIE', '_POST', '_GET'])) {
continue;
}
Function g
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
r(/*istanbul ignore end*/s);return{oldFileName:a,newFileName:b,oldHeader:f,newHeader:g,hunks:l}}function f(a,b,c,d,f,g,h){var i=e(a,b,c,d,f,g,h),j=[];a==b&&j.push("Index: "+a),j.push("==================================================================="),j.push("--- "+i.oldFileName+("undefined"==typeof i.oldHeader?"":"\t"+i.oldHeader)),j.push("+++ "+i.newFileName+("undefined"==typeof i.newHeader?"":"\t"+i.newHeader));for(var k=0;k<i.hunks.length;k++){var l=i.hunks[k];j.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@"),j.push.apply(j,l.lines)}return j.join("\n")+"\n"}function g(a,b,c,d,e,g){return f(a,a,b,c,d,e,g)}b.__esModule=!0,b.structuredPatch=e,/*istanbul ignore start*/
Avoid deeply nested control flow statements. Open
Open
(s=/*istanbul ignore end*/o).push.apply(/*istanbul ignore start*/s,/*istanbul ignore start*/d(/*istanbul ignore end*/j(f.slice(0,t))));var u={oldStart:m,oldLines:p-m+t,newStart:n,newLines:q-n+t,lines:o};if(a>=k.length-2&&f.length<=i.context){
// EOF is inside this hunk
var v=/\n$/.test(c),w=/\n$/.test(e);0!=f.length||v?v&&w||o.push("\\ No newline at end of file"):
// special case: old has no eol and no trailing context; no-nl can end up before adds
o.splice(u.oldLines,0,"\\ No newline at end of file")}l.push(u),m=0,n=0,o=[]}p+=f.length,q+=f.length}},s=0;s<k.length;s++)/*istanbul ignore start*/
Method file_yield
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function file_yield(string $dirname, string $include_regex_filter = NULL, int $max_files = 20000, int $skip_files = 0, int $stop_time = 0, bool $root = true) : ?\Generator {
Consider simplifying this complex logical expression. Open
Open
if (($agent->browser == "chrome" && version_compare($agent->ver, "78.0") < 0)
|| ($agent->browser == "edge" && version_compare($agent->ver, "17.0") < 0)
|| ($agent->browser == "explorer") || ($agent->browser == "safari")) {
$effect->header("X-XSS-Protection", ": 1; mode=block");
Consider simplifying this complex logical expression. Open
Open
if (
($header['hash1'] === $key_hashes[0] && $header['hash2'] === $key_hashes[1]) ||
($header['expires'] < $ctx['now']) ||
($priority === CUCKOO_PERM) ||
($priority > CUCKOO_LOW && !($header['flags'] & CUCKOO_HIGH))
Consider simplifying this complex logical expression. Open
Open
if (
($header['hash1'] === $key_hashes[0] && $header['hash2'] === $key_hashes[1]) ||
($header['expires'] < $ctx['now']) ||
($priority === CUCKOO_PERM) ||
($priority > CUCKOO_LOW && !($header['flags'] & CUCKOO_HIGH))
Method http_response
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function http_response(string $content, string $url, array $headers, int $len, bool $success) : HttpResponse {
Method insert_stmt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function insert_stmt(string $table, array $data, int $on_duplicate = DB_DUPLICATE_IGNORE, ?array $no_update = null, ?array $if_null = null) : string {
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct(string $content, string $url, array $headers, int $len, bool $success)