Correction: Remove unintentionally created files#37
Merged
Conversation
Removes FileReaderTool.php and FileReaderToolTest.php which were created unintentionally in a previous step and should not have been included in the prior commit. This commit cleans up your repository by deleting these superfluous files. All tests continue to pass after their removal.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
I refactored the `ResourceContents` class and its subclasses (`TextResourceContents`, `BlobResourceContents`) to use a non-nullable `mimeType` string property. This change improves type safety and resolves a PHPStan warning regarding potential nullability issues. Key changes: - `ResourceContents::$mimeType` is now `string`. - `ResourceContents::__construct` now requires a `string $mimeType`. - `ResourceContents::toArray` now always includes `mimeType`. - `TextResourceContents::__construct` updated to require `string $mimeType` (retaining its default 'text/plain' if no argument is passed). - `TextResourceContents::toArray` simplified, relies on parent for mimeType. - `Resource::text()` helper method updated to ensure it passes a non-nullable mimeType string to `TextResourceContents` constructor. - `BlobResourceContents` already aligned with non-nullable mimeType. - Added `TextResourceContentsTest.php` with tests for its constructor and `toArray` method, covering default and explicit mimeTypes. All PHPCS, PHPStan, and PHPUnit tests pass. The previous PHPStan issue related to `BlobResourceContents::toArray()` return type is resolved by these changes.
🧪 Test Results SummaryPHPUnit Tests✅ All tests passed! Details: OK (197 tests, 846 assertions)
Code Quality
📁 Detailed Reports
This comment will update automatically when you push new commits. Code Coverage
|
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.
Removes FileReaderTool.php and FileReaderToolTest.php which were created unintentionally in a previous step and should not have been included in the prior commit.
This commit cleans up your repository by deleting these superfluous files. All tests continue to pass after their removal.