Skip to content

Commit dae2169

Browse files
authored
Merge pull request #4 from perfbaseorg/develop
Cleanup and better compression
2 parents 2f3348d + 8a12742 commit dae2169

19 files changed

+216
-273
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
php-versions: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
17+
php-versions: [ 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 ]
1818

1919
steps:
2020
- name: Checkout code
@@ -26,6 +26,9 @@ jobs:
2626
php-version: ${{ matrix.php-versions }}
2727
tools: composer
2828

29+
- name: Validate composer.json and composer.lock
30+
run: composer validate --no-check-all --no-check-publish
31+
2932
- name: Install dependencies
3033
run: composer install --prefer-dist --no-progress
3134

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
"email": "[email protected]"
2020
}
2121
],
22+
"scripts": {
23+
"lint": "composer run-script phpstan && composer run-script test",
24+
"test": "phpunit",
25+
"phpstan": "phpstan analyse --memory-limit=2G"
26+
},
2227
"require": {
2328
"php": ">=7.4 <8.5",
2429
"ext-curl": "*",

src/Exception/PerfbaseApiKeyMissingException.php

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Perfbase\SDK\Exception;
4+
5+
class PerfbaseEncodingException extends PerfbaseException
6+
{
7+
8+
}

src/Exception/PerfbaseException.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,12 @@
33
namespace Perfbase\SDK\Exception;
44

55
use Exception;
6-
use Perfbase\SDK\Utils\TranslationUtil;
76
use Throwable;
87

98
class PerfbaseException extends Exception
109
{
11-
12-
/**
13-
* @param string $translation
14-
* @param array<scalar> $values
15-
* @param int $code
16-
* @param Throwable|null $previous
17-
* @throws PerfbaseTranslationNotFoundException
18-
*/
19-
public function __construct(string $translation, array $values = [], int $code = 0, ?Throwable $previous = null)
10+
public function __construct(string $message = "")
2011
{
21-
$message = TranslationUtil::get($translation, $values);
22-
parent::__construct($message, $code, $previous);
12+
parent::__construct($message);
2313
}
2414
}

src/Exception/PerfbaseExtensionMissingException.php

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Perfbase\SDK\Exception;
4+
5+
class PerfbaseInvalidConfigException extends PerfbaseException
6+
{
7+
8+
}

src/Exception/PerfbaseNonScalarMetaDataException.php

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

src/Exception/PerfbaseStateException.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@
44

55
class PerfbaseStateException extends PerfbaseException
66
{
7-
public function __construct(string $translation = 'state_exception', array $values = [])
8-
{
9-
parent::__construct($translation, $values);
10-
}
7+
118
}

src/Exception/PerfbaseTranslationNotFoundException.php

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

0 commit comments

Comments
 (0)