8000 [2.3] Static Code Analysis for Components by kalessil · Pull Request #17282 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[2.3] Static Code Analysis for Components #17282

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

Closed
wants to merge 2 commits into from
Closed

[2.3] Static Code Analysis for Components #17282

wants to merge 2 commits into from

Conversation

kalessil
Copy link
Contributor
@kalessil kalessil commented Jan 6, 2016
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Static Code Analysis with Php Inspections (EA Extended):
- several code constructs simplification
- decoupling statements from foreach
- extra colons/parenthesis removal (code style)
- correct string functions usage (micro-optimization)
- variable functions usage (php 5 compatible)

@OskarStark
Copy link
Contributor

not sure if we should replace strtr() with str_replace()

foreach ($imports as $import) {
$this->setCurrentDir(dirname($file));
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not totally sure but i think this can change the behavior because import can change currentDir so we need to reset it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, will revert parts with ->setCurrentDir(...)

@kalessil
Copy link
Contributor Author
kalessil commented Jan 6, 2016

@OskarStark : that wasn't a global replacement, only cases when strtr() is used as str_replace(). And str_replace() is more speaking name.

@nicolas-grekas
Copy link
Member

👍
Status: reviewed

@xabbuh
Copy link
Member
xabbuh commented Jan 12, 2016

👍

@kalessil
Copy link
Contributor Author

\0/, now I can start checking 2.7 =)

@fabpot
Copy link
Member
fabpot commented Jan 12, 2016

Thank you @kalessil.

@fabpot fabpot closed this Jan 12, 2016
fabpot added a commit that referenced this pull request Jan 12, 2016
This PR was squashed before being merged into the 2.3 branch (closes #17282).

Discussion
----------

[2.3] Static Code Analysis for Components

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Static Code Analysis with Php Inspections (EA Extended):
    - several code constructs simplification
    - decoupling statements from foreach
    - extra colons/parenthesis removal (code style)
    - correct string functions usage (micro-optimization)
    - variable functions usage (php 5 compatible)

Commits
-------

81f8181 [2.3] Static Code Analysis for Components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0