33namespace JiraCloud \Attachment ;
44
55use JiraCloud \Issue \Attachment ;
6+ use JiraCloud \JiraException ;
67
78/**
89 * Class AttachmentService.
@@ -14,18 +15,18 @@ class AttachmentService extends \JiraCloud\JiraClient
1415 /**
1516 * Returns the meta-data for an attachment, including the URI of the actual attached file.
1617 *
17- * @param string| int $id attachment Id
18+ * @param int|string $id attachment Id
1819 * @outDir string downloads the content and store into outDir
1920 * @overwrite boolean determines whether to overwrite the file if it already exists.
2021 * @mode int outDir creation mode.
2122 * @recursive boolean Allows the creation of nested directories specified in the pathname.
2223 *
23- *@throws \JsonMapper_Exception
24- * @throws \JiraCloud\ JiraException
24+ *@return Attachment
25+ *@throws JiraException
2526 *
26- * @return \JiraCloud\ADF\Attachment
27+ * @throws \JsonMapper_Exception
2728 */
28- public function get ($ id , $ outDir = null , $ overwrite = false , $ mode = 0777 , $ recursive = true )
29+ public function get (int | string $ id , string $ outDir = null , bool $ overwrite = false , int $ mode = 0777 , bool $ recursive = true ) : Attachment
2930 {
3031 $ ret = $ this ->exec ($ this ->uri .$ id , null );
3132
@@ -60,13 +61,13 @@ public function get($id, $outDir = null, $overwrite = false, $mode = 0777, $recu
6061 /**
6162 * Remove an attachment from an issue.
6263 *
63- * @param string|int $id attachment id
64- *
65- * @throws \JiraCloud\JiraException
64+ * @param int|string $id attachment id
6665 *
6766 * @return string
67+ *@throws JiraException
68+ *
6869 */
69- public function remove ($ id )
70+ public function remove (int | string $ id ) : string
7071 {
7172 $ ret = $ this ->exec ($ this ->uri .$ id , null , 'DELETE ' );
7273
0 commit comments