Documentation

CodeCleaner

Interfaces, Classes and Traits

AbstractClassPass
The abstract class pass handles abstract classes and methods, complaining if there are too few or too many of either.
AssignThisVariablePass
Validate that the user input does not assign the `$this` variable.
CalledClassPass
The called class pass throws warnings for get_class() and get_called_class() outside a class context.
CallTimePassByReferencePass
Validate that the user did not use the call-time pass-by-reference that causes a fatal error.
CodeCleanerPass
A CodeCleaner pass is a PhpParser Node Visitor.
ExitPass
A CodeCleaner pass is a PhpParser Node Visitor.
FinalClassPass
The final class pass handles final classes.
FunctionContextPass
A CodeCleaner pass is a PhpParser Node Visitor.
FunctionReturnInWriteContextPass
Validate that the functions are used correctly.
ImplicitReturnPass
Add an implicit "return" to the last statement, provided it can be returned.
InstanceOfPass
Validate that the instanceof statement does not receive a scalar value or a non-class constant.
LeavePsyshAlonePass
Validate that the user input does not reference the `$__psysh__` variable.
LegacyEmptyPass
Validate that the user did not call the language construct `empty()` on a statement in PHP < 5.5.
ListPass
Validate that the list assignment.
LoopContextPass
The loop context pass handles invalid `break` and `continue` statements.
MagicConstantsPass
Swap out __DIR__ and __FILE__ magic constants with our best guess?
NamespaceAwarePass
Abstract namespace-aware code cleaner pass.
NamespacePass
Provide implicit namespaces for subsequent execution.
NoReturnValue
A class used internally by CodeCleaner to represent input, such as non-expression statements, with no return value.
PassableByReferencePass
Validate that only variables (and variable-like things) are passed by reference.
RequirePass
Add runtime validation for `require` and `require_once` calls.
StrictTypesPass
Provide implicit strict types declarations for for subsequent execution.
UseStatementPass
Provide implicit use statements for subsequent execution.
ValidClassNamePass
Validate that classes exist.
ValidConstantPass
Validate that namespaced constant references will succeed.
ValidConstructorPass
Validate that the constructor method is not static, and does not have a return type.
ValidFunctionNamePass
Validate that function calls will succeed.

Search results