diff --git a/Collector/DebugPluginCollector.php b/Collector/DebugPluginCollector.php index 220557b5..9693b234 100644 --- a/Collector/DebugPluginCollector.php +++ b/Collector/DebugPluginCollector.php @@ -78,11 +78,11 @@ public function addFailure(Exception $exception, $clientName, $depth) } /** - * Returns the successful request-resonse pairs. + * Returns the successful request-response pairs. * - * @return array + * @return int */ - public function getSucessfulRequests() + public function getSuccessfulRequests() { $count = 0; foreach ($this->data as $client) { @@ -99,9 +99,9 @@ public function getSucessfulRequests() } /** - * Returns the failed request-resonse pairs. + * Returns the failed request-response pairs. * - * @return array + * @return int */ public function getFailedRequests() { @@ -126,7 +126,7 @@ public function getFailedRequests() */ public function getTotalRequests() { - return $this->getSucessfulRequests() + $this->getFailedRequests(); + return $this->getSuccessfulRequests() + $this->getFailedRequests(); } /** diff --git a/Collector/RequestStackProvider.php b/Collector/RequestStackProvider.php index c5a52e5d..ef280658 100644 --- a/Collector/RequestStackProvider.php +++ b/Collector/RequestStackProvider.php @@ -74,13 +74,13 @@ public static function createFromCollectedData(array $data) */ private static function createOne($messages) { - $orderedFaulure = []; + $orderedFailure = []; $orderedRequests = []; $orderedResponses = []; foreach ($messages['failure'] as $depth => $failures) { foreach ($failures as $idx => $failure) { - $orderedFaulure[$idx][$depth] = $failure; + $orderedFailure[$idx][$depth] = $failure; } } @@ -96,7 +96,7 @@ private static function createOne($messages) } } - return new self($orderedFaulure, $orderedRequests, $orderedResponses); + return new self($orderedFailure, $orderedRequests, $orderedResponses); } /** @@ -114,7 +114,7 @@ public function getStackIndexKeys() * * @return array */ - public function getRequstStack($idx) + public function getRequestStack($idx) { return $this->requests[$idx]; } diff --git a/DependencyInjection/HttplugExtension.php b/DependencyInjection/HttplugExtension.php index e5035c3b..baeff099 100644 --- a/DependencyInjection/HttplugExtension.php +++ b/DependencyInjection/HttplugExtension.php @@ -89,7 +89,7 @@ private function configureClients(ContainerBuilder $container, array $config) foreach ($config['clients'] as $name => $arguments) { if ($first === null) { - // Save the name of the first configurated client. + // Save the name of the first configured client. $first = $name; } @@ -304,7 +304,6 @@ function ($id) { ->addArgument($pluginClientOptions) ; - /* * Decorate the client with clients from client-common */ diff --git a/Resources/public/script/httplug.js b/Resources/public/script/httplug.js index fbd84e8f..4740a29f 100644 --- a/Resources/public/script/httplug.js +++ b/Resources/public/script/httplug.js @@ -111,7 +111,7 @@ var httplug_isHidden = function (el) { } /** - * Toggle visibility on elemets + * Toggle visibility on elements * @param els * @param display defaults to "block" */ diff --git a/Tests/Unit/DependencyInjection/HttplugExtensionTest.php b/Tests/Unit/DependencyInjection/HttplugExtensionTest.php index 598a8e07..d9704bd1 100644 --- a/Tests/Unit/DependencyInjection/HttplugExtensionTest.php +++ b/Tests/Unit/DependencyInjection/HttplugExtensionTest.php @@ -195,7 +195,7 @@ public function testProfilingWhenToolbarIsSpecificallyOn() $this->assertTrue(isset($arguments[3])); $this->assertTrue(isset($arguments[3]['debug_plugins'])); - $this->assertFalse(empty($arguments[3]['debug_plugins'])); + $this->assertNotEmpty($arguments[3]['debug_plugins']); } private function verifyProfilingDisabled()