| @@ -310,9 +310,9 @@ | ||
| 310 | 310 | --$index; |
| 311 | 311 | } |
| 312 | 312 | // Heart of the algorithm: . |
| 313 | 313 | // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition |
| 314 | - while ( $stack->count > 0 && ( $o2 = $stack->last() ) && in_array( $o2, $ops, true ) && ( $ops_r[ $op ] ? $ops_p[ $op ] < $ops_p[ $o2 ] : $ops_p[ $op ] <= $ops_p[ $o2 ] ) ) { | |
| 314 | + while ( $stack->count > 0 && ( $o2 = $stack->last() ) && in_array( $o2, $ops, true ) && ( $ops_r[ $op ] ? $ops_p[ $op ] < $ops_p[ $o2 ] : $ops_p[ $op ] <= $ops_p[ $o2 ] ) ) { // @phpstan-ignore offsetAccess.notFound | |
| 315 | 315 | // Pop stuff off the stack into the output. |
| 316 | 316 | $output[] = $stack->pop(); |
| 317 | 317 | } |
| 318 | 318 | // Many thanks: https://en.wikipedia.org/wiki/Reverse_Polish_notation . |
| @@ -962,9 +962,9 @@ | ||
| 962 | 962 | * @param array<int, double|int> ...$args Values for which the mode shall be calculated. |
| 963 | 963 | * @return double|int Mode of the passed arguments. |
| 964 | 964 | */ |
| 965 | 965 | public static function mode( ...$args ) /* : float|int */ { |
| 966 | - $values = array_count_values( $args ); // @phpstan-ignore argument.type | |
| 966 | + $values = array_count_values( $args ); // @phpstan-ignore argument.type, argument.type | |
| 967 | 967 | asort( $values ); |
| 968 | 968 | return array_key_last( $values ); // @phpstan-ignore return.type |
| 969 | 969 | } |
| 970 | 970 | |