Skip to content

Commit e7b9738

Browse files
committed
update php petstore samples
1 parent d43e9c8 commit e7b9738

File tree

7 files changed

+33
-33
lines changed

7 files changed

+33
-33
lines changed

samples/client/petstore-security-test/php/SwaggerClient-php/lib/Api/FakeApi.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function testCodeInjectEndRnNRWithHttpInfo($test_code_inject____end____rn
123123
"[{$e->getCode()}] {$e->getMessage()}",
124124
$e->getCode(),
125125
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
126-
$e->getResponse()->getBody()->getContents()
126+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
127127
);
128128
}
129129

@@ -237,7 +237,7 @@ protected function testCodeInjectEndRnNRRequest($test_code_inject____end____rn_n
237237
$_tempBody = null;
238238

239239
if ($multipart) {
240-
$headers= $this->headerSelector->selectHeadersForMultipart(
240+
$headers = $this->headerSelector->selectHeadersForMultipart(
241241
['application/json', '*_/ \" =end --']
242242
);
243243
} else {

samples/client/petstore/php/SwaggerClient-php/lib/Api/AnotherFakeApi.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function testSpecialTagsWithHttpInfo($body)
124124
"[{$e->getCode()}] {$e->getMessage()}",
125125
$e->getCode(),
126126
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
127-
$e->getResponse()->getBody()->getContents()
127+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
128128
);
129129
}
130130

samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function fakeOuterBooleanSerializeWithHttpInfo($body = null)
120120
"[{$e->getCode()}] {$e->getMessage()}",
121121
$e->getCode(),
122122
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
123-
$e->getResponse()->getBody()->getContents()
123+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
124124
);
125125
}
126126

@@ -367,7 +367,7 @@ public function fakeOuterCompositeSerializeWithHttpInfo($body = null)
367367
"[{$e->getCode()}] {$e->getMessage()}",
368368
$e->getCode(),
369369
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
370-
$e->getResponse()->getBody()->getContents()
370+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
371371
);
372372
}
373373

@@ -614,7 +614,7 @@ public function fakeOuterNumberSerializeWithHttpInfo($body = null)
614614
"[{$e->getCode()}] {$e->getMessage()}",
615615
$e->getCode(),
616616
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
617-
$e->getResponse()->getBody()->getContents()
617+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
618618
);
619619
}
620620

@@ -861,7 +861,7 @@ public function fakeOuterStringSerializeWithHttpInfo($body = null)
861861
"[{$e->getCode()}] {$e->getMessage()}",
862862
$e->getCode(),
863863
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
864-
$e->getResponse()->getBody()->getContents()
864+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
865865
);
866866
}
867867

@@ -1112,7 +1112,7 @@ public function testClientModelWithHttpInfo($body)
11121112
"[{$e->getCode()}] {$e->getMessage()}",
11131113
$e->getCode(),
11141114
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1115-
$e->getResponse()->getBody()->getContents()
1115+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
11161116
);
11171117
}
11181118

@@ -1394,7 +1394,7 @@ public function testEndpointParametersWithHttpInfo($number, $double, $pattern_wi
13941394
"[{$e->getCode()}] {$e->getMessage()}",
13951395
$e->getCode(),
13961396
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1397-
$e->getResponse()->getBody()->getContents()
1397+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
13981398
);
13991399
}
14001400

@@ -1789,7 +1789,7 @@ public function testEnumParametersWithHttpInfo($enum_form_string_array = null, $
17891789
"[{$e->getCode()}] {$e->getMessage()}",
17901790
$e->getCode(),
17911791
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1792-
$e->getResponse()->getBody()->getContents()
1792+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
17931793
);
17941794
}
17951795

@@ -2059,7 +2059,7 @@ public function testInlineAdditionalPropertiesWithHttpInfo($param)
20592059
"[{$e->getCode()}] {$e->getMessage()}",
20602060
$e->getCode(),
20612061
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
2062-
$e->getResponse()->getBody()->getContents()
2062+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
20632063
);
20642064
}
20652065

@@ -2281,7 +2281,7 @@ public function testJsonFormDataWithHttpInfo($param, $param2)
22812281
"[{$e->getCode()}] {$e->getMessage()}",
22822282
$e->getCode(),
22832283
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
2284-
$e->getResponse()->getBody()->getContents()
2284+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
22852285
);
22862286
}
22872287

samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeClassnameTags123Api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function testClassnameWithHttpInfo($body)
124124
"[{$e->getCode()}] {$e->getMessage()}",
125125
$e->getCode(),
126126
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
127-
$e->getResponse()->getBody()->getContents()
127+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
128128
);
129129
}
130130

samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function addPetWithHttpInfo($body)
123123
"[{$e->getCode()}] {$e->getMessage()}",
124124
$e->getCode(),
125125
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
126-
$e->getResponse()->getBody()->getContents()
126+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
127127
);
128128
}
129129

@@ -349,7 +349,7 @@ public function deletePetWithHttpInfo($pet_id, $api_key = null)
349349
"[{$e->getCode()}] {$e->getMessage()}",
350350
$e->getCode(),
351351
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
352-
$e->getResponse()->getBody()->getContents()
352+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
353353
);
354354
}
355355

@@ -586,7 +586,7 @@ public function findPetsByStatusWithHttpInfo($status)
586586
"[{$e->getCode()}] {$e->getMessage()}",
587587
$e->getCode(),
588588
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
589-
$e->getResponse()->getBody()->getContents()
589+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
590590
);
591591
}
592592

@@ -851,7 +851,7 @@ public function findPetsByTagsWithHttpInfo($tags)
851851
"[{$e->getCode()}] {$e->getMessage()}",
852852
$e->getCode(),
853853
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
854-
$e->getResponse()->getBody()->getContents()
854+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
855855
);
856856
}
857857

@@ -1116,7 +1116,7 @@ public function getPetByIdWithHttpInfo($pet_id)
11161116
"[{$e->getCode()}] {$e->getMessage()}",
11171117
$e->getCode(),
11181118
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1119-
$e->getResponse()->getBody()->getContents()
1119+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
11201120
);
11211121
}
11221122

@@ -1382,7 +1382,7 @@ public function updatePetWithHttpInfo($body)
13821382
"[{$e->getCode()}] {$e->getMessage()}",
13831383
$e->getCode(),
13841384
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1385-
$e->getResponse()->getBody()->getContents()
1385+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
13861386
);
13871387
}
13881388

@@ -1610,7 +1610,7 @@ public function updatePetWithFormWithHttpInfo($pet_id, $name = null, $status = n
16101610
"[{$e->getCode()}] {$e->getMessage()}",
16111611
$e->getCode(),
16121612
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1613-
$e->getResponse()->getBody()->getContents()
1613+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
16141614
);
16151615
}
16161616

@@ -1858,7 +1858,7 @@ public function uploadFileWithHttpInfo($pet_id, $additional_metadata = null, $fi
18581858
"[{$e->getCode()}] {$e->getMessage()}",
18591859
$e->getCode(),
18601860
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1861-
$e->getResponse()->getBody()->getContents()
1861+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
18621862
);
18631863
}
18641864

samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function deleteOrderWithHttpInfo($order_id)
123123
"[{$e->getCode()}] {$e->getMessage()}",
124124
$e->getCode(),
125125
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
126-
$e->getResponse()->getBody()->getContents()
126+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
127127
);
128128
}
129129

@@ -347,7 +347,7 @@ public function getInventoryWithHttpInfo()
347347
"[{$e->getCode()}] {$e->getMessage()}",
348348
$e->getCode(),
349349
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
350-
$e->getResponse()->getBody()->getContents()
350+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
351351
);
352352
}
353353

@@ -597,7 +597,7 @@ public function getOrderByIdWithHttpInfo($order_id)
597597
"[{$e->getCode()}] {$e->getMessage()}",
598598
$e->getCode(),
599599
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
600-
$e->getResponse()->getBody()->getContents()
600+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
601601
);
602602
}
603603

@@ -866,7 +866,7 @@ public function placeOrderWithHttpInfo($body)
866866
"[{$e->getCode()}] {$e->getMessage()}",
867867
$e->getCode(),
868868
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
869-
$e->getResponse()->getBody()->getContents()
869+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
870870
);
871871
}
872872

samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function createUserWithHttpInfo($body)
123123
"[{$e->getCode()}] {$e->getMessage()}",
124124
$e->getCode(),
125125
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
126-
$e->getResponse()->getBody()->getContents()
126+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
127127
);
128128
}
129129

@@ -343,7 +343,7 @@ public function createUsersWithArrayInputWithHttpInfo($body)
343343
"[{$e->getCode()}] {$e->getMessage()}",
344344
$e->getCode(),
345345
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
346-
$e->getResponse()->getBody()->getContents()
346+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
347347
);
348348
}
349349

@@ -563,7 +563,7 @@ public function createUsersWithListInputWithHttpInfo($body)
563563
"[{$e->getCode()}] {$e->getMessage()}",
564564
$e->getCode(),
565565
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
566-
$e->getResponse()->getBody()->getContents()
566+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
567567
);
568568
}
569569

@@ -783,7 +783,7 @@ public function deleteUserWithHttpInfo($username)
783783
"[{$e->getCode()}] {$e->getMessage()}",
784784
$e->getCode(),
785785
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
786-
$e->getResponse()->getBody()->getContents()
786+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
787787
);
788788
}
789789

@@ -1009,7 +1009,7 @@ public function getUserByNameWithHttpInfo($username)
10091009
"[{$e->getCode()}] {$e->getMessage()}",
10101010
$e->getCode(),
10111011
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1012-
$e->getResponse()->getBody()->getContents()
1012+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
10131013
);
10141014
}
10151015

@@ -1273,7 +1273,7 @@ public function loginUserWithHttpInfo($username, $password)
12731273
"[{$e->getCode()}] {$e->getMessage()}",
12741274
$e->getCode(),
12751275
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1276-
$e->getResponse()->getBody()->getContents()
1276+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
12771277
);
12781278
}
12791279

@@ -1541,7 +1541,7 @@ public function logoutUserWithHttpInfo()
15411541
"[{$e->getCode()}] {$e->getMessage()}",
15421542
$e->getCode(),
15431543
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1544-
$e->getResponse()->getBody()->getContents()
1544+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
15451545
);
15461546
}
15471547

@@ -1751,7 +1751,7 @@ public function updateUserWithHttpInfo($username, $body)
17511751
"[{$e->getCode()}] {$e->getMessage()}",
17521752
$e->getCode(),
17531753
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
1754-
$e->getResponse()->getBody()->getContents()
1754+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
17551755
);
17561756
}
17571757

0 commit comments

Comments
 (0)