Skip to content

Commit 7cc640b

Browse files
mirko-jtlm1guelpf
authored andcommitted
Update PHPDocs and add missing required param visibility to model project in createSnippet method
1 parent 2483086 commit 7cc640b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/Gitlab/Api/Snippets.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public function show($project_id, $snippet_id)
2626
* @param string $title
2727
* @param string $filename
2828
* @param string $code
29+
* @param $visibility
2930
* @return mixed
3031
*/
3132
public function create($project_id, $title, $filename, $code, $visibility)

lib/Gitlab/Model/Project.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,11 +937,12 @@ public function snippets()
937937
* @param string $title
938938
* @param string $filename
939939
* @param string $code
940+
* @param $visibility
940941
* @return Snippet
941942
*/
942-
public function createSnippet($title, $filename, $code)
943+
public function createSnippet($title, $filename, $code, $visibility)
943944
{
944-
$data = $this->client->snippets()->create($this->id, $title, $filename, $code);
945+
$data = $this->client->snippets()->create($this->id, $title, $filename, $code, $visibility);
945946

946947
return Snippet::fromArray($this->getClient(), $this, $data);
947948
}

0 commit comments

Comments
 (0)