diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1777db3..905e29e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ Yii Framework 2 apidoc extension Change Log
- Bug #324: Raise minimum PHP version to 7.4 (mspirkov)
- Bug #325: Fix deprecation errors `The Default value will become of type Expression by default` (mspirkov)
- Bug #327: Fix deprecation errors `The expression value will become of type Expression by default` (mspirkov)
+- Bug #329: Fix getting parameter types from the `@method` annotation (mspirkov)
3.0.7 February 13, 2025
diff --git a/models/TypeDoc.php b/models/TypeDoc.php
index 8e99cd5..cdb7957 100644
--- a/models/TypeDoc.php
+++ b/models/TypeDoc.php
@@ -231,7 +231,7 @@ public function __construct($reflector = null, $context = null, $config = [])
'name' => $parameter->getName(),
'typeHint' => $argumentType,
'type' => $argumentType,
- 'types' => [],
+ 'types' => [$argumentType],
]);
}
diff --git a/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__1.html b/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__1.html
index 2b46ce7..dea2803 100644
--- a/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__1.html
+++ b/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__1.html
@@ -437,11 +437,17 @@
Method Details
|
-public integer getSomething ( $test ) |
+public integer getSomething ( $test, integer $test2 )
| $test |
- |
+ mixed |
+
+ |
+
+
+ | $test2 |
+ integer |
|
diff --git a/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__2.html b/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__2.html
index 6b317d4..9a2af61 100644
--- a/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__2.html
+++ b/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__2.html
@@ -323,11 +323,17 @@ Method Details
|
-public integer getSomething ( $test ) |
+public integer getSomething ( $test, integer $test2 )
| $test |
- |
+ mixed |
+
+ |
+
+
+ | $test2 |
+ integer |
|
diff --git a/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__3.html b/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__3.html
index 9eff8fb..e1e90a0 100644
--- a/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__3.html
+++ b/tests/commands/__snapshots__/ApiControllerTest__testGenerateBootstrap__3.html
@@ -318,11 +318,17 @@ Method Details
|
-public integer getSomething ( $test ) |
+public integer getSomething ( $test, integer $test2 )
| $test |
- |
+ mixed |
+
+ |
+
+
+ | $test2 |
+ integer |
|
diff --git a/tests/data/api/animal/Animal.php b/tests/data/api/animal/Animal.php
index 8e8e30e..9b563d0 100644
--- a/tests/data/api/animal/Animal.php
+++ b/tests/data/api/animal/Animal.php
@@ -14,7 +14,7 @@
*
* @property int $age animal age in seconds.
*
- * @method int getSomething($test)
+ * @method int getSomething($test, int $test2)
*
* @author Paul Klimov
* @since 1.0