# HG changeset patch # User Tomas Mysik # Date 1496992616 -7200 # Node ID 73661dbdafd6ba80d8c69ce7052b095c3ddecd71 # Parent 8b57d477a2db83d51d2425902f72f33a2926b3a6 Remove blacklisted methods We now have context-sensitive lexer. diff -r 8b57d477a2db -r 73661dbdafd6 php/sigfiles/generate.php --- a/php/sigfiles/generate.php Thu Jun 08 06:53:53 2017 +0200 +++ b/php/sigfiles/generate.php Fri Jun 09 09:16:56 2017 +0200 @@ -133,13 +133,6 @@ 'oci_collection_trim' => 1, 'oci_collection_assign' => 1, ); -$methodBlackList = array( - 'clone', - 'throw', - 'isset', - 'echo', - 'eval', -); $preferHtmlProperties = array( 'mysqli', ); @@ -633,7 +626,7 @@ * @param tabs integer[optional] number of tabs for indentation */ function print_class (ReflectionClass $classRef, $tabs = 0) { - global $processedClasses, $preferHtmlProperties, $methodBlackList; + global $processedClasses, $preferHtmlProperties; $processedClasses [strtolower($classRef->getName())] = true; print "\n"; @@ -715,10 +708,6 @@ $methodsRef = $classRef->getMethods(); if (count ($methodsRef) > 0) { foreach ($methodsRef as $methodRef) { - /* @var $methodRef ReflectionMethod */ - if (in_array(strtolower($methodRef->getName()), $methodBlackList)) { - continue; - } print_method($classRef, $methodRef, $tabs + 1); } print "\n"; @@ -1056,7 +1045,6 @@ global $functionsDoc; global $classesDoc; global $fieldsDoc; - global $methodBlackList; $docComment = $ref->getDocComment(); if ($docComment) { @@ -1076,9 +1064,7 @@ } // @method foreach ($ref->getMethods() as $method) { - if (in_array(strtolower($method->getName()), $methodBlackList)) { - print_magic_method($ref, $method, $tabs); - } + print_magic_method($ref, $method, $tabs); } if (@$classesDoc[$refname]['id']) { print_Tabs ($tabs);