Skip to content

Commit 1c3b529

Browse files
Release 25.6 (#85)
* Version updated * Fix testfile name in tests * Format code snippets --------- Co-authored-by: Denis Averin <[email protected]>
1 parent 40b0091 commit 1c3b529

32 files changed

+86
-85
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Supported PHP Versions](https://img.shields.io/packagist/dependency-v/aspose/barcode-cloud-php/php)](https://packagist.org/packages/aspose/barcode-cloud-php)
77

88
- API version: 4.0
9-
- Package version: 25.5.0
9+
- Package version: 25.6.0
1010
- Supported PHP versions: ">=8.0"
1111

1212
## SDK and API Version Compatibility:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
}
141141
},
142142
"scripts": {
143-
"format": "php-cs-fixer fix index.php src/Aspose/ tests/ --config=php-cs-fixer.conf",
143+
"format": "php-cs-fixer fix index.php src/Aspose/ tests/ snippets/ --config=php-cs-fixer.conf",
144144
"lint": "phpstan analyse index.php src/ tests/ --level=3",
145145
"test": "phpunit"
146146
}

snippets/ManualFetchToken.php

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
<?php
22

3-
require 'vendor/autoload.php';
3+
require 'vendor/autoload.php';
44

5-
use GuzzleHttp\Client;
5+
use GuzzleHttp\Client;
66

7-
$clientId = 'Client Id from https://dashboard.aspose.cloud/applications';
8-
$clientSecret = 'Client Secret from https://dashboard.aspose.cloud/applications';
7+
$clientId = 'Client Id from https://dashboard.aspose.cloud/applications';
8+
$clientSecret = 'Client Secret from https://dashboard.aspose.cloud/applications';
99

10-
// Check the client_id is changed to not break GitHub CI pipeline
11-
if (str_starts_with($clientId, "Client Id")) {
12-
echo "clientId not configured. Skip this snippet test";
13-
return;
14-
}
10+
// Check the client_id is changed to not break GitHub CI pipeline
11+
if (str_starts_with($clientId, "Client Id")) {
12+
echo "clientId not configured. Skip this snippet test";
13+
return;
14+
}
1515

16-
$url = 'https://id.aspose.cloud/connect/token';
16+
$url = 'https://id.aspose.cloud/connect/token';
1717

18-
$data = [
19-
'grant_type' => 'client_credentials',
20-
'client_id' => $clientId,
21-
'client_secret' => $clientSecret
22-
];
18+
$data = [
19+
'grant_type' => 'client_credentials',
20+
'client_id' => $clientId,
21+
'client_secret' => $clientSecret
22+
];
2323

24-
$client = new Client();
24+
$client = new Client();
2525

26-
$response = $client->post($url, [
27-
'form_params' => $data,
28-
'headers' => [
29-
'Content-Type' => 'application/x-www-form-urlencoded'
30-
]
31-
]);
26+
$response = $client->post($url, [
27+
'form_params' => $data,
28+
'headers' => [
29+
'Content-Type' => 'application/x-www-form-urlencoded'
30+
]
31+
]);
3232

33-
$body = $response->getBody()->getContents();
34-
$statusCode = $response->getStatusCode();
33+
$body = $response->getBody()->getContents();
34+
$statusCode = $response->getStatusCode();
3535

36-
if ($statusCode >= 200 && $statusCode < 300) {
37-
$bodyArray=json_decode($body, true);
38-
$token=$bodyArray["access_token"];
39-
echo "Token recieved successfully\n";
40-
// To veiw token uncomment next line
41-
// echo "$token";
36+
if ($statusCode >= 200 && $statusCode < 300) {
37+
$bodyArray=json_decode($body, true);
38+
$token=$bodyArray["access_token"];
39+
echo "Token recieved successfully\n";
40+
// To veiw token uncomment next line
41+
// echo "$token";
4242

43-
} else {
44-
throw new Exception("Unexpected HTTP code: $statusCode\nResponse: $body\n");
45-
}
43+
} else {
44+
throw new Exception("Unexpected HTTP code: $statusCode\nResponse: $body\n");
45+
}

snippets/generate/appearance/GenerateGet.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ function main(): void
3232

3333
$request = new GenerateRequestWrapper(
3434
EncodeBarcodeType::QR,
35-
'Aspose.BarCode.Cloud');
35+
'Aspose.BarCode.Cloud'
36+
);
3637
$request->image_format = BarcodeImageFormat::Png;
3738
$request->foreground_color = 'Black';
3839
$request->background_color = 'White';
@@ -48,4 +49,4 @@ function main(): void
4849
echo "File '{$fileName}' generated.\n";
4950
}
5051

51-
main();
52+
main();

snippets/generate/appearance/GenerateMultipart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ function main(): void
4545
echo "File '{$fileName}' generated.\n";
4646
}
4747

48-
main();
48+
main();

snippets/generate/save/GenerateBody.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ function main(): void
5151
echo "File '{$fileName}' generated.\n";
5252
}
5353

54-
main();
54+
main();

snippets/generate/save/GenerateGet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ function main(): void
4040
echo "File '{$fileName}' generated.\n";
4141
}
4242

43-
main();
43+
main();

snippets/generate/save/GenerateMultipart.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function main(): void
2929
$fileName = __DIR__ . '/../testdata/Pdf417.png';
3030

3131
$generateApi = new GenerateApi(null, makeConfiguration());
32-
32+
3333
$request = new GenerateMultipartRequestWrapper(EncodeBarcodeType::Pdf417, "Aspose.BarCode.Cloud");
3434

3535
$generated = $generateApi->generateMultipart($request);
@@ -39,4 +39,4 @@ function main(): void
3939
echo "File '{$fileName}' generated.\n";
4040
}
4141

42-
main();
42+
main();

snippets/generate/set-colorscheme/GenerateBody.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ function main(): void
5151
echo "File '{$fileName}' generated.\n";
5252
}
5353

54-
main();
54+
main();

snippets/generate/set-colorscheme/GenerateGet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ function main(): void
5050
echo "File '{$fileName}' generated.\n";
5151
}
5252

53-
main();
53+
main();

0 commit comments

Comments
 (0)