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 3be0445

Browse filesBrowse files
committed
minor #29681 [Stopwatch] Fixed phpdoc for category name (samnela)
This PR was merged into the 3.4 branch. Discussion ---------- [Stopwatch] Fixed phpdoc for category name | Q | A | ------------- | --- | Branch? | 3.4 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | n/a <!-- required for new features --> <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Commits ------- 7f46dfb [Stopwatch] Fixed phpdoc for category name
2 parents 44e9a91 + 7f46dfb commit 3be0445
Copy full SHA for 3be0445

File tree

Expand file treeCollapse file tree

2 files changed

+10
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-2
lines changed

‎src/Symfony/Component/Stopwatch/Stopwatch.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Stopwatch/Stopwatch.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ public function stopSection($id)
9696
/**
9797
* Starts an event.
9898
*
99-
* @param string $name The event name
100-
* @param string $category The event category
99+
* @param string $name The event name
100+
* @param string|null $category The event category
101101
*
102102
* @return StopwatchEvent
103103
*/

‎src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ public function testStart()
3535
$this->assertSame($event, $stopwatch->getEvent('foo'));
3636
}
3737

38+
public function testStartWithoutCategory()
39+
{
40+
$stopwatch = new Stopwatch();
41+
$stopwatchEvent = $stopwatch->start('bar');
42+
$this->assertSame('default', $stopwatchEvent->getCategory());
43+
$this->assertSame($stopwatchEvent, $stopwatch->getEvent('bar'));
44+
}
45+
3846
public function testIsStarted()
3947
{
4048
$stopwatch = new Stopwatch();

0 commit comments

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