Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8b76c95

Browse filesBrowse files
committed
minor #47440 Using identical comparison for path validation (githubfromgui)
This PR was merged into the 4.4 branch. Discussion ---------- Using identical comparison for path validation | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | License | MIT As pointed out by the [Symfony Code Standard Documentation](https://symfony.com/doc/current/contributing/code/standards.html#structure), always use `identical comparison` (unless type juggling is required) (~ I do not see a case for it in here): _Always use [identical comparison](https://www.php.net/manual/en/language.operators.comparison.php) unless you need type juggling;_ Commits ------- d873a20 Using identical comparison for path validation
2 parents 4a1d46d + d873a20 commit 8b76c95
Copy full SHA for 8b76c95

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Asset/VersionStrategy/StaticVersionStrategy.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function applyVersion($path)
4646
{
4747
$versionized = sprintf($this->format, ltrim($path, '/'), $this->getVersion($path));
4848

49-
if ($path && '/' == $path[0]) {
49+
if ($path && '/' === $path[0]) {
5050
return '/'.$versionized;
5151
}
5252

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.