Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Updated phpcs and fixed CS violations
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Zikarsky committed Mar 9, 2015
1 parent d7e8a81 commit d6d511e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
},
"require-dev": {
"phpunit/phpunit": "~4.3",
"squizlabs/php_codesniffer": "~1.5"
"squizlabs/php_codesniffer": "~2.0"
}
}
25 changes: 12 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/Gelf/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ public function log($level, $rawMessage, array $context = array())
$message = $this->initMessage($level, $rawMessage, $context);

// add exception data if present
if (
isset($context['exception'])
if (isset($context['exception'])
&& $context['exception'] instanceof Exception
) {
$this->initExceptionData($message, $context['exception']);
Expand Down
14 changes: 10 additions & 4 deletions tests/Gelf/Test/Transport/HttpTransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,17 @@ public function testFromUrlConstructor()
$this->validateTransport($transport, 'localhost', 443, '', $sslOptions, null);
}

public function validateTransport(HttpTransport $transport, $host, $port, $path, $sslOptions = null, $authentication = null)
{
public function validateTransport(
HttpTransport $transport,
$host,
$port,
$path,
$sslOptions = null,
$authentication = null
) {
$r = new \ReflectionObject($transport);

foreach(array('host', 'port', 'path', 'sslOptions', 'authentication') as $test) {
foreach (array('host', 'port', 'path', 'sslOptions', 'authentication') as $test) {
$p = $r->getProperty($test);
$p->setAccessible(true);
$this->assertEquals(${$test}, $p->getValue($transport));
Expand Down Expand Up @@ -216,7 +222,7 @@ public function testAuthentication()
$test = $this;
$this->socketClient->expects($this->once())
->method("write")
->will($this->returnCallback(function($data) use ($test) {
->will($this->returnCallback(function ($data) use ($test) {
$test->assertContains("Authorization: Basic " . base64_encode("test:test"), $data);
}));

Expand Down

0 comments on commit d6d511e

Please sign in to comment.