Skip to content

Commit 411ac57

Browse files
committed
Fix Java examples using Kotlin-specific syntax
Java examples were incorrectly using Kotlin-specific syntax like listOf() and mapOf(). This commit fixes the issue by: - Added language-specific parameter support to getParamExample() method in Kotlin.php - Created getKotlinMapExample() and getJavaMapExample() helper methods for proper syntax generation - Updated getPermissionExample() to support both Java (Arrays.asList) and Kotlin (listOf) syntax - Added new javaParamExample Twig filter that generates Java-compatible syntax - Updated Java example templates to use javaParamExample filter - Fixed import ordering in Java templates to follow Java conventions (java.* imports first, then project imports) Now Java examples correctly use: - Arrays.asList() instead of listOf() - new HashMap<String, Object>() {{ put() }} instead of mapOf() - Collections.emptyList() instead of listOf()
1 parent 05367bc commit 411ac57

File tree

5 files changed

+217
-104
lines changed

5 files changed

+217
-104
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
- name: Setup PHP with PECL extension
9595
uses: shivammathur/setup-php@v2
9696
with:
97-
php-version: ${{ matrix.php-version }}
97+
php-version: '8.3'
9898
extensions: curl
9999

100100
- name: Install

0 commit comments

Comments
 (0)