Skip to content

Minor code cleanup - fixed a bunch of wrong type annotations, and also replaced 'this' wit…#42

Merged
regdos merged 4 commits into
PayU-EMEA:masterfrom
baldwin-agency:fixed-bunch-of-wrong-type-annoations-and-other-minor-things
Jun 22, 2026
Merged

Minor code cleanup - fixed a bunch of wrong type annotations, and also replaced 'this' wit…#42
regdos merged 4 commits into
PayU-EMEA:masterfrom
baldwin-agency:fixed-bunch-of-wrong-type-annoations-and-other-minor-things

Conversation

@hostep

@hostep hostep commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

…h 'block' variable in phtml files.

While working on #41 I noticed some minor warnings phpstan found about wrong type annotations in various files.
These got fixed here.

I also replaced the incorrect $this-> calls with $block-> calls in phtml files. It does work with $this but that usage is discouraged in Magento.

@regdos

regdos commented May 14, 2026

Copy link
Copy Markdown
Contributor

@hostep Please remove changes from files in lib/OpenPayU/* because there files are from external library (openpayu_sdk).

@lbajsarowicz

Copy link
Copy Markdown

@regdos why is that library included in the codebase instead of being installed with composer?

@regdos

regdos commented May 14, 2026

Copy link
Copy Markdown
Contributor

Historically, this was done so that the plugin could be used without installing it via Composer. We will consider removing and adding dependencies in the future.
Changes from both PRs by @hostep have been added to openpayu_php and included here.

@hostep

hostep commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@regdos: Done!

@hostep

hostep commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

I've also opened PayU-EMEA/openpayu_php#145 a few minutes ago in case you didn't see it.

@regdos regdos merged commit 88876bd into PayU-EMEA:master Jun 22, 2026
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