Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
"require": {
"php": "^8.1",
"saloonphp/saloon": "^3.7",
"thecodingmachine/safe": "^2.5"
"thecodingmachine/safe": "^3.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.42",
"laravel/pint": "^1.14",
"pestphp/pest": "^2.34",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "^1.1",
"rector/rector": "^1.0",
"spaze/phpstan-disallowed-calls": "^3.1",
"thecodingmachine/phpstan-safe-rule": "^1.2"
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"rector/rector": "^2.0",
"spaze/phpstan-disallowed-calls": "^4.0",
"thecodingmachine/phpstan-safe-rule": "^1.3.1"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 4 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ includes:

parameters:
checkBenevolentUnionTypes: true
checkMissingIterableValueType: false
level: max

ignoreErrors:
-
identifier: missingType.iterableValue

paths:
- src
8 changes: 0 additions & 8 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

declare(strict_types=1);

use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;

return RectorConfig::configure()
->withPaths([
Expand All @@ -20,11 +17,6 @@
typeDeclarations: true,
earlyReturn: true
)
->withRules([
AddVoidReturnTypeWhereNoReturnRector::class,
InlineConstructorDefaultToPropertyRector::class,
])
->withSkip([
CallableThisArrayToAnonymousFunctionRector::class,
ClosureToArrowFunctionRector::class,
]);
3 changes: 3 additions & 0 deletions src/DataTransferObjects/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

class Contact
{
/**
* @var list<string>
*/
public const DEFAULT_PROPERTIES = [
'email',
'firstName',
Expand Down
3 changes: 3 additions & 0 deletions src/DataTransferObjects/CustomField.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public function __construct(
) {
}

/**
* @param array{key: string, label: string, type: 'boolean'|'date'|'number'|'string'} $attributes
*/
public static function from(array $attributes): CustomField
{
return new CustomField(
Expand Down
2 changes: 1 addition & 1 deletion src/Requests/Contacts/ContactCustomFieldsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ContactCustomFieldsRequest extends Request

public function createDtoFromResponse(Response $response): array
{
/** @var array<int, array{key: string, label: string, type: string}> $data */
/** @var array<int, array{key: string, label: string, type: 'boolean'|'date'|'number'|'string'}> $data */
$data = $response->json();

return array_map(fn (array $customField): CustomField => CustomField::from($customField), $data);
Expand Down