From 6dc8f6ea7e2c5caf75d51842ae40edb729b8d69f Mon Sep 17 00:00:00 2001 From: Shane Auckland Date: Mon, 22 Jun 2015 17:17:08 +0100 Subject: [PATCH] Improve constructor placement regex --- .../CodeGenerator/Generator/MethodGeneratorInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpec/CodeGenerator/Generator/MethodGeneratorInterface.php b/src/PhpSpec/CodeGenerator/Generator/MethodGeneratorInterface.php index ae812d875..45863e8af 100644 --- a/src/PhpSpec/CodeGenerator/Generator/MethodGeneratorInterface.php +++ b/src/PhpSpec/CodeGenerator/Generator/MethodGeneratorInterface.php @@ -16,5 +16,5 @@ interface MethodGeneratorInterface { const METHOD_PLACEMENT = '/}[ \n]*$/'; - const CONSTRUCTOR_PLACEMENT = '/\n(?=\s*(private|protected|public)?\s?function)/'; + const CONSTRUCTOR_PLACEMENT = '/\n(?=\s*(private|protected|public|static|final|abstract|\s)*function)/'; }