Skip to content

Commit e3d61a1

Browse files
committed
Configure CC
1 parent 0acd45a commit e3d61a1

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-7
lines changed

Diff for: .codeclimate.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
engines:
3+
duplication:
4+
enabled: true
5+
config:
6+
languages:
7+
- php
8+
phpmd:
9+
enabled: true
10+
checks:
11+
CleanCode/ElseExpression:
12+
enabled: false
13+
Controversial/Superglobals:
14+
enabled: false
15+
exclude_fingerprints:
16+
# High complexity in CiInfo#toArray()
17+
- 8f1ff5077ea52a5fee818bde73a0dbb7
18+
- efc665f3aa41cbbd0bbd0ec9c945a453
19+
ratings:
20+
paths:
21+
- "**.inc"
22+
- "**.module"
23+
- "**.php"
24+
exclude_paths:
25+
- tests/

Diff for: src/TestReporter/ApiClient.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ public function send( $json )
4949

5050
if ( $stream = @fopen( $url, 'r', false, $context ) )
5151
{
52-
$meta = stream_get_meta_data( $stream );
53-
$raw_response = implode( "\r\n", $meta['wrapper_data'] ) . "\r\n\r\n" . stream_get_contents( $stream );
52+
$meta = stream_get_meta_data( $stream );
53+
$rawResponse = implode( "\r\n", $meta['wrapper_data'] ) . "\r\n\r\n" . stream_get_contents( $stream );
5454
fclose( $stream );
5555

56-
if ( !empty($raw_response) )
56+
if ( !empty($rawResponse) )
5757
{
58-
$response = $this->buildResponse( $response, $raw_response );
58+
$response = $this->buildResponse( $response, $rawResponse );
5959
}
6060
}
6161
else
@@ -94,12 +94,12 @@ private function sendWithCurl( $url, $payload )
9494
);
9595
curl_setopt( $curl, CURLOPT_CUSTOMREQUEST, 'POST' );
9696
curl_setopt( $curl, CURLOPT_POSTFIELDS, $payload );
97-
$raw_response = curl_exec( $curl );
97+
$rawResponse = curl_exec( $curl );
9898

9999
$status = curl_getinfo( $curl, CURLINFO_HTTP_CODE );
100-
if ( !empty($raw_response) )
100+
if ( !empty($rawResponse) )
101101
{
102-
$response = $this->buildResponse( $response, $raw_response );
102+
$response = $this->buildResponse( $response, $rawResponse );
103103
}
104104
else
105105
{

0 commit comments

Comments
 (0)