Skip to content

Commit

Permalink
[Stopwatch] Remove redundant information in docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jschaedl committed Jul 5, 2019
1 parent 2a62dbb commit 725bad3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
15 changes: 0 additions & 15 deletions src/Symfony/Component/Stopwatch/Section.php
Expand Up @@ -56,8 +56,6 @@ public function __construct(float $origin = null, bool $morePrecision = false)
/**
* Returns the child section.
*
* @param string $id The child section identifier
*
* @return self|null The child section or null when none found
*/
public function get(?string $id)
Expand Down Expand Up @@ -96,8 +94,6 @@ public function getId()
/**
* Sets the session identifier.
*
* @param string $id The session identifier
*
* @return $this
*/
public function setId(string $id)
Expand All @@ -110,9 +106,6 @@ public function setId(string $id)
/**
* Starts an event.
*
* @param string $name The event name
* @param string $category The event category
*
* @return StopwatchEvent The event
*/
public function startEvent(string $name, ?string $category)
Expand All @@ -127,8 +120,6 @@ public function startEvent(string $name, ?string $category)
/**
* Checks if the event was started.
*
* @param string $name The event name
*
* @return bool
*/
public function isEventStarted(string $name)
Expand All @@ -139,8 +130,6 @@ public function isEventStarted(string $name)
/**
* Stops an event.
*
* @param string $name The event name
*
* @return StopwatchEvent The event
*
* @throws \LogicException When the event has not been started
Expand All @@ -157,8 +146,6 @@ public function stopEvent(string $name)
/**
* Stops then restarts an event.
*
* @param string $name The event name
*
* @return StopwatchEvent The event
*
* @throws \LogicException When the event has not been started
Expand All @@ -171,8 +158,6 @@ public function lap(string $name)
/**
* Returns a specific event by name.
*
* @param string $name The event name
*
* @return StopwatchEvent The event
*
* @throws \LogicException When the event is not known
Expand Down
17 changes: 1 addition & 16 deletions src/Symfony/Component/Stopwatch/Stopwatch.php
Expand Up @@ -79,11 +79,9 @@ public function openSection(string $id = null)
*
* @see getSectionEvents()
*
* @param string $id The identifier of the section
*
* @throws \LogicException When there's no started section to be stopped
*/
public function stopSection(string $id)
public function stopSection(?string $id)
{
$this->stop('__section__');

Expand All @@ -98,9 +96,6 @@ public function stopSection(string $id)
/**
* Starts an event.
*
* @param string $name The event name
* @param string|null $category The event category
*
* @return StopwatchEvent
*/
public function start(string $name, string $category = null)
Expand All @@ -111,8 +106,6 @@ public function start(string $name, string $category = null)
/**
* Checks if the event was started.
*
* @param string $name The event name
*
* @return bool
*/
public function isStarted(string $name)
Expand All @@ -123,8 +116,6 @@ public function isStarted(string $name)
/**
* Stops an event.
*
* @param string $name The event name
*
* @return StopwatchEvent
*/
public function stop(string $name)
Expand All @@ -135,8 +126,6 @@ public function stop(string $name)
/**
* Stops then restarts an event.
*
* @param string $name The event name
*
* @return StopwatchEvent
*/
public function lap(string $name)
Expand All @@ -147,8 +136,6 @@ public function lap(string $name)
/**
* Returns a specific event by name.
*
* @param string $name The event name
*
* @return StopwatchEvent
*/
public function getEvent(string $name)
Expand All @@ -159,8 +146,6 @@ public function getEvent(string $name)
/**
* Gets all events for a given section.
*
* @param string $id A section identifier
*
* @return StopwatchEvent[]
*/
public function getSectionEvents(string $id)
Expand Down

0 comments on commit 725bad3

Please sign in to comment.