Browse Source

[php] change class constants on externs from `var` to `final`

Aleksandr Kuzmenko 5 years ago
parent
commit
c607430c8b

+ 64 - 64
std/php/db/PDO.hx

@@ -26,70 +26,70 @@ import php.*;
 
 
 @:native('PDO')
 @:native('PDO')
 extern class PDO {
 extern class PDO {
-	@:phpClassConst static var PARAM_BOOL:Int;
-	@:phpClassConst static var PARAM_NULL:Int;
-	@:phpClassConst static var PARAM_INT:Int;
-	@:phpClassConst static var PARAM_STR:Int;
-	@:phpClassConst static var PARAM_LOB:Int;
-	@:phpClassConst static var PARAM_STMT:Int;
-	@:phpClassConst static var PARAM_INPUT_OUTPUT:Int;
-	@:phpClassConst static var FETCH_LAZY:Int;
-	@:phpClassConst static var FETCH_ASSOC:Int;
-	@:phpClassConst static var FETCH_NAMED:Int;
-	@:phpClassConst static var FETCH_NUM:Int;
-	@:phpClassConst static var FETCH_BOTH:Int;
-	@:phpClassConst static var FETCH_OBJ:Int;
-	@:phpClassConst static var FETCH_BOUND:Int;
-	@:phpClassConst static var FETCH_COLUMN:Int;
-	@:phpClassConst static var FETCH_CLASS:Int;
-	@:phpClassConst static var FETCH_INTO:Int;
-	@:phpClassConst static var FETCH_FUNC:Int;
-	@:phpClassConst static var FETCH_GROUP:Int;
-	@:phpClassConst static var FETCH_UNIQUE:Int;
-	@:phpClassConst static var FETCH_KEY_PAIR:Int;
-	@:phpClassConst static var FETCH_CLASSTYPE:Int;
-	@:phpClassConst static var FETCH_SERIALIZE:Int;
-	@:phpClassConst static var FETCH_PROPS_LATE:Int;
-	@:phpClassConst static var ATTR_AUTOCOMMIT:Int;
-	@:phpClassConst static var ATTR_PREFETCH:Int;
-	@:phpClassConst static var ATTR_TIMEOUT:Int;
-	@:phpClassConst static var ATTR_ERRMODE:Int;
-	@:phpClassConst static var ATTR_SERVER_VERSION:Int;
-	@:phpClassConst static var ATTR_CLIENT_VERSION:Int;
-	@:phpClassConst static var ATTR_SERVER_INFO:Int;
-	@:phpClassConst static var ATTR_CONNECTION_STATUS:Int;
-	@:phpClassConst static var ATTR_CASE:Int;
-	@:phpClassConst static var ATTR_CURSOR_NAME:Int;
-	@:phpClassConst static var ATTR_CURSOR:Int;
-	@:phpClassConst static var ATTR_DRIVER_NAME:String;
-	@:phpClassConst static var ATTR_ORACLE_NULLS:Int;
-	@:phpClassConst static var ATTR_PERSISTENT:Int;
-	@:phpClassConst static var ATTR_STATEMENT_CLASS:Int;
-	@:phpClassConst static var ATTR_FETCH_TABLE_NAMES:Int;
-	@:phpClassConst static var ATTR_STRINGIFY_FETCHES:Int;
-	@:phpClassConst static var ATTR_EMULATE_PREPARES:Int;
-	@:phpClassConst static var ERRMODE_SILENT:Int;
-	@:phpClassConst static var ERRMODE_WARNING:Int;
-	@:phpClassConst static var ERRMODE_EXCEPTION:Int;
-	@:phpClassConst static var CASE_NATURAL:Int;
-	@:phpClassConst static var CASE_LOWER:Int;
-	@:phpClassConst static var CASE_UPPER:Int;
-	@:phpClassConst static var NULL_NATURAL:Int;
-	@:phpClassConst static var FETCH_ORI_PRIOR:Int;
-	@:phpClassConst static var FETCH_ORI_FIRST:Int;
-	@:phpClassConst static var FETCH_ORI_LAST:Int;
-	@:phpClassConst static var FETCH_ORI_ABS:Int;
-	@:phpClassConst static var FETCH_ORI_REL:Int;
-	@:phpClassConst static var CURSOR_FWDONLY:Int;
-	@:phpClassConst static var CURSOR_SCROLL:Int;
-	@:phpClassConst static var ERR_NONE:String;
-	@:phpClassConst static var PARAM_EVT_ALLOC:Int;
-	@:phpClassConst static var PARAM_EVT_FREE:Int;
-	@:phpClassConst static var PARAM_EVT_EXEC_PRE:Int;
-	@:phpClassConst static var PARAM_EVT_EXEC_POST:Int;
-	@:phpClassConst static var PARAM_EVT_FETCH_PRE:Int;
-	@:phpClassConst static var PARAM_EVT_FETCH_POST:Int;
-	@:phpClassConst static var PARAM_EVT_NORMALIZE:Int;
+	@:phpClassConst static final PARAM_BOOL:Int;
+	@:phpClassConst static final PARAM_NULL:Int;
+	@:phpClassConst static final PARAM_INT:Int;
+	@:phpClassConst static final PARAM_STR:Int;
+	@:phpClassConst static final PARAM_LOB:Int;
+	@:phpClassConst static final PARAM_STMT:Int;
+	@:phpClassConst static final PARAM_INPUT_OUTPUT:Int;
+	@:phpClassConst static final FETCH_LAZY:Int;
+	@:phpClassConst static final FETCH_ASSOC:Int;
+	@:phpClassConst static final FETCH_NAMED:Int;
+	@:phpClassConst static final FETCH_NUM:Int;
+	@:phpClassConst static final FETCH_BOTH:Int;
+	@:phpClassConst static final FETCH_OBJ:Int;
+	@:phpClassConst static final FETCH_BOUND:Int;
+	@:phpClassConst static final FETCH_COLUMN:Int;
+	@:phpClassConst static final FETCH_CLASS:Int;
+	@:phpClassConst static final FETCH_INTO:Int;
+	@:phpClassConst static final FETCH_FUNC:Int;
+	@:phpClassConst static final FETCH_GROUP:Int;
+	@:phpClassConst static final FETCH_UNIQUE:Int;
+	@:phpClassConst static final FETCH_KEY_PAIR:Int;
+	@:phpClassConst static final FETCH_CLASSTYPE:Int;
+	@:phpClassConst static final FETCH_SERIALIZE:Int;
+	@:phpClassConst static final FETCH_PROPS_LATE:Int;
+	@:phpClassConst static final ATTR_AUTOCOMMIT:Int;
+	@:phpClassConst static final ATTR_PREFETCH:Int;
+	@:phpClassConst static final ATTR_TIMEOUT:Int;
+	@:phpClassConst static final ATTR_ERRMODE:Int;
+	@:phpClassConst static final ATTR_SERVER_VERSION:Int;
+	@:phpClassConst static final ATTR_CLIENT_VERSION:Int;
+	@:phpClassConst static final ATTR_SERVER_INFO:Int;
+	@:phpClassConst static final ATTR_CONNECTION_STATUS:Int;
+	@:phpClassConst static final ATTR_CASE:Int;
+	@:phpClassConst static final ATTR_CURSOR_NAME:Int;
+	@:phpClassConst static final ATTR_CURSOR:Int;
+	@:phpClassConst static final ATTR_DRIVER_NAME:String;
+	@:phpClassConst static final ATTR_ORACLE_NULLS:Int;
+	@:phpClassConst static final ATTR_PERSISTENT:Int;
+	@:phpClassConst static final ATTR_STATEMENT_CLASS:Int;
+	@:phpClassConst static final ATTR_FETCH_TABLE_NAMES:Int;
+	@:phpClassConst static final ATTR_STRINGIFY_FETCHES:Int;
+	@:phpClassConst static final ATTR_EMULATE_PREPARES:Int;
+	@:phpClassConst static final ERRMODE_SILENT:Int;
+	@:phpClassConst static final ERRMODE_WARNING:Int;
+	@:phpClassConst static final ERRMODE_EXCEPTION:Int;
+	@:phpClassConst static final CASE_NATURAL:Int;
+	@:phpClassConst static final CASE_LOWER:Int;
+	@:phpClassConst static final CASE_UPPER:Int;
+	@:phpClassConst static final NULL_NATURAL:Int;
+	@:phpClassConst static final FETCH_ORI_PRIOR:Int;
+	@:phpClassConst static final FETCH_ORI_FIRST:Int;
+	@:phpClassConst static final FETCH_ORI_LAST:Int;
+	@:phpClassConst static final FETCH_ORI_ABS:Int;
+	@:phpClassConst static final FETCH_ORI_REL:Int;
+	@:phpClassConst static final CURSOR_FWDONLY:Int;
+	@:phpClassConst static final CURSOR_SCROLL:Int;
+	@:phpClassConst static final ERR_NONE:String;
+	@:phpClassConst static final PARAM_EVT_ALLOC:Int;
+	@:phpClassConst static final PARAM_EVT_FREE:Int;
+	@:phpClassConst static final PARAM_EVT_EXEC_PRE:Int;
+	@:phpClassConst static final PARAM_EVT_EXEC_POST:Int;
+	@:phpClassConst static final PARAM_EVT_FETCH_PRE:Int;
+	@:phpClassConst static final PARAM_EVT_FETCH_POST:Int;
+	@:phpClassConst static final PARAM_EVT_NORMALIZE:Int;
 
 
 	function new(dns:String, ?username:String, ?password:String, ?options:NativeArray):Void;
 	function new(dns:String, ?username:String, ?password:String, ?options:NativeArray):Void;
 	function beginTransaction():Bool;
 	function beginTransaction():Bool;

+ 3 - 3
std/php/reflection/ReflectionClass.hx

@@ -26,9 +26,9 @@ import haxe.extern.Rest;
 
 
 @:native('ReflectionClass')
 @:native('ReflectionClass')
 extern class ReflectionClass implements Reflector {
 extern class ReflectionClass implements Reflector {
-	@:phpClassConst static var IS_IMPLICIT_ABSTRACT:Int;
-	@:phpClassConst static var IS_EXPLICIT_ABSTRACT:Int;
-	@:phpClassConst static var IS_FINAL:Int;
+	@:phpClassConst static final IS_IMPLICIT_ABSTRACT:Int;
+	@:phpClassConst static final IS_EXPLICIT_ABSTRACT:Int;
+	@:phpClassConst static final IS_FINAL:Int;
 
 
 	static function export(argument:Dynamic, returnValue:Bool = false):String;
 	static function export(argument:Dynamic, returnValue:Bool = false):String;
 
 

+ 6 - 6
std/php/reflection/ReflectionMethod.hx

@@ -27,12 +27,12 @@ import haxe.extern.Rest;
 
 
 @:native('ReflectionMethod')
 @:native('ReflectionMethod')
 extern class ReflectionMethod extends ReflectionFunctionAbstract {
 extern class ReflectionMethod extends ReflectionFunctionAbstract {
-	@:phpClassConst static var IS_STATIC:Int;
-	@:phpClassConst static var IS_PUBLIC:Int;
-	@:phpClassConst static var IS_PROTECTED:Int;
-	@:phpClassConst static var IS_PRIVATE:Int;
-	@:phpClassConst static var IS_ABSTRACT:Int;
-	@:phpClassConst static var IS_FINAL:Int;
+	@:phpClassConst static final IS_STATIC:Int;
+	@:phpClassConst static final IS_PUBLIC:Int;
+	@:phpClassConst static final IS_PROTECTED:Int;
+	@:phpClassConst static final IS_PRIVATE:Int;
+	@:phpClassConst static final IS_ABSTRACT:Int;
+	@:phpClassConst static final IS_FINAL:Int;
 
 
 	// public var class : String;
 	// public var class : String;
 	public static function export(className:String, name:String, ?returnValue:Bool):String;
 	public static function export(className:String, name:String, ?returnValue:Bool):String;

+ 4 - 4
std/php/reflection/ReflectionProperty.hx

@@ -24,10 +24,10 @@ package php.reflection;
 
 
 @:native('ReflectionProperty')
 @:native('ReflectionProperty')
 extern class ReflectionProperty implements Reflector {
 extern class ReflectionProperty implements Reflector {
-	@:phpClassConst static var IS_STATIC:Int;
-	@:phpClassConst static var IS_:Int;
-	@:phpClassConst static var IS_PROTECTED:Int;
-	@:phpClassConst static var IS_PRIVATE:Int;
+	@:phpClassConst static final IS_STATIC:Int;
+	@:phpClassConst static final IS_:Int;
+	@:phpClassConst static final IS_PROTECTED:Int;
+	@:phpClassConst static final IS_PRIVATE:Int;
 
 
 	var name:String;
 	var name:String;