Skip to content

Commit 458fc4f

Browse files
committed
style fix
1 parent 0dfba51 commit 458fc4f

File tree

6 files changed

+16
-24
lines changed

6 files changed

+16
-24
lines changed

Collector/ClientDataCollector.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class ClientDataCollector
3131
private $responses;
3232

3333
/**
34-
*
3534
* @param array $requests
3635
* @param array $responses
3736
*/
@@ -60,11 +59,11 @@ public static function createFromCollectedData(array $data)
6059

6160
/**
6261
* @param array $messages is an array with keys 'request' and 'response' which hold requests for each call to
63-
* sendRequest and for each depth.
62+
* sendRequest and for each depth.
6463
*
6564
* @return ClientDataCollector
6665
*/
67-
private static function createOne($messages)
66+
private static function createOne($messages)
6867
{
6968
$orderedRequests = [];
7069
$orderedResponses = [];
@@ -73,13 +72,13 @@ private static function createOne($messages)
7372
foreach ($requests as $idx => $request) {
7473
$orderedRequests[$idx][$depth] = $request;
7574
}
76-
}
75+
}
7776

7877
foreach ($messages['response'] as $depth => $responses) {
7978
foreach ($responses as $idx => $response) {
8079
$orderedResponses[$idx][$depth] = $response;
8180
}
82-
}
81+
}
8382

8483
return new self($orderedRequests, $orderedResponses);
8584
}
@@ -153,4 +152,4 @@ public function getResponseStack($idx)
153152
{
154153
return $this->responses[$idx];
155154
}
156-
}
155+
}

Collector/DebugPlugin.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ class DebugPlugin implements Plugin
3030
private $depth = -1;
3131

3232
/**
33-
*
3433
* @param DebugPluginCollector $collector
35-
* @param string $clientName
34+
* @param string $clientName
3635
*/
3736
public function __construct(DebugPluginCollector $collector, $clientName)
3837
{

Collector/DebugPluginCollector.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Http\Client\Exception;
66
use Http\Message\Formatter;
7-
use Http\Message\Formatter\SimpleFormatter;
87
use Psr\Http\Message\RequestInterface;
98
use Psr\Http\Message\ResponseInterface;
109
use Symfony\Component\HttpFoundation\Request;
@@ -68,7 +67,6 @@ public function addFailure(Exception $exception, $clientName, $depth)
6867
$this->data[$clientName]['failure'][$depth][] = true;
6968
}
7069

71-
7270
/**
7371
* Returns the successful request-resonse pairs.
7472
*
@@ -114,7 +112,6 @@ public function getTotalRequests()
114112
}
115113

116114
/**
117-
*
118115
* @return ClientDataCollector[]
119116
*/
120117
public function getClients()

Collector/PluginJournal.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getPluginName($clientName, $idx)
3636

3737
/**
3838
* @param string $clientName
39-
* @param array $plugins
39+
* @param array $plugins
4040
*
4141
* @return $this
4242
*/
@@ -46,5 +46,4 @@ public function setPlugins($clientName, array $plugins)
4646

4747
return $this;
4848
}
49-
50-
}
49+
}

Collector/Twig/HttpMessageMarkupExtension.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
namespace Http\HttplugBundle\Collector\Twig;
44

55
/**
6-
*
7-
*
86
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
97
*/
108
class HttpMessageMarkupExtension extends \Twig_Extension
@@ -16,9 +14,9 @@ class HttpMessageMarkupExtension extends \Twig_Extension
1614
*/
1715
public function getFilters()
1816
{
19-
return array(
17+
return [
2018
new \Twig_SimpleFilter('httplug_markup', [$this, 'markup'], ['is_safe' => ['html']]),
21-
);
19+
];
2220
}
2321

2422
/**
@@ -31,12 +29,12 @@ public function markup($message)
3129

3230
// make header names bold
3331
$headers = preg_replace("|\n(.*?): |si", "\n<b>$1</b>: ", $headers);
34-
32+
3533
return sprintf("%s\n\n<div class='httplug-http-body'>%s</div>", $headers, $body);
3634
}
3735

3836
public function getName()
3937
{
4038
return 'httplug.message_markup';
4139
}
42-
}
40+
}

DependencyInjection/HttplugExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function configureClients(ContainerBuilder $container, array $config)
9191
$container->register('httplug.client', PluginClient::class)
9292
->addArgument(new Reference('httplug.client.default'))
9393
->addArgument([new Reference('httplug.collector.history_plugin')])
94-
->addArgument(['debug_plugins'=>[new Reference($serviceIdDebugPlugin)]]);
94+
->addArgument(['debug_plugins' => [new Reference($serviceIdDebugPlugin)]]);
9595
}
9696
}
9797

@@ -225,7 +225,7 @@ function ($id) {
225225
)
226226
->addArgument(new Reference($arguments['factory']))
227227
->addArgument($arguments['config'])
228-
->addArgument(['debug_plugins'=>[new Reference($serviceIdDebugPlugin)]]);
228+
->addArgument(['debug_plugins' => [new Reference($serviceIdDebugPlugin)]]);
229229

230230
// tell the plugin journal what plugins we used
231231
$container->getDefinition('httplug.collector.plugin_journal')
@@ -253,10 +253,10 @@ function ($id) {
253253
}
254254

255255
/**
256-
* Create a new plugin service for this client
256+
* Create a new plugin service for this client.
257257
*
258258
* @param ContainerBuilder $container
259-
* @param string $name
259+
* @param string $name
260260
*
261261
* @return string
262262
*/

0 commit comments

Comments
 (0)