Skip to content

Commit 658a73e

Browse files
authored
Merge pull request #95 from BedrockStreaming/fix/cast-string
2 parents c00c1f3 + 53a23b1 commit 658a73e

11 files changed

Lines changed: 11 additions & 36 deletions

File tree

src/Client/Client.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ public function handleEvent($event, $name = null)
138138
* @param Event $event
139139
* @param string $method
140140
*
141-
* @return mixed
142-
*
143141
* @throws Exception
144142
*/
145143
private function getEventValue($event, $method)
@@ -187,7 +185,7 @@ private function replaceConfigPlaceholder($event, $eventName, $string)
187185
if ((preg_match_all('/<([^>]*)>/', $string, $matches) > 0) and ($this->propertyAccessor !== null)) {
188186
$tokens = $matches[1];
189187
foreach ($tokens as $token) {
190-
$value = $this->propertyAccessor->getValue($event, $token);
188+
$value = (string) $this->propertyAccessor->getValue($event, $token);
191189
$string = str_replace('<'.$token.'>', $value, $string);
192190
}
193191
}
@@ -198,7 +196,6 @@ private function replaceConfigPlaceholder($event, $eventName, $string)
198196
/**
199197
* Merge config tags with tags manually sent with the event
200198
*
201-
* @param mixed $event
202199
* @param array $config
203200
*
204201
* @return array of tags

src/DependencyInjection/Configuration.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
*/
1616
class Configuration implements ConfigurationInterface
1717
{
18-
/**
19-
* {@inheritDoc}
20-
*/
2118
public function getConfigTreeBuilder()
2219
{
2320
$treeBuilder = new TreeBuilder('m6_statsd');
@@ -100,8 +97,6 @@ private function addClientsSection($rootNode)
10097

10198
/**
10299
* addDefaultEventSection
103-
*
104-
* @param mixed $rootNode
105100
*/
106101
private function addDefaultEventSection($rootNode)
107102
{

src/DependencyInjection/M6WebStatsdExtension.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
*/
2020
class M6WebStatsdExtension extends Extension
2121
{
22-
/**
23-
* {@inheritDoc}
24-
*/
2522
public function load(array $configs, ContainerBuilder $container)
2623
{
2724
$configuration = new Configuration();

src/Event/ConsoleCommandEvent.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
*/
1313
class ConsoleCommandEvent extends ConsoleEvent
1414
{
15-
/**
16-
* {@inheritDoc}
17-
*/
1815
protected static function support(BaseConsoleEvent $e)
1916
{
2017
return $e instanceof BaseEvent;

src/Event/ConsoleErrorEvent.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
*/
1313
class ConsoleErrorEvent extends ConsoleEvent
1414
{
15-
/**
16-
* {@inheritDoc}
17-
*/
1815
protected static function support(BaseConsoleEvent $e)
1916
{
2017
return $e instanceof BaseEvent;

src/Event/ConsoleEvent.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ final public function __construct(BaseConsoleEvent $originalEvent, $startTime =
5454
*
5555
* @param string $name
5656
* @param array $parameters
57-
*
58-
* @return mixed
5957
*/
6058
public function __call($name, $parameters)
6159
{

src/Event/ConsoleTerminateEvent.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
*/
1313
class ConsoleTerminateEvent extends ConsoleEvent
1414
{
15-
/**
16-
* {@inheritDoc}
17-
*/
1815
protected static function support(BaseConsoleEvent $e)
1916
{
2017
return $e instanceof BaseEvent;

src/Listener/ConsoleListener.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@
1515
*/
1616
class ConsoleListener
1717
{
18-
/** @var EventDispatcherInterface */
19-
protected $eventDispatcher = null;
18+
/** @var ?EventDispatcherInterface */
19+
protected $eventDispatcher;
2020

2121
/**
2222
* Time when command started
2323
*
24-
* @var float
24+
* @var ?float
2525
*/
26-
protected $startTime = null;
26+
protected $startTime;
27+
28+
public function __construct()
29+
{
30+
$this->startTime = null;
31+
$this->eventDispatcher = null;
32+
}
2733

2834
/**
2935
* Define event dispatch

src/Statsd/MonitorableEventInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ interface MonitorableEventInterface
1111
{
1212
/**
1313
* the measured value
14-
*
15-
* @return mixed
1614
*/
1715
public function getValue();
1816

src/Statsd/StatsdEvent.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ class StatsdEvent extends GenericEvent implements MonitorableEventInterface
1313
{
1414
/**
1515
* getTiming
16-
*
17-
* @return mixed
1816
*/
1917
public function getTiming()
2018
{
@@ -23,8 +21,6 @@ public function getTiming()
2321

2422
/**
2523
* getValue
26-
*
27-
* @return mixed
2824
*/
2925
public function getValue()
3026
{

0 commit comments

Comments
 (0)