@@ -66,7 +66,7 @@ public function owned($page = 1, $per_page = self::PER_PAGE, $order_by = self::O
6666 */
6767 public function search ($ query , $ page = 1 , $ per_page = self ::PER_PAGE , $ order_by = self ::ORDER_BY , $ sort = self ::SORT )
6868 {
69- return $ this ->get ('projects/search/ ' .rawurlencode ($ query ), array (
69+ return $ this ->get ('projects/search/ ' .$ this -> encodePath ($ query ), array (
7070 'page ' => $ page ,
7171 'per_page ' => $ per_page ,
7272 'order_by ' => $ order_by ,
@@ -80,7 +80,7 @@ public function search($query, $page = 1, $per_page = self::PER_PAGE, $order_by
8080 */
8181 public function show ($ project_id )
8282 {
83- return $ this ->get ('projects/ ' .rawurlencode ($ project_id ));
83+ return $ this ->get ('projects/ ' .$ this -> encodePath ($ project_id ));
8484 }
8585
8686 /**
@@ -105,7 +105,7 @@ public function createForUser($user_id, $name, array $params = array())
105105 {
106106 $ params ['name ' ] = $ name ;
107107
108- return $ this ->post ('projects/user/ ' .rawurlencode ($ user_id ), $ params );
108+ return $ this ->post ('projects/user/ ' .$ this -> encodePath ($ user_id ), $ params );
109109 }
110110
111111 /**
@@ -115,7 +115,7 @@ public function createForUser($user_id, $name, array $params = array())
115115 */
116116 public function update ($ project_id , array $ params )
117117 {
118- return $ this ->put ('projects/ ' .rawurlencode ($ project_id ), $ params );
118+ return $ this ->put ('projects/ ' .$ this -> encodePath ($ project_id ), $ params );
119119 }
120120
121121 /**
@@ -124,7 +124,7 @@ public function update($project_id, array $params)
124124 */
125125 public function remove ($ project_id )
126126 {
127- return $ this ->delete ('projects/ ' .rawurlencode ($ project_id ));
127+ return $ this ->delete ('projects/ ' .$ this -> encodePath ($ project_id ));
128128 }
129129
130130 /**
@@ -146,7 +146,7 @@ public function members($project_id, $username_query = null)
146146 */
147147 public function member ($ project_id , $ user_id )
148148 {
149- return $ this ->get ($ this ->getProjectPath ($ project_id , 'members/ ' .rawurlencode ($ user_id )));
149+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'members/ ' .$ this -> encodePath ($ user_id )));
150150 }
151151
152152 /**
@@ -207,7 +207,7 @@ public function hooks($project_id, $page = 1, $per_page = self::PER_PAGE)
207207 */
208208 public function hook ($ project_id , $ hook_id )
209209 {
210- return $ this ->get ($ this ->getProjectPath ($ project_id , 'hooks/ ' .rawurlencode ($ hook_id )));
210+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'hooks/ ' .$ this -> encodePath ($ hook_id )));
211211 }
212212
213213 /**
@@ -235,7 +235,7 @@ public function addHook($project_id, $url, array $params = array())
235235 */
236236 public function updateHook ($ project_id , $ hook_id , array $ params )
237237 {
238- return $ this ->put ($ this ->getProjectPath ($ project_id , 'hooks/ ' .rawurlencode ($ hook_id )), $ params );
238+ return $ this ->put ($ this ->getProjectPath ($ project_id , 'hooks/ ' .$ this -> encodePath ($ hook_id )), $ params );
239239 }
240240
241241 /**
@@ -245,7 +245,7 @@ public function updateHook($project_id, $hook_id, array $params)
245245 */
246246 public function removeHook ($ project_id , $ hook_id )
247247 {
248- return $ this ->delete ($ this ->getProjectPath ($ project_id , 'hooks/ ' .rawurlencode ($ hook_id )));
248+ return $ this ->delete ($ this ->getProjectPath ($ project_id , 'hooks/ ' .$ this -> encodePath ($ hook_id )));
249249 }
250250
251251 /**
@@ -264,7 +264,7 @@ public function keys($project_id)
264264 */
265265 public function key ($ project_id , $ key_id )
266266 {
267- return $ this ->get ($ this ->getProjectPath ($ project_id , 'keys/ ' .rawurlencode ($ key_id )));
267+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'keys/ ' .$ this -> encodePath ($ key_id )));
268268 }
269269
270270 /**
@@ -288,7 +288,7 @@ public function addKey($project_id, $title, $key)
288288 */
289289 public function removeKey ($ project_id , $ key_id )
290290 {
291- return $ this ->delete ($ this ->getProjectPath ($ project_id , 'keys/ ' .rawurlencode ($ key_id )));
291+ return $ this ->delete ($ this ->getProjectPath ($ project_id , 'keys/ ' .$ this -> encodePath ($ key_id )));
292292 }
293293
294294 /**
@@ -353,7 +353,7 @@ public function removeLabel($project_id, $name)
353353 */
354354 public function createForkRelation ($ project_id , $ forked_project_id )
355355 {
356- return $ this ->post ($ this ->getProjectPath ($ project_id , 'fork/ ' .rawurlencode ($ forked_project_id )));
356+ return $ this ->post ($ this ->getProjectPath ($ project_id , 'fork/ ' .$ this -> encodePath ($ forked_project_id )));
357357 }
358358
359359 /**
@@ -373,7 +373,7 @@ public function removeForkRelation($project_id)
373373 */
374374 public function setService ($ project_id , $ service_name , array $ params = array ())
375375 {
376- return $ this ->put ($ this ->getProjectPath ($ project_id , 'services/ ' .rawurlencode ($ service_name )), $ params );
376+ return $ this ->put ($ this ->getProjectPath ($ project_id , 'services/ ' .$ this -> encodePath ($ service_name )), $ params );
377377 }
378378
379379 /**
@@ -383,6 +383,6 @@ public function setService($project_id, $service_name, array $params = array())
383383 */
384384 public function removeService ($ project_id , $ service_name )
385385 {
386- return $ this ->delete ($ this ->getProjectPath ($ project_id , 'services/ ' .rawurlencode ($ service_name )));
386+ return $ this ->delete ($ this ->getProjectPath ($ project_id , 'services/ ' .$ this -> encodePath ($ service_name )));
387387 }
388388}
0 commit comments