Skip to content

phpdoc use GroupKeyword for groups #325

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

Merged
merged 1 commit into from
Jan 15, 2021
Merged

Conversation

soyuka
Copy link
Contributor

@soyuka soyuka commented Jan 15, 2021

No description provided.

@codecov
Copy link

codecov bot commented Jan 15, 2021

Codecov Report

Merging #325 (43600b2) into master (4823c4f) will decrease coverage by 3.98%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #325      +/-   ##
============================================
- Coverage     99.73%   95.75%   -3.99%     
- Complexity     1911     1978      +67     
============================================
  Files            63       65       +2     
  Lines          4601     4404     -197     
============================================
- Hits           4589     4217     -372     
- Misses           12      187     +175     
Impacted Files Coverage Δ Complexity Δ
src/Component.php 100.00% <ø> (ø) 3.00 <0.00> (ø)
src/Components/AlterOperation.php 100.00% <ø> (ø) 35.00 <0.00> (ø)
src/Components/Array2d.php 100.00% <ø> (ø) 15.00 <0.00> (ø)
src/Components/ArrayObj.php 100.00% <ø> (ø) 26.00 <0.00> (ø)
src/Components/CaseExpression.php 100.00% <ø> (ø) 54.00 <0.00> (+2.00)
src/Components/Condition.php 100.00% <ø> (ø) 29.00 <0.00> (ø)
src/Components/CreateDefinition.php 100.00% <ø> (ø) 43.00 <0.00> (ø)
src/Components/DataType.php 100.00% <ø> (ø) 17.00 <0.00> (ø)
src/Components/Expression.php 100.00% <ø> (ø) 90.00 <0.00> (ø)
src/Components/ExpressionArray.php 95.74% <ø> (-0.34%) 23.00 <0.00> (ø)
... and 120 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4823c4f...2d8013a. Read the comment docs.

@williamdes
Copy link
Member

williamdes commented Jan 15, 2021

Hi @soyuka 🇫🇷
I do not know how you did find out that but it looks valid and

sql-parser/src/Parser.php

Lines 189 to 192 in 4823c4f

'GROUP BY' => array(
'class' => 'PhpMyAdmin\\SqlParser\\Components\\GroupKeyword',
'field' => 'group',
),
seems to confirm that

@williamdes williamdes self-assigned this Jan 15, 2021
@williamdes williamdes added this to the 4.7.2 milestone Jan 15, 2021
@williamdes williamdes changed the base branch from master to QA January 15, 2021 23:25
@williamdes williamdes merged commit aea46cb into phpmyadmin:QA Jan 15, 2021
@soyuka
Copy link
Contributor Author

soyuka commented Jan 16, 2021

I'm using psalm and the following code was flagged as erroneous as $statement->group was typed as OrderKeyword:

            $groups = [];
            foreach ($statement->order as $order) {
                $groups[] = new GroupKeyword($order->expr);
            }

            // Had to type this manually
            /** @var OrderKeyword[] */
            $statement->group = $groups;

Thanks for the quick merge!

@williamdes
Copy link
Member

Very cool, we use psalm on the main project. Let me know if you find other issues

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