Skip to content

Commit 8cd24f4

Browse files
committed
clean-up
1 parent 63307ce commit 8cd24f4

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

src/lib/BacklogAPIClient.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public static function parseBackLogUrl( $url ) {
4646
preg_match('|^/([^/]+)|', $path, $m);
4747
$top_dir = $m[1] ?? null;
4848
$action = $top_dir ?? '';
49-
// dump([$action,preg_match('|^(.+)\.action$|',$action,$m)>0,$m]);
5049
if( preg_match('|^(.+)\.action$|', $action, $m) > 0 ) {
5150
$action = $m[1];
5251
preg_match('/project.?id=([^&]+)/i', parse_url($url)['query'], $m);
@@ -152,12 +151,13 @@ protected function send_request( $method, $path, $opts ) {
152151

153152
return $res;
154153
} catch (ClientException $e) {
155-
dump($e->getRequest()->getUri()->__toString(), $e->getResponse()->getBody()->getContents());
156-
$r = $e->getRequest()->getBody();
157-
$r->rewind();
158-
dump(urldecode($r->getContents()));
154+
$this->log($e->getRequest()->getUri()->__toString());
155+
$this->log($e->getResponse()->getBody()->getContents());
156+
//$r = $e->getRequest()->getBody();
157+
//$r->rewind();
158+
//dump(urldecode($r->getContents()));
159159
throw $e;
160-
// return $e->getResponse();
160+
//return $e->getResponse();
161161
}
162162
}
163163

tests/Unit/HTTP/HttpBuildQueryTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,5 @@ public function test_http_build_query(){
1616
$this->assertStringContainsString('names[]=', urldecode($ret));
1717
$this->assertStringContainsString('あ[0]=', urldecode($ret));
1818
}
19-
//public function test_guzzle_http(){
20-
// $cli = new Client(['base_uri' => 'http://localhost:8080']);
21-
// $ret = $cli->request('GET','/?b[]=1',['query'=>'a=1']);
22-
// dd($ret->getBody()->getContents());
23-
//}
2419

2520
}

tools/Scraping/libs/BacklogDocToClass.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ public static function execute():int {
1818
$ret = $self->api_list_json();
1919
$class_def = $self->generate_class_def($ret);
2020
$html = $self->render_table($ret);
21-
file_put_contents(__DIR__.'/BacklogAPIv2Methods.php',$class_def);
21+
//file_put_contents(__DIR__.'/BacklogAPIv2Methods.php',$class_def);
2222

23-
//file_put_contents(__DIR__.'/../../../api.html', $html);
24-
//file_put_contents(__DIR__.'/../../../src/BacklogAPIv2Methods.php', $class_def);
23+
file_put_contents(__DIR__.'/api.html', $html);
24+
file_put_contents(__DIR__.'/../../../src/BacklogAPIv2Methods.php', $class_def);
2525
return 0;
2626
}
2727
protected function api_list_json() {

0 commit comments

Comments
 (0)