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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
vendor/
composer.lock
build/
.phpunit.cache/
.php-cs-fixer.cache
38 changes: 30 additions & 8 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
<?php

$config = new PhpCsFixer\Config();
$config->getFinder()
->exclude('vendor')
->in(__DIR__);
$config->setRules([
'@PSR2' => true
]);
return $config;
declare(strict_types=1);

use PhpCsFixer\Finder;

$finder = Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
]);

return (new PhpCsFixer\Config())
->setUnsupportedPhpVersionAllowed(true)
->setCacheFile(__DIR__ . '/build/.php-cs-fixer.cache')
->setFinder($finder)
->setRules([
'@PSR2' => true,
'multiline_promoted_properties' => true,
'no_unused_imports' => true,
'indentation_type' => true,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
'cast_spaces' => ['space' => 'single'],
'concat_space' => ['spacing' => 'one'],
'phpdoc_align' => ['align' => 'left'],
'phpdoc_indent' => true,
'array_indentation' => true,
'nullable_type_declaration' => [
'syntax' => 'union',
]
])
;
253 changes: 0 additions & 253 deletions phpstan-baseline.neon

This file was deleted.

3 changes: 1 addition & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
parameters:
level: 8
level: 10
paths:
- src
ignoreErrors:
- '#Property .+::[\$a-zA-Z]+ is never written, only read\.#'
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
- phpstan-baseline.neon
14 changes: 8 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.1/phpunit.xsd" backupGlobals="true" bootstrap="vendor/autoload.php" colors="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false" requireCoverageMetadata="false">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.0/phpunit.xsd"
backupGlobals="true"
bootstrap="vendor/autoload.php"
colors="true"
cacheDirectory="build/.phpunit.cache"
>
<testsuites>
<testsuite name="Unittests">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./</directory>
<directory>src</directory>
</include>
<exclude>
<directory suffix=".php">vendor/</directory>
<directory suffix=".php">tests/</directory>
</exclude>
</source>
</phpunit>
8 changes: 5 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertSameTrueFalseToAssertTrueFalseRector;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\UseSpecificWillMethodRector;
use Rector\PHPUnit\Set\PHPUnitSetList;

return RectorConfig::configure()
->withPreparedSets(deadCode: true, codeQuality: true)
->withPreparedSets(
deadCode: true,
codeQuality: true,
typeDeclarations: true
)
->withIndent()
->withImportNames()
->withPaths([
Expand All @@ -22,7 +25,6 @@
PHPUnitSetList::COMPOSER_BASED,
])
->withSkip([
ClassPropertyAssignToConstructorPromotionRector::class,
ReadOnlyPropertyRector::class, // skipped due to hydration will require writable properties
])
->withRules([
Expand Down
11 changes: 1 addition & 10 deletions src/Factory/StructFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,7 @@
*/
final class StructFactory implements StructFactoryInterface
{
/**
* Creates a Instance of HashMap
*
* [
* 'field_name' => 'field_value',
* 'field_name_next' => 'field_value_next',
* ]
*
* Field names can be found in your pool configuration.
*/
/** @inheritDoc */
public static function createHashMap(array $items): HashMapInterface
{
$hashMapItems = [];
Expand Down
Loading
Loading