Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImagickPixel::getColor() normalized param accept int instead of bool #2020

Merged
merged 7 commits into from Nov 28, 2022

Conversation

blankse
Copy link
Contributor

@blankse blankse commented Nov 21, 2022

resources/functionMap.php Outdated Show resolved Hide resolved
@blankse
Copy link
Contributor Author

blankse commented Nov 22, 2022

@VincentLanglet @rajyan I added the stub file. I think this should be enough right?

@mad-briller
Copy link
Contributor

mad-briller commented Nov 22, 2022

apologies for my lack of reply @blankse github didn't notify me of your comment the first time

@VincentLanglet @rajyan I added the stub file. I think this should be enough right?

it's worth adding some NodeScopeResolverTest cases to prove that it's working as intended:

  1. create a file in tests/PHPStan/Analyser/data that contains examples of usage, for each value of the 2nd param
  2. using the PHPStan\Testing\assertType method write assertions in the file; for example
  3. add a new yield statement to the NodeScopeResolverTest that yields the file you created

@blankse
Copy link
Contributor Author

blankse commented Nov 22, 2022

@mad-briller I added a test.

@ondrejmirtes
Copy link
Member

You should also verify that https://phpstan.org/r/991c445c-3376-4892-947f-a1e5cd591d2d is actually fixed with CallMethodsRuleTest.

Thank you.

@blankse
Copy link
Contributor Author

blankse commented Nov 23, 2022

@ondrejmirtes I add a CallMethodsRuleTest for the params

@ondrejmirtes
Copy link
Member

Thank you!

@blankse blankse deleted the patch-1 branch November 28, 2022 09:51
kingjia90 added a commit to pimcore/pimcore that referenced this pull request Nov 28, 2022
fashxp pushed a commit to pimcore/pimcore that referenced this pull request Nov 28, 2022
* Fix: pdfreactor buildPdf declaration not compatible with Abstract

* Update Environment.php

* Fix: clearEnv a nullable property should set it to `null`

* [Task]: Apply native parameter and return type hints
More return types and fixes added

* [Task]: Apply native parameter and return type hints
More return types and fixes added

* [Task]: Apply native parameter and return type hints
Fixes for DataObjects

* Update lib/Navigation/Renderer/Breadcrumbs.php

Co-authored-by: Sebastian Blank <blank@data-factory.net>

* Update bundles/EcommerceFrameworkBundle/src/Tracking/AbstractProductData.php

Co-authored-by: Sebastian Blank <blank@data-factory.net>

* [Task]: Apply native parameter and return type hints
More return types and fixes added

* [Task]: Apply native parameter and return type hints
getClass can return null

* [Task]: Apply native parameter and return type hints

* [Task]: Apply native parameter and return type hints

* Task: remove getColor phpstan ignore it got fixed

phpstan/phpstan-src#2020

* [Task]: Apply native parameter and return type hints
Removed string check, but added string cast in Select.php

* Revert "Task: remove getColor phpstan ignore it got fixed"

This reverts commit 9651827.

* Revert "Revert "Task: remove getColor phpstan ignore it got fixed""

This reverts commit 5f415a9.

* [Task]: Apply native parameter and return type hints

* [Task]: Apply native parameter and return type hints
Set phpstan to fixed version instead of dev-branch

* [Task]: Apply native parameter and return type hints
Removed types for classId and className

Co-authored-by: Marco Perberschlager <marco.perberschlager@pimcore.com>
Co-authored-by: mcop1 <89011527+mcop1@users.noreply.github.com>
Co-authored-by: Sebastian Blank <blank@data-factory.net>
brusch pushed a commit to pimcore/ecommerce-framework-bundle that referenced this pull request Mar 28, 2023
* Fix: pdfreactor buildPdf declaration not compatible with Abstract

* Update Environment.php

* Fix: clearEnv a nullable property should set it to `null`

* [Task]: Apply native parameter and return type hints
More return types and fixes added

* [Task]: Apply native parameter and return type hints
More return types and fixes added

* [Task]: Apply native parameter and return type hints
Fixes for DataObjects

* Update lib/Navigation/Renderer/Breadcrumbs.php

Co-authored-by: Sebastian Blank <blank@data-factory.net>

* Update bundles/EcommerceFrameworkBundle/src/Tracking/AbstractProductData.php

Co-authored-by: Sebastian Blank <blank@data-factory.net>

* [Task]: Apply native parameter and return type hints
More return types and fixes added

* [Task]: Apply native parameter and return type hints
getClass can return null

* [Task]: Apply native parameter and return type hints

* [Task]: Apply native parameter and return type hints

* Task: remove getColor phpstan ignore it got fixed

phpstan/phpstan-src#2020

* [Task]: Apply native parameter and return type hints
Removed string check, but added string cast in Select.php

* Revert "Task: remove getColor phpstan ignore it got fixed"

This reverts commit 965182793505c848b1db4586df2e462c0a29d7ee.

* Revert "Revert "Task: remove getColor phpstan ignore it got fixed""

This reverts commit 5f415a9d576630ab58425ef964df6d2260551b6f.

* [Task]: Apply native parameter and return type hints

* [Task]: Apply native parameter and return type hints
Set phpstan to fixed version instead of dev-branch

* [Task]: Apply native parameter and return type hints
Removed types for classId and className

Co-authored-by: Marco Perberschlager <marco.perberschlager@pimcore.com>
Co-authored-by: mcop1 <89011527+mcop1@users.noreply.github.com>
Co-authored-by: Sebastian Blank <blank@data-factory.net>
brusch pushed a commit to pimcore/web-to-print-bundle that referenced this pull request Apr 6, 2023
* Fix: pdfreactor buildPdf declaration not compatible with Abstract

* Update Environment.php

* Fix: clearEnv a nullable property should set it to `null`

* [Task]: Apply native parameter and return type hints
More return types and fixes added

* [Task]: Apply native parameter and return type hints
More return types and fixes added

* [Task]: Apply native parameter and return type hints
Fixes for DataObjects

* Update lib/Navigation/Renderer/Breadcrumbs.php

Co-authored-by: Sebastian Blank <blank@data-factory.net>

* Update bundles/EcommerceFrameworkBundle/src/Tracking/AbstractProductData.php

Co-authored-by: Sebastian Blank <blank@data-factory.net>

* [Task]: Apply native parameter and return type hints
More return types and fixes added

* [Task]: Apply native parameter and return type hints
getClass can return null

* [Task]: Apply native parameter and return type hints

* [Task]: Apply native parameter and return type hints

* Task: remove getColor phpstan ignore it got fixed

phpstan/phpstan-src#2020

* [Task]: Apply native parameter and return type hints
Removed string check, but added string cast in Select.php

* Revert "Task: remove getColor phpstan ignore it got fixed"

This reverts commit 965182793505c848b1db4586df2e462c0a29d7ee.

* Revert "Revert "Task: remove getColor phpstan ignore it got fixed""

This reverts commit 5f415a9d576630ab58425ef964df6d2260551b6f.

* [Task]: Apply native parameter and return type hints

* [Task]: Apply native parameter and return type hints
Set phpstan to fixed version instead of dev-branch

* [Task]: Apply native parameter and return type hints
Removed types for classId and className

Co-authored-by: Marco Perberschlager <marco.perberschlager@pimcore.com>
Co-authored-by: mcop1 <89011527+mcop1@users.noreply.github.com>
Co-authored-by: Sebastian Blank <blank@data-factory.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants