mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-25 17:45:35 +03:00
Run Psalm on src as well as Static Analysis Fixture (#282)
* Run Psalm on src as well as Static Analysis Fixture Psalm baselining feature is used to prevent immediate build failures - psalm will just cause failures for errors caused by future changes to the code. See https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file * Fix MixedArgument issues in OrderedTimeCodec Potentially unpack should be documented as returning string[] instead of array to make this unecassary. * Fix Psalm PossiblyNullPropertyAssignmentValue issues * Add psalm-immutable annotation to Uuid class * Fix Psalm MixedArgument issues * Fix MissingImmutableAnnotation psalm issue * Fix Psalm MixedAssignment issue * Fix Psalm InvalidReturnStatement / InvalidReturnType issue * Add ImpureMethodCall issues to baseline. Fixing these in one place just moves them somewhere else. * Exclude psalm-baseline.xml from exported git archives
This commit is contained in:
committed by
Ben Ramsey
parent
27e1c4e073
commit
bdc9170edc
@@ -75,7 +75,11 @@ class OrderedTimeCodec extends StringCodec
|
||||
);
|
||||
}
|
||||
|
||||
$hex = unpack('H*', $bytes)[1];
|
||||
$unpacked = unpack('H*', $bytes);
|
||||
|
||||
assert(is_string($unpacked[1]));
|
||||
|
||||
$hex = $unpacked[1];
|
||||
|
||||
// Rearrange the fields to their original order
|
||||
$hex = substr($hex, 8, 4)
|
||||
|
||||
Reference in New Issue
Block a user