File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -18,24 +18,13 @@ class Comments extends AbstractApi
1818 */
1919 public function configure ($ bodyType = null )
2020 {
21- switch ($ bodyType ) {
22- case 'raw ' :
23- $ header = 'Accept: application/vnd.github.%s.raw+json ' ;
24- break ;
25-
26- case 'text ' :
27- $ header = 'Accept: application/vnd.github.%s.text+json ' ;
28- break ;
29-
30- case 'html ' :
31- $ header = 'Accept: application/vnd.github.%s.html+json ' ;
32- break ;
33-
34- default :
35- $ header = 'Accept: application/vnd.github.%s.full+json ' ;
21+ if (!in_array ($ bodyType , array ('raw ' , 'text ' , 'html ' ))) {
22+ $ bodyType = 'full ' ;
3623 }
3724
38- $ this ->client ->setHeaders (array (sprintf ($ header , $ this ->client ->getOption ('api_version ' ))));
25+ $ this ->client ->setHeaders (array (
26+ sprintf ('Accept: application/vnd.github.%s.%s+json ' , $ this ->client ->getOption ('api_version ' ), $ bodyType )
27+ ));
3928 }
4029
4130 /**
You can’t perform that action at this time.
0 commit comments