2121use PHPJava \Utilities \Formatter ;
2222use PHPJava \Utilities \SuperClassResolver ;
2323use PHPJava \Utilities \TypeResolver ;
24+ use PHPJava \Core \JVM \Parameters \Settings ;
2425
2526trait Invokable
2627{
@@ -111,7 +112,7 @@ function ($argument) {
111112 )['arguments ' ];
112113
113114 // does not strict mode can be PHP types
114- if (!($ this ->options ['strict ' ] ?? true )) {
115+ if (!($ this ->options ['strict ' ] ?? Settings:: STRICT )) {
115116 $ formattedArguments = Formatter::signatureConvertToAmbiguousForPHP ($ formattedArguments );
116117 }
117118
@@ -120,13 +121,13 @@ function ($argument) {
120121 */
121122 $ methodSignature = Formatter::buildArgumentsSignature ($ formattedArguments );
122123
123- if (!($ this ->options ['validation ' ]['method ' ]['arguments_count_only ' ] ?? false )) {
124+ if (!($ this ->options ['validation ' ]['method ' ]['arguments_count_only ' ] ?? Settings:: VALIDATION_METHOD_ARGUMENTS_COUNT_ONLY )) {
124125 if ($ methodSignature === $ convertedPassedArguments ) {
125126 $ method = $ methodReference ;
126127 break ;
127128 }
128129 }
129- if (($ this ->options ['validation ' ]['method ' ]['arguments_count_only ' ] ?? false ) === true ) {
130+ if (($ this ->options ['validation ' ]['method ' ]['arguments_count_only ' ] ?? Settings:: VALIDATION_METHOD_ARGUMENTS_COUNT_ONLY ) === true ) {
130131 $ size = count ($ formattedArguments );
131132 $ passedArgumentsSize = count (
132133 $ arguments
@@ -180,7 +181,7 @@ function ($argument) {
180181 $ mnemonicMap = new OpCode ();
181182 $ executedCounter = 0 ;
182183 while ($ reader ->getOffset () < $ codeAttribute ->getOpCodeLength ()) {
183- if (++$ executedCounter > ($ this ->options ['max_stack_exceeded ' ] ?? \ PHPJava \ Core \ JVM \ Parameters \Invoker ::MAX_STACK_EXCEEDED )) {
184+ if (++$ executedCounter > ($ this ->options ['max_stack_exceeded ' ] ?? Settings ::MAX_STACK_EXCEEDED )) {
184185 throw new RuntimeException (
185186 'Max stack exceeded. PHPJava has been stopped by safety guard. ' .
186187 ' Maybe Java class has illegal program counter, stacks, or OpCode. '
0 commit comments