Code cleanup

This commit is contained in:
Björn Fromme
2019-10-01 20:54:35 +02:00
parent f193fa9419
commit 5c5b722972
3 changed files with 60 additions and 39 deletions
@@ -1,7 +1,31 @@
<?php
namespace EP\EpTheme\Service;
/***************************************************************
*
* Copyright notice
*
* (c) 2019 Björn Fromme <[email protected]>, dreipunktnull
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
use Symfony\Component\HttpClient\HttpClient;
@@ -45,7 +69,6 @@ class BookingApiService implements SingletonInterface, LoggerAwareInterface
/**
* @param array $addressData
* @throws TransportExceptionInterface
*/
public function registerAddress(array $addressData)
{
@@ -61,8 +84,7 @@ class BookingApiService implements SingletonInterface, LoggerAwareInterface
'body' => json_encode($addressData),
]);
}
catch (\Exception $e)
{
catch (TransportExceptionInterface $e) {
$this->logger->error($e->getMessage());
}
}