@@ -57,7 +57,7 @@ public function __construct(Project $project, $name = null, Client $client = nul
5757 */
5858 public function show ()
5959 {
60- $ data = $ this ->api ( ' repositories ' )->branch ($ this ->project ->id , $ this ->name );
60+ $ data = $ this ->client -> repositories ( )->branch ($ this ->project ->id , $ this ->name );
6161
6262 return static ::fromArray ($ this ->getClient (), $ this ->project , $ data );
6363 }
@@ -69,7 +69,7 @@ public function show()
6969 */
7070 public function protect ($ devPush = false , $ devMerge = false )
7171 {
72- $ data = $ this ->api ( ' repositories ' )->protectBranch ($ this ->project ->id , $ this ->name , $ devPush , $ devMerge );
72+ $ data = $ this ->client -> repositories ( )->protectBranch ($ this ->project ->id , $ this ->name , $ devPush , $ devMerge );
7373
7474 return static ::fromArray ($ this ->getClient (), $ this ->project , $ data );
7575 }
@@ -79,7 +79,7 @@ public function protect($devPush = false, $devMerge = false)
7979 */
8080 public function unprotect ()
8181 {
82- $ data = $ this ->api ( ' repositories ' )->unprotectBranch ($ this ->project ->id , $ this ->name );
82+ $ data = $ this ->client -> repositories ( )->unprotectBranch ($ this ->project ->id , $ this ->name );
8383
8484 return static ::fromArray ($ this ->getClient (), $ this ->project , $ data );
8585 }
@@ -89,7 +89,7 @@ public function unprotect()
8989 */
9090 public function delete ()
9191 {
92- $ this ->api ( ' repositories ' )->deleteBranch ($ this ->project ->id , $ this ->name );
92+ $ this ->client -> repositories ( )->deleteBranch ($ this ->project ->id , $ this ->name );
9393
9494 return true ;
9595 }
@@ -112,7 +112,7 @@ public function commits($page = 1, $per_page = Api::PER_PAGE)
112112 */
113113 public function createFile ($ file_path , $ content , $ commit_message )
114114 {
115- $ data = $ this ->api ( ' repositories ' )->createFile ($ this ->project ->id , $ file_path , $ content , $ this ->name , $ commit_message );
115+ $ data = $ this ->client -> repositories ( )->createFile ($ this ->project ->id , $ file_path , $ content , $ this ->name , $ commit_message );
116116
117117 return File::fromArray ($ this ->getClient (), $ this ->project , $ data );
118118 }
@@ -125,7 +125,7 @@ public function createFile($file_path, $content, $commit_message)
125125 */
126126 public function updateFile ($ file_path , $ content , $ commit_message )
127127 {
128- $ data = $ this ->api ( ' repositories ' )->updateFile ($ this ->project ->id , $ file_path , $ content , $ this ->name , $ commit_message );
128+ $ data = $ this ->client -> repositories ( )->updateFile ($ this ->project ->id , $ file_path , $ content , $ this ->name , $ commit_message );
129129
130130 return File::fromArray ($ this ->getClient (), $ this ->project , $ data );
131131 }
@@ -137,7 +137,7 @@ public function updateFile($file_path, $content, $commit_message)
137137 */
138138 public function deleteFile ($ file_path , $ commit_message )
139139 {
140- $ this ->api ( ' repositories ' )->deleteFile ($ this ->project ->id , $ file_path , $ this ->name , $ commit_message );
140+ $ this ->client -> repositories ( )->deleteFile ($ this ->project ->id , $ file_path , $ this ->name , $ commit_message );
141141
142142 return true ;
143143 }
0 commit comments