@@ -66,7 +66,7 @@ public function owned($page = 1, $per_page = self::PER_PAGE, $order_by = self::O
66
66
*/
67
67
public function search ($ query , $ page = 1 , $ per_page = self ::PER_PAGE , $ order_by = self ::ORDER_BY , $ sort = self ::SORT )
68
68
{
69
- return $ this ->get ('projects/search/ ' .rawurlencode ($ query ), array (
69
+ return $ this ->get ('projects/search/ ' .$ this -> encodePath ($ query ), array (
70
70
'page ' => $ page ,
71
71
'per_page ' => $ per_page ,
72
72
'order_by ' => $ order_by ,
@@ -80,7 +80,7 @@ public function search($query, $page = 1, $per_page = self::PER_PAGE, $order_by
80
80
*/
81
81
public function show ($ project_id )
82
82
{
83
- return $ this ->get ('projects/ ' .rawurlencode ($ project_id ));
83
+ return $ this ->get ('projects/ ' .$ this -> encodePath ($ project_id ));
84
84
}
85
85
86
86
/**
@@ -105,7 +105,7 @@ public function createForUser($user_id, $name, array $params = array())
105
105
{
106
106
$ params ['name ' ] = $ name ;
107
107
108
- return $ this ->post ('projects/user/ ' .rawurlencode ($ user_id ), $ params );
108
+ return $ this ->post ('projects/user/ ' .$ this -> encodePath ($ user_id ), $ params );
109
109
}
110
110
111
111
/**
@@ -115,7 +115,7 @@ public function createForUser($user_id, $name, array $params = array())
115
115
*/
116
116
public function update ($ project_id , array $ params )
117
117
{
118
- return $ this ->put ('projects/ ' .rawurlencode ($ project_id ), $ params );
118
+ return $ this ->put ('projects/ ' .$ this -> encodePath ($ project_id ), $ params );
119
119
}
120
120
121
121
/**
@@ -124,7 +124,7 @@ public function update($project_id, array $params)
124
124
*/
125
125
public function remove ($ project_id )
126
126
{
127
- return $ this ->delete ('projects/ ' .rawurlencode ($ project_id ));
127
+ return $ this ->delete ('projects/ ' .$ this -> encodePath ($ project_id ));
128
128
}
129
129
130
130
/**
@@ -146,7 +146,7 @@ public function members($project_id, $username_query = null)
146
146
*/
147
147
public function member ($ project_id , $ user_id )
148
148
{
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 )));
150
150
}
151
151
152
152
/**
@@ -207,7 +207,7 @@ public function hooks($project_id, $page = 1, $per_page = self::PER_PAGE)
207
207
*/
208
208
public function hook ($ project_id , $ hook_id )
209
209
{
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 )));
211
211
}
212
212
213
213
/**
@@ -235,7 +235,7 @@ public function addHook($project_id, $url, array $params = array())
235
235
*/
236
236
public function updateHook ($ project_id , $ hook_id , array $ params )
237
237
{
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 );
239
239
}
240
240
241
241
/**
@@ -245,7 +245,7 @@ public function updateHook($project_id, $hook_id, array $params)
245
245
*/
246
246
public function removeHook ($ project_id , $ hook_id )
247
247
{
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 )));
249
249
}
250
250
251
251
/**
@@ -264,7 +264,7 @@ public function keys($project_id)
264
264
*/
265
265
public function key ($ project_id , $ key_id )
266
266
{
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 )));
268
268
}
269
269
270
270
/**
@@ -288,7 +288,7 @@ public function addKey($project_id, $title, $key)
288
288
*/
289
289
public function removeKey ($ project_id , $ key_id )
290
290
{
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 )));
292
292
}
293
293
294
294
/**
@@ -353,7 +353,7 @@ public function removeLabel($project_id, $name)
353
353
*/
354
354
public function createForkRelation ($ project_id , $ forked_project_id )
355
355
{
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 )));
357
357
}
358
358
359
359
/**
@@ -373,7 +373,7 @@ public function removeForkRelation($project_id)
373
373
*/
374
374
public function setService ($ project_id , $ service_name , array $ params = array ())
375
375
{
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 );
377
377
}
378
378
379
379
/**
@@ -383,6 +383,6 @@ public function setService($project_id, $service_name, array $params = array())
383
383
*/
384
384
public function removeService ($ project_id , $ service_name )
385
385
{
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 )));
387
387
}
388
388
}
0 commit comments