Repository navigation
Immutable descriptors, directory records and path table records (breaking) - #120
Merged
Merged
Conversation
…cords BREAKING CHANGE: public properties of Descriptor and its subclasses, FileDirectory, PathTableRecord and IsoFile::$descriptors are readonly and set at construction. - Descriptor::init() is gone: descriptors parse their bytes in the constructor - name/type are class constants (Descriptor::getType() is unchanged) - FileDirectory::init() / PathTableRecord::init() become FileDirectory::read() / PathTableRecord::read() returning null at the end of the records - PathTableRecord::setDirectoryNumber() is gone (the number is given to read()) - IsoFile::$descriptors / $additionalDescriptors are readonly
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 21 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #120 +/- ##
============================================
- Coverage 97.21% 97.04% -0.18%
+ Complexity 582 579 -3
============================================
Files 24 22 -2
Lines 1329 1318 -11
============================================
- Hits 1292 1279 -13
- Misses 37 39 +2 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the parsed structures value objects (UX-04), for the next major release.
Breaking changes
readonly, set when the object is createdDescriptor::init()is gone: descriptors parse their bytes in the constructor (new PrimaryVolume($stdId, $version, $bytes, $offset),Factory::create($type, $stdId, $version, $bytes, $offset))getType()unchanged)FileDirectory::init()andPathTableRecord::init()becomeFileDirectory::read()/PathTableRecord::read()(static, return null at the end of the records);PathTableRecord::setDirectoryNumber()is removed (the number is given toread())IsoFile::$descriptors/$additionalDescriptorsare readonlyTests: FileDirectory / PathTableRecord / descriptor tests build their objects through the real readers (new Support\Records helper); ImmutabilityTest checks by reflection that every public property of the parsed structures is readonly.
If #117 merges first this may need a trivial rebase (both touch IsoFile).
🤖 Generated with Claude Code