Skip to content

Rename $lng to $language and add type hints#6

Merged
jedrzejjarocki merged 4 commits intoadd-new-report-typesfrom
copilot/sub-pr-5
Jan 21, 2026
Merged

Rename $lng to $language and add type hints#6
jedrzejjarocki merged 4 commits intoadd-new-report-typesfrom
copilot/sub-pr-5

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 19, 2026

Improved type safety and code clarity by renaming the ambiguous $lng parameter and adding complete type annotations.

Parameter renaming:

  • Renamed $lng$language across findByRegon(), findByNip(), findByKrs(), findById(), getCumulativeReport(), and getReport()

Type annotations:

  • Added string type hints for $language parameter with default value "pl"
  • Added return type declarations (: array, : void) to all methods
  • Added missing type hints to validation methods and their parameters

Documentation:

  • Updated PHPDoc blocks with proper @param string $language annotations
  • Added description "Language code ('pl' or 'en')" for language parameters
// Before
public function findByRegon(string $regon, $lng = "pl"): array

// After  
public function findByRegon(string $regon, string $language = "pl"): array

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: jedrzejjarocki <46086567+jedrzejjarocki@users.noreply.github.com>
Copilot AI and others added 2 commits January 19, 2026 17:47
Co-authored-by: jedrzejjarocki <46086567+jedrzejjarocki@users.noreply.github.com>
Co-authored-by: jedrzejjarocki <46086567+jedrzejjarocki@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new report types and language support Rename $lng to $language and add type hints Jan 19, 2026
Copilot AI requested a review from jedrzejjarocki January 19, 2026 17:49
Copy link
Copy Markdown
Contributor

@jedrzejjarocki jedrzejjarocki left a comment

Choose a reason for hiding this comment

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

LGTM

@jedrzejjarocki jedrzejjarocki marked this pull request as ready for review January 21, 2026 16:48
@jedrzejjarocki jedrzejjarocki merged commit 502b360 into add-new-report-types Jan 21, 2026
@jedrzejjarocki jedrzejjarocki deleted the copilot/sub-pr-5 branch January 21, 2026 16:48
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.

3 participants