Skip to content

Commit dba911f

Browse files
Reformat (#152)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Improved code formatting by adding blank lines after opening tags and adjusting spacing throughout many files for consistency. * Reordered union type hints in method signatures for consistency across interfaces, classes, and tests. * Reformatted configuration files for clarity and maintainability. * **Chores** * Updated coding standards and formatting rules in configuration files. * Added new vendor directories to the PHP include path configuration. * **Bug Fixes** * Replaced standard string trimming functions with multibyte-safe versions in select locations to improve handling of multibyte characters. * **Tests** * Updated tests to use multibyte-safe string trimming for more accurate comparisons. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Robert Landers <landers.robert@gmail.com>
1 parent 2d0e58f commit dba911f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+124
-59
lines changed

.idea/php.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* Copyright ©2024 Robert Landers
45
*
@@ -23,7 +24,7 @@
2324

2425
// example bootstrap file
2526

26-
return new class () implements \Psr\Container\ContainerInterface {
27+
return new class implements \Psr\Container\ContainerInterface {
2728
public function get(string $id)
2829
{
2930
return new $id();

pint.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
22
"preset": "per",
3-
"exclude": ["cli"],
3+
"exclude": [
4+
"cli"
5+
],
46
"rules": {
57
"array_push": true,
8+
"attribute_empty_parentheses": {
9+
"use_parentheses": false
10+
},
11+
"backtick_to_shell_exec": true,
612
"combine_consecutive_issets": true,
713
"combine_consecutive_unsets": true,
814
"combine_nested_dirname": true,
@@ -22,6 +28,12 @@
2228
"single_quote": true,
2329
"strict_param": true,
2430
"use_arrow_functions": true,
25-
"void_return": true
31+
"void_return": true,
32+
"no_unused_imports": true,
33+
"ordered_interfaces": true,
34+
"ordered_types": {
35+
"null_adjustment": "always_last"
36+
},
37+
"simplified_if_return": true
2638
}
2739
}

src/ActivityInfo.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* Copyright ©2024 Robert Landers
45
*

src/DurableClientInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424

2525
namespace Bottledcode\DurablePhp;
2626

27-
interface DurableClientInterface extends OrchestrationClientInterface, EntityClientInterface {}
27+
interface DurableClientInterface extends EntityClientInterface, OrchestrationClientInterface {}

src/DurableLogger.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* Copyright ©2024 Robert Landers
45
*
@@ -97,55 +98,55 @@ public function formatBatch(array $records): string
9798
}
9899

99100
#[\Override]
100-
public function info(\Stringable|string $message, array $context = []): void
101+
public function info(string|\Stringable $message, array $context = []): void
101102
{
102103
$this->logger->info($message, $context);
103104
}
104105

105106
#[\Override]
106-
public function error(\Stringable|string $message, array $context = []): void
107+
public function error(string|\Stringable $message, array $context = []): void
107108
{
108109
$this->logger->error($message, $context);
109110
}
110111

111112
#[\Override]
112-
public function emergency(\Stringable|string $message, array $context = []): void
113+
public function emergency(string|\Stringable $message, array $context = []): void
113114
{
114115
$this->logger->emergency($message, $context);
115116
}
116117

117118
#[\Override]
118-
public function alert(\Stringable|string $message, array $context = []): void
119+
public function alert(string|\Stringable $message, array $context = []): void
119120
{
120121
$this->logger->alert($message, $context);
121122
}
122123

123124
#[\Override]
124-
public function critical(\Stringable|string $message, array $context = []): void
125+
public function critical(string|\Stringable $message, array $context = []): void
125126
{
126127
$this->logger->critical($message, $context);
127128
}
128129

129130
#[\Override]
130-
public function warning(\Stringable|string $message, array $context = []): void
131+
public function warning(string|\Stringable $message, array $context = []): void
131132
{
132133
$this->logger->warning($message, $context);
133134
}
134135

135136
#[\Override]
136-
public function notice(\Stringable|string $message, array $context = []): void
137+
public function notice(string|\Stringable $message, array $context = []): void
137138
{
138139
$this->logger->notice($message, $context);
139140
}
140141

141142
#[\Override]
142-
public function debug(\Stringable|string $message, array $context = []): void
143+
public function debug(string|\Stringable $message, array $context = []): void
143144
{
144145
$this->logger->debug($message, $context);
145146
}
146147

147148
#[\Override]
148-
public function log($level, \Stringable|string $message, array $context = []): void
149+
public function log($level, string|\Stringable $message, array $context = []): void
149150
{
150151
$this->logger->log($level, $message, $context);
151152
}

src/Events/External.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* Copyright ©2024 Robert Landers
45
*

src/Events/GiveOwnership.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* Copyright ©2024 Robert Landers
45
*

src/Events/RaiseEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static function forOperation(string $operation, array $input): static
4343

4444
public static function forCustom(string $name, array $eventData): static
4545
{
46-
return new static(Uuid::uuid7(), ltrim($name, '_'), $eventData);
46+
return new static(Uuid::uuid7(), mb_ltrim($name, '_'), $eventData);
4747
}
4848

4949
public static function forLock(string $owner): static

src/Events/ShareOwnership.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* Copyright ©2024 Robert Landers
45
*

0 commit comments

Comments
 (0)