Skip to content

Commit cb96ae2

Browse files
authored
Merge pull request #50 from picamator/development
Release 5.4.2
2 parents f2ff577 + de29b62 commit cb96ae2

File tree

47 files changed

+544
-352
lines changed

Some content is hidden

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

47 files changed

+544
-352
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"captainhook/captainhook": "^5.27",
5656
"phpstan/phpstan": "^2.1",
5757
"phpstan/phpstan-strict-rules": "^2.0",
58-
"phpunit/phpunit": "^12.4",
58+
"phpunit/phpunit": "^13.0",
5959
"slevomat/coding-standard": "^8.24",
6060
"squizlabs/php_codesniffer": "^4.0",
6161
"symfony/validator": "^8.0",

composer.lock

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

phpcs.xml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,20 @@
1515
</rule>
1616

1717
<config name="installed_paths" value="../../slevomat/coding-standard"/>
18+
<rule ref="SlevomatCodingStandard.Attributes.DisallowAttributesJoining"/>
19+
<rule ref="SlevomatCodingStandard.Attributes.DisallowMultipleAttributesPerLine"/>
20+
1821
<rule ref="SlevomatCodingStandard.Classes.BackedEnumTypeSpacing"/>
1922
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
2023
<rule ref="SlevomatCodingStandard.Classes.ConstantSpacing"/>
2124
<rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration"/>
2225

26+
<rule ref="SlevomatCodingStandard.TypeHints.ClassConstantTypeHint"/>
27+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
28+
<properties>
29+
<property name="spacesCountAroundEqualsSign" value="0"/>
30+
</properties>
31+
</rule>
2332
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"/>
2433
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
2534

@@ -36,12 +45,14 @@
3645
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
3746
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces"/>
3847

48+
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
49+
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
3950
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"/>
4051
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
41-
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
4252

4353
<rule ref="SlevomatCodingStandard.Variables.DisallowSuperGlobalVariable"/>
4454
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
55+
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
4556

4657
<rule ref="SlevomatCodingStandard.PHP.TypeCast"/>
4758
<rule ref="SlevomatCodingStandard.PHP.UselessParentheses"/>
@@ -55,7 +66,12 @@
5566
<rule ref="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn"/>
5667
<rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator"/>
5768
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
58-
<rule ref="SlevomatCodingStandard.Complexity.Cognitive"/>
69+
<rule ref="SlevomatCodingStandard.Complexity.Cognitive">
70+
<properties>
71+
<property name="warningThreshold" value="6"/>
72+
<property name="errorThreshold" value="7"/>
73+
</properties>
74+
</rule>
5975

6076
<file>bin</file>
6177
<file>examples</file>

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
bootstrap="./vendor/autoload.php"
55
colors="true"
66
stderr="true"
7-
beStrictAboutTestsThatDoNotTestAnything="false"
7+
requireSealedMockObjects="true"
88
displayDetailsOnPhpunitDeprecations="true"
99
displayDetailsOnTestsThatTriggerDeprecations="true"
1010
displayDetailsOnTestsThatTriggerErrors="true"

src/Dependency/Finder/FinderIterator.php

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

55
namespace Picamator\TransferObject\Dependency\Finder;
66

7-
use IteratorAggregate;
87
use Countable;
8+
use IteratorAggregate;
99
use Symfony\Component\Finder\Finder;
1010
use Traversable;
1111

src/Generated/DefinitionBuiltInTypeTransfer.php

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Shared/Filesystem/FileAppender.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function appendToFile(string $filename, string $content): void
2020

2121
if ($writeResult === false) {
2222
throw new FileAppenderException(
23-
sprintf('Failed to write content "%s" into the file "%s".', $content, $filename),
23+
sprintf('Failed to write content into the file "%s".', $filename),
2424
);
2525
}
2626
}

src/Shared/Filesystem/FileReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private function closeFile($file, string $filename): void
4343
}
4444

4545
throw new FileReaderException(
46-
sprintf('Failed to close "%s" file.', $filename),
46+
sprintf('Failed to close file "%s".', $filename),
4747
);
4848
}
4949

src/Shared/Reader/FileReaderProgress.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ private function getTotalBytes(string $filename): int
4646
{
4747
if (!$this->fileExists($filename)) {
4848
throw new FileReaderException(
49-
sprintf('File "%s" is not exist.', $filename),
49+
sprintf('File "%s" does not exist.', $filename),
5050
);
5151
}
5252

5353
$fileSize = $this->filesize($filename);
5454
if ($fileSize === 0) {
5555
throw new FileReaderException(
56-
sprintf('File size "%s" is empty.', $filename),
56+
sprintf('File "%s" is empty.', $filename),
5757
);
5858
}
5959

src/Transfer/Attribute/AttributeTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private function getConstantReflection(string $constantName, string $attributeNa
7979
$firstReflectionAttribute = $reflectionAttributes[0] ?? null;
8080
if ($firstReflectionAttribute === null) {
8181
throw new AttributeTransferException(
82-
\sprintf('Constant\'s "%s" attribute "%s" not found.', $constantName, $attributeName),
82+
\sprintf('Attribute "%s" not found for constant "%s".', $constantName, $attributeName),
8383
);
8484
}
8585

0 commit comments

Comments
 (0)