Commit cd985e6a authored by Predhumeau Manon's avatar Predhumeau Manon Committed by Guillaume Perréal
Browse files

CS.

Showing with 7 additions and 7 deletions
+7 -7
......@@ -6,9 +6,9 @@
namespace Irstea\FileUploadBundle\Listener;
use Xenolope\Quahog\Client;
use Irstea\FileUploadBundle\Event\FileUploadCompleteEvent;
use Irstea\FileUploadBundle\Exception\RejectedFileException;
use Xenolope\Quahog\Client;
use Xenolope\Quahog\Exception\ConnectionException;
/**
......@@ -21,7 +21,6 @@ class VirusScannerListener
*/
private $client;
/**
* @param Client $client
*/
......@@ -30,9 +29,9 @@ class VirusScannerListener
$this->client = $client;
}
/**
* @param FileUploadCompleteEvent $event
*
* @throws ConnectionException
*/
public function onFileUploadCompleted(FileUploadCompleteEvent $event)
......@@ -61,13 +60,15 @@ class VirusScannerListener
}
/**
* @return Client
* @throws ConnectionException
*
* @return Client
*/
private function getClient(): Client
{
// Check clamd server's state
$this->client->ping();
return $this->client;
}
}
......@@ -40,7 +40,7 @@ class VirusScannerListenerTest extends PHPUnit_Framework_TestCase
protected $file;
/**
* {@inheritDoc}
* {@inheritdoc}
*/
protected function setUp()
{
......@@ -93,7 +93,7 @@ class VirusScannerListenerTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Xenolope\Quahog\Exception\ConnectionException
* @expectedException \Xenolope\Quahog\Exception\ConnectionException
*/
public function testGetClientFailed()
{
......@@ -106,5 +106,4 @@ class VirusScannerListenerTest extends PHPUnit_Framework_TestCase
$this->client->expects($this->once())->method('ping')->willReturn(true);
$this->listener->onFileUploadCompleted($this->event);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment