From a2f7f260ba2e284fe33efd6ba68a572830f2d52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Fri, 20 Jul 2018 12:08:51 -0700 Subject: [PATCH] ignore PHP namespace statements --- lib/cc/engine/analyzers/php/main.rb | 1 + spec/cc/engine/analyzers/php/main_spec.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/cc/engine/analyzers/php/main.rb b/lib/cc/engine/analyzers/php/main.rb index d86924ca..73bcebd6 100644 --- a/lib/cc/engine/analyzers/php/main.rb +++ b/lib/cc/engine/analyzers/php/main.rb @@ -13,6 +13,7 @@ class Main < CC::Engine::Analyzers::Base ].freeze DEFAULT_MASS_THRESHOLD = 75 DEFAULT_FILTERS = [ + "(Stmt_Namespace ___)", "(Stmt_Use ___)", "(comments ___)", ].freeze diff --git a/spec/cc/engine/analyzers/php/main_spec.rb b/spec/cc/engine/analyzers/php/main_spec.rb index 45a87f84..135e3785 100644 --- a/spec/cc/engine/analyzers/php/main_spec.rb +++ b/spec/cc/engine/analyzers/php/main_spec.rb @@ -169,6 +169,7 @@ create_source_file("foo.php", <<~EOPHP) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy