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

mark readline* function having side-effects #1153

Merged
merged 3 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions bin/generate-function-metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,20 @@ public function enterNode(Node $node)
$template = <<<'php'
<?php declare(strict_types = 1);
/**
* GENERATED FILE - DO NOT EDIT!
*
* This file is generated automatically when running bin/generate-function-metadata.php
* and the result is merged from bin/functionMetadata_original.php and by looking at jetbrains/phpstorm-stubs methods
* and functions with the #[Pure] attribute.
*
* If you want to add new entries here follow these steps:
* 1) verify on https://phpstan.org/try whether the entry you are going to add does not already work as expected.
* 2) Contribute the functions that have 'hasSideEffects' => true as a modification to bin/functionMetadata_original.php.
* 3) Contribute the #[Pure] functions without side effects to https://github.com/JetBrains/phpstorm-stubs
* 4) Once the PR from 3) is merged, please update the package here and run ./bin/generate-function-metadata.php.
*/

return [
%s
];
Expand Down
14 changes: 14 additions & 0 deletions resources/functionMetadata.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
<?php declare(strict_types = 1);

/**
* GENERATED FILE - DO NOT EDIT!
*
* This file is generated automatically when running bin/generate-function-metadata.php
* and the result is merged from bin/functionMetadata_original.php and by looking at jetbrains/phpstorm-stubs methods
* and functions with the #[Pure] attribute.
*
* If you want to add new entries here follow these steps:
* 1) verify on https://phpstan.org/try whether the entry you are going to add does not already work as expected.
* 2) Contribute the functions that have 'hasSideEffects' => true as a modification to bin/functionMetadata_original.php.
* 3) Contribute the #[Pure] functions without side effects to https://github.com/JetBrains/phpstorm-stubs
* 4) Once the PR from 3) is merged, please update the package here and run ./bin/generate-function-metadata.php.
*/

return [
'CURLFile::getFilename' => ['hasSideEffects' => false],
'CURLFile::getMimeType' => ['hasSideEffects' => false],
Expand Down