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
9 changes: 8 additions & 1 deletion .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,18 @@ jobs:
command: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Run bench-vs-floor
id: floor_check
run: composer bench-vs-floor | tee /tmp/floor-result.txt

- name: Capture candidate floor
if: steps.floor_check.outcome == 'success'
run: composer bench-update-floor

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: perf-floor-${{ github.run_number }}
path: /tmp/floor-result.txt
path: |
/tmp/floor-result.txt
tests/performance/baseline-floor.json
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
level: 4
level: 6
paths:
- %currentWorkingDirectory%/src
treatPhpDocTypesAsCertain: false
Expand Down
23 changes: 10 additions & 13 deletions src/FreeDSx/Asn1/Asn1.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,15 @@
class Asn1
{
/**
* @param AbstractType ...$types
* @return SequenceType
* @param AbstractType<mixed> ...$types
*/
public static function sequence(AbstractType ...$types): SequenceType
{
return new SequenceType(...$types);
}

/**
* @param AbstractType ...$types
* @return SequenceOfType
* @param AbstractType<mixed> ...$types
*/
public static function sequenceOf(AbstractType ...$types): SequenceOfType
{
Expand Down Expand Up @@ -295,27 +293,26 @@ public static function visibleString(string $string): VisibleStringType
}

/**
* @param AbstractType ...$types
* @return SetType
* @param AbstractType<mixed> ...$types
*/
public static function set(AbstractType ...$types): SetType
{
return new SetType(...$types);
}

/**
* @param AbstractType ...$types
* @return SetOfType
* @param AbstractType<mixed> ...$types
*/
public static function setOf(AbstractType ...$types): SetOfType
{
return new SetOfType(...$types);
}

/**
* @template T of AbstractType
* @param int $tagNumber
* @template T of AbstractType<mixed>
*
* @param T $type
*
* @return T
*/
public static function context(int $tagNumber, AbstractType $type)
Expand All @@ -324,7 +321,7 @@ public static function context(int $tagNumber, AbstractType $type)
}

/**
* @template T of AbstractType
* @template T of AbstractType<mixed>
* @param int $tagNumber
* @param T $type
* @return T
Expand All @@ -335,7 +332,7 @@ public static function application(int $tagNumber, AbstractType $type)
}

/**
* @template T of AbstractType
* @template T of AbstractType<mixed>
* @param int $tagNumber
* @param T $type
* @return T
Expand All @@ -346,7 +343,7 @@ public static function universal(int $tagNumber, AbstractType $type)
}

/**
* @template T of AbstractType
* @template T of AbstractType<mixed>
* @param int $tagNumber
* @param T $type
* @return T
Expand Down
Loading
Loading