Categories
Latest version
v0.24.0
Updated on
May 17, 2022
Issues
112
Autofix
13
version = 1
test_patterns = [
"tests/**",
"test_e2e/**"
]
exclude_patterns = [
"vendor/**"
]
[[analyzers]]
name = "php"
enabled = true
[analyzers.meta]
bootstrap_files = ["config/bootstrap.php"]
Anti-pattern
12
Bug risk
77
Documentation
3
Performance
2
Security
14
Style
2
Type check
2
One or more compute intensive functions like count
, database calls(mysqli_query
, mysqli_fetch_assoc
, etc.) is being used in the loop condition.
Though using these functions is a cheap operation; however, there's still the function call overhead when calling it on each iteration.
This issue is raised when abstract methods are found outside of an abstract class. This would result in a fatal runtime error.
Defined magic method doesn't match any of the PHP's built-in magic methods. Visit this link to view the list of all the allowed magic methods.
The constructor signature contains one or more unused parameters. Since these are nowhere used in the class, it can be safely removed.
Cookies set without the httponly
flag can be read by a client-side script, leading to cookie theft from Cross-Site Scripting (XSS) attacks.