Skip to content

Commit d45b046

Browse files
committed
Refactor workflows and codebase: remove release.yml, adjust main.yml for releases, update coding style, and improve URL constant visibility.
1 parent cdf4747 commit d45b046

5 files changed

Lines changed: 24 additions & 27 deletions

File tree

.github/workflows/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,17 @@ jobs:
8383
run: |
8484
composer global require php-coveralls/php-coveralls
8585
php-coveralls --coverage_clover=build/logs/clover.xml -v
86+
87+
release:
88+
name: Create GitHub Release
89+
needs: build
90+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, '-rc') }}
91+
runs-on: ubuntu-latest
92+
permissions:
93+
contents: write
94+
steps:
95+
- name: Create release
96+
uses: softprops/action-gh-release@v2
97+
with:
98+
tag_name: ${{ github.ref_name }}
99+
generate_release_notes: true

.github/workflows/release.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/FioApi/Transferrer.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
2-
declare(strict_types = 1);
2+
3+
declare(strict_types=1);
34

45
namespace FioApi;
56

@@ -104,7 +105,9 @@ public function getCertificatePath(): string
104105
private function validateCertificatePath(string $certificatePath): string
105106
{
106107
if ($certificatePath === '' || is_file($certificatePath) === false) {
107-
throw new MissingCertificateException(sprintf('CA certificate path "%s" does not exist.', $certificatePath));
108+
throw new MissingCertificateException(
109+
sprintf('CA certificate path "%s" does not exist.', $certificatePath)
110+
);
108111
}
109112

110113
return $certificatePath;

src/FioApi/Upload/Uploader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
2-
declare(strict_types = 1);
2+
3+
declare(strict_types=1);
34

45
namespace FioApi\Upload;
56

src/FioApi/UrlBuilder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<?php
2-
declare(strict_types = 1);
2+
3+
declare(strict_types=1);
34

45
namespace FioApi;
56

67
use FioApi\Exceptions\MissingTokenException;
78

89
class UrlBuilder
910
{
10-
const BASE_URL = 'https://fioapi.fio.cz/v1/rest/';
11+
public const BASE_URL = 'https://fioapi.fio.cz/v1/rest/';
1112

1213
protected string $token;
1314
protected string $baseUrl;

0 commit comments

Comments
 (0)