Skip to content

feat: insights fixes#42

Merged
emgiezet merged 5 commits intomasterfrom
feat/insights-fixes
Jan 13, 2026
Merged

feat: insights fixes#42
emgiezet merged 5 commits intomasterfrom
feat/insights-fixes

Conversation

@emgiezet
Copy link
Owner

sensio insights static analisys fixes

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies static analysis fixes from Sensio Insights to improve code quality, type safety, and maintainability. The changes focus on adding proper type hints, removing unused imports, improving type casting, and fixing code style issues.

Changes:

  • Added comprehensive type hints to method parameters and return types across all classes
  • Improved type safety with explicit casting of superglobal and configuration values
  • Updated test mocks to match API changes from post/postAsync to request/requestAsync
  • Enhanced error handling with proper null checks and type validation
  • Refactored XmlBuilder with a new normalizeValue() method for consistent value handling

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/Unit/Errbit/Tests/Writer/GuzzleWriterTest.php Updated test mocks to use request/requestAsync methods instead of post/postAsync, removed unused Promise import
src/Errbit/Writer/WriterInterface.php Added type hint array<string, mixed> to config parameter
src/Errbit/Writer/SocketWriter.php Added type hints, explicit type casts for timeouts, improved logic for checking charactersToRead
src/Errbit/Writer/GuzzleWriter.php Changed from post/postAsync to request/requestAsync, fixed spacing, added type hints, fixed typo in 'connect_timeout'
src/Errbit/Writer/AbstractWriter.php Added type hints and explicit string casting for host config
src/Errbit/Utils/XmlBuilder.php Extracted value normalization logic into dedicated method, improved type safety with null checks
src/Errbit/Handlers/ErrorHandlers.php Changed onError return type from void to bool, improved exception type handling
src/Errbit/Exception/Notice.php Added extensive type hints and casts for superglobal access, improved array handling with type annotations
src/Errbit/Errbit.php Added comprehensive type hints for arrays with proper generic types
Resources/doc/symfony7_integration.md Updated documentation to reference PHP 8+ instead of non-existent Symfony 7.4+

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@emgiezet
Copy link
Owner Author

Good to go

@emgiezet emgiezet merged commit 723aaf0 into master Jan 13, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants