Skip to content

Commit

Permalink
Merge branch 'release/0.2.1' into 1.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon14 committed Aug 26, 2022
2 parents 6c74e65 + df4eedb commit 572615f
Show file tree
Hide file tree
Showing 125 changed files with 752 additions and 751 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ environments.
| ext-json | * |
| ext-mbstring | * |

| Composer Packages | Version |
|-----------------------------------------------------------------------|--------------------------|
| [guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle) | ^6.2.1 || ^7.0 |
| [guzzlehttp/psr7](https://packagist.org/packages/guzzlehttp/psr7) | ^2.0 |
| Composer Packages | Version |
|-----------------------------------------------------------------------|----------------------------|
| [guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle) | ^6.5.8 || ^7.4.5 |
| [guzzlehttp/psr7](https://packagist.org/packages/guzzlehttp/psr7) | ^2.0 |


## Purpose
Expand Down Expand Up @@ -79,7 +79,7 @@ composer require brandon14/ebay-buy-browse-v1

We strive to meet the [PSR-12](https://www.php-fig.org/psr/psr-12/) coding style for PHP projects, and enforce our
coding standard via the [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) linting tool. Our ruleset can be
found in the `.php-cs-fixer.base.php` file.
found in the `.php-cs-fixer.dist.php` file.

## Coverage

Expand Down
8 changes: 3 additions & 5 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
- [ ] Clean up documentation.
- [ ] Clean up README.
- [ ] Build and publish project documentation.

## Examples

- [ ] Build out more classes to provide more in depth examples for unit testing.
- [ ] Fix CI and other workflows to get automated releases on tag pushes, and auto documentation building and
publishing.

## Tests

- [ ] Add integration tests using filesystems, tests databases, etc for a more complete testing picture.
- [ ] Add unit tests for all API classes and models.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
"analyze:stats": "composer run-script analyze -- --stats",
"lint:phpcs:check": [
"Composer\\Config::disableProcessTimeout",
"phpcs --cache=.phpcs.cache --parallel=8 ./"
"phpcs --cache=.phpcs.cache --parallel=2 ./"
],
"lint:phpcs:fix": [
"Composer\\Config::disableProcessTimeout",
"phpcbf --parallel=8 ./"
"phpcbf --parallel=2 ./"
],
"lint:phpmd": "phpmd ./ text ./phpmd.dist.xml",
"lint:php-cs-fixer:fix": [
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
"php-cs-fixer list-files --config=./.php-cs-fixer.dist.php | xargs -n 10 -P 8 php-cs-fixer fix --config=./.php-cs-fixer.dist.php"
"php-cs-fixer list-files --config=./.php-cs-fixer.dist.php | xargs -n 10 -P 8 php-cs-fixer fix --config=./.php-cs-fixer.dist.php --allow-risky=yes"
],
"lint:php-cs-fixer:check": "composer run-script lint:php-cs-fixer:fix -- --dry-run --verbose",
"lint": [
Expand Down
10 changes: 7 additions & 3 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ BASE_PACKAGE_DIR="./src"
BASE_INVOKER_PACKAGE="TNT\\Ebay"
BASE_PACKAGE_NAME="ebay"
GITHUB_NAME="brandon14"
SDK_VERSION=0.2.1
SDK_USER_AGENT="$GITHUB_NAME/ebay-sdk-php/$SDK_VERSION/php"

# Set JOB_MAX default if not supplied.
[[ -z ${JOB_MAX+x} ]] && JOB_MAX=8

Expand Down Expand Up @@ -112,8 +115,9 @@ for openapispec in ./api-specs/*_oas*.yaml; do
--global-property=apiTests=false \
--global-property=modelTests=false \
--additional-properties=srcBasePath=\"\" \
--git-user-id \""$GITHUB_NAME"\" \
--git-repo-id \""$BASE_PACKAGE_NAME"-"$API_NAME"-"$API_SUB_NAME"-"$API_VERSION"\" \
--git-user-id "$GITHUB_NAME" \
--git-repo-id "$BASE_PACKAGE_NAME"-"$API_NAME"-"$API_SUB_NAME"-"$API_VERSION" \
--http-user-agent "$SDK_USER_AGENT" \
-t ./templates &

# Make test directory for each library.
Expand All @@ -131,7 +135,7 @@ LINT_START=$(date +%s)

echo "===========> Running PHP linter on generated SDKs at $(date)..."
# Batch PHP-CS-Fixer fixing using find-files and xargs to speed up linting.
"$PHP_CS_FIXER" list-files | xargs -n 10 -P "$JOB_MAX" "$PHP_CS_FIXER" fix --using-cache=no --config=./.php-cs-fixer.dist.php
"$PHP_CS_FIXER" list-files | xargs -n 10 -P "$JOB_MAX" "$PHP_CS_FIXER" fix --using-cache=no --config=./.php-cs-fixer.dist.php --allow-risky=yes

END=$(date +%s)
ELAPSED=$((END-START))
Expand Down
3 changes: 1 addition & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<rule ref="PSR12" >
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceBefore"></exclude>
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceAfter"></exclude>
<exclude name="PSR12.Files.FileHeader.IncorrectOrder"></exclude>
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"></exclude>
</rule>

</ruleset>
30 changes: 15 additions & 15 deletions src/Buy/Browse/V1/Api/ItemApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function checkCompatibilityWithHttpInfo($item_id, $x_ebay_c_marketplace_i
switch ($statusCode) {
case 200:
if ('\TNT\Ebay\Buy\Browse\V1\Model\CompatibilityResponse' === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand All @@ -221,7 +221,7 @@ public function checkCompatibilityWithHttpInfo($item_id, $x_ebay_c_marketplace_i
$returnType = '\TNT\Ebay\Buy\Browse\V1\Model\CompatibilityResponse';

if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -289,7 +289,7 @@ public function checkCompatibilityAsyncWithHttpInfo($item_id, $x_ebay_c_marketpl
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -479,7 +479,7 @@ public function getItemWithHttpInfo($item_id, $fieldgroups = null)
switch ($statusCode) {
case 200:
if ('\TNT\Ebay\Buy\Browse\V1\Model\Item' === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand All @@ -494,7 +494,7 @@ public function getItemWithHttpInfo($item_id, $fieldgroups = null)
$returnType = '\TNT\Ebay\Buy\Browse\V1\Model\Item';

if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -560,7 +560,7 @@ public function getItemAsyncWithHttpInfo($item_id, $fieldgroups = null)
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -747,7 +747,7 @@ public function getItemByLegacyIdWithHttpInfo($legacy_item_id, $fieldgroups = nu
switch ($statusCode) {
case 200:
if ('\TNT\Ebay\Buy\Browse\V1\Model\Item' === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand All @@ -762,7 +762,7 @@ public function getItemByLegacyIdWithHttpInfo($legacy_item_id, $fieldgroups = nu
$returnType = '\TNT\Ebay\Buy\Browse\V1\Model\Item';

if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -832,7 +832,7 @@ public function getItemByLegacyIdAsyncWithHttpInfo($legacy_item_id, $fieldgroups
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -1032,7 +1032,7 @@ public function getItemsWithHttpInfo($item_ids = null, $item_group_ids = null)
switch ($statusCode) {
case 200:
if ('\TNT\Ebay\Buy\Browse\V1\Model\Items' === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand All @@ -1047,7 +1047,7 @@ public function getItemsWithHttpInfo($item_ids = null, $item_group_ids = null)
$returnType = '\TNT\Ebay\Buy\Browse\V1\Model\Items';

if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -1113,7 +1113,7 @@ public function getItemsAsyncWithHttpInfo($item_ids = null, $item_group_ids = nu
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -1288,7 +1288,7 @@ public function getItemsByItemGroupWithHttpInfo($item_group_id)
switch ($statusCode) {
case 200:
if ('\TNT\Ebay\Buy\Browse\V1\Model\ItemGroup' === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand All @@ -1303,7 +1303,7 @@ public function getItemsByItemGroupWithHttpInfo($item_group_id)
$returnType = '\TNT\Ebay\Buy\Browse\V1\Model\ItemGroup';

if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -1367,7 +1367,7 @@ public function getItemsByItemGroupAsyncWithHttpInfo($item_group_id)
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down
6 changes: 3 additions & 3 deletions src/Buy/Browse/V1/Api/ItemSummaryApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function searchWithHttpInfo($aspect_filter = null, $auto_correct = null,
switch ($statusCode) {
case 200:
if ('\TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection' === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand All @@ -241,7 +241,7 @@ public function searchWithHttpInfo($aspect_filter = null, $auto_correct = null,
$returnType = '\TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection';

if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -329,7 +329,7 @@ public function searchAsyncWithHttpInfo($aspect_filter = null, $auto_correct = n
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down
6 changes: 3 additions & 3 deletions src/Buy/Browse/V1/Api/SearchByImageApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public function searchByImageWithHttpInfo($aspect_filter = null, $category_ids =
switch ($statusCode) {
case 200:
if ('\TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection' === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand All @@ -233,7 +233,7 @@ public function searchByImageWithHttpInfo($aspect_filter = null, $category_ids =
$returnType = '\TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection';

if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down Expand Up @@ -313,7 +313,7 @@ public function searchByImageAsyncWithHttpInfo($aspect_filter = null, $category_
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); // stream goes to serializer
$content = $response->getBody(); // Stream goes to serializer.
} else {
$content = (string) $response->getBody();
}
Expand Down
Loading

0 comments on commit 572615f

Please sign in to comment.