Code cleanup
This commit is contained in:
@@ -50,7 +50,7 @@ class ConfigurationService
|
||||
$config = [];
|
||||
foreach (explode(';', $configArray[$itemName]['value']) as $item)
|
||||
{
|
||||
list ($value, $label) = explode(':', $item);
|
||||
[ $value, $label ] = explode(':', $item);
|
||||
$config[$value] = $label;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ class SearchController extends ActionController
|
||||
{
|
||||
$ignoreIps = GeneralUtility::trimExplode(',', $this->settings['searchLogIgnoreIps'], true);
|
||||
$remoteIp = GeneralUtility::getIndpEnv('REMOTE_ADDR');
|
||||
if (in_array($remoteIp, $ignoreIps)) {
|
||||
if (\in_array($remoteIp, $ignoreIps, false)) {
|
||||
return;
|
||||
}
|
||||
/** @var $logger \TYPO3\CMS\Core\Log\Logger */
|
||||
|
||||
@@ -126,7 +126,7 @@ class FilterService implements SingletonInterface
|
||||
// Nights
|
||||
$duration = (int) $row['nights'] <= 4 ? FilterSettings::DURATION_SHORT : FilterSettings::DURATION_LONG;
|
||||
|
||||
if (!in_array($duration, $nights)) {
|
||||
if (!\in_array($duration, $nights, false)) {
|
||||
$nights[] = $duration;
|
||||
}
|
||||
|
||||
|
||||
@@ -247,11 +247,11 @@ class HotelDataService implements SingletonInterface
|
||||
|
||||
$hotel['available'] += $row['available'];
|
||||
|
||||
if (!in_array($row['nights'], $hotel['nights'])) {
|
||||
if (!\in_array($row['nights'], $hotel['nights'], false)) {
|
||||
$hotel['nights'][] = $row['nights'];
|
||||
}
|
||||
|
||||
if (!in_array($row['dateStart'], $hotel['dates'])) {
|
||||
if (!\in_array($row['dateStart'], $hotel['dates'], false)) {
|
||||
$hotel['dates'][] = $row['dateStart'];
|
||||
}
|
||||
|
||||
|
||||
@@ -125,11 +125,11 @@ class ProductDataService implements SingletonInterface
|
||||
|
||||
$teaser =& $data[$row['productUid']];
|
||||
|
||||
if (!in_array($row['nights'], $teaser['nights'])) {
|
||||
if (!\in_array($row['nights'], $teaser['nights'], false)) {
|
||||
$teaser['nights'][] = $row['nights'];
|
||||
}
|
||||
|
||||
if (!in_array($row['dateStart'], $teaser['dates'])) {
|
||||
if (!\in_array($row['dateStart'], $teaser['dates'], false)) {
|
||||
$teaser['dates'][] = $row['dateStart'];
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ class ProductDataService implements SingletonInterface
|
||||
}
|
||||
|
||||
if ($limit > 0) {
|
||||
return array_slice($data, 0, $limit);
|
||||
return \array_slice($data, 0, $limit);
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
@@ -156,11 +156,11 @@ class SearchResultService implements SingletonInterface
|
||||
|
||||
$item =& $items[$key];
|
||||
|
||||
if (!in_array($row['nights'], $item['nights'])) {
|
||||
if (!\in_array($row['nights'], $item['nights'], false)) {
|
||||
$item['nights'][] = $row['nights'];
|
||||
}
|
||||
|
||||
if (!in_array($row['dateStart'], $item['dates'])) {
|
||||
if (!\in_array($row['dateStart'], $item['dates'], false)) {
|
||||
$item['dates'][] = $row['dateStart'];
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ trait RequestArgumentTypeConversionTrait
|
||||
$filterSettings['dateTo'] = !empty($filterSettings['dateTo']) ? new \DateTime($filterSettings['dateTo']) : null;
|
||||
|
||||
if (!empty($filterSettings['bus'])) {
|
||||
$filterSettings['bus'] = in_array($filterSettings['bus'], [ 'true', '1' ], true);
|
||||
$filterSettings['bus'] = \in_array($filterSettings['bus'], [ 'true', '1' ], true);
|
||||
} else {
|
||||
$filterSettings['bus'] = null;
|
||||
}
|
||||
|
||||
@@ -40,11 +40,12 @@ class AjaxFormController extends ActionController
|
||||
protected $emailService;
|
||||
|
||||
/**
|
||||
* @param EmailService $service
|
||||
* @param EmailService $emailService
|
||||
*/
|
||||
public function injectEmailService(EmailService $service)
|
||||
public function __construct(EmailService $emailService)
|
||||
{
|
||||
$this->emailService = $service;
|
||||
parent::__construct();
|
||||
$this->emailService = $emailService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,7 +74,7 @@ class AjaxFormController extends ActionController
|
||||
if ($this->arguments->getValidationResults()->hasErrors()) {
|
||||
foreach ($this->arguments->getValidationResults()->getFlattenedErrors() as $key => $errors)
|
||||
{
|
||||
list($formName, $fieldName) = explode('.', $key);
|
||||
[ $formName, $fieldName ] = explode('.', $key);
|
||||
$errorsRaw = [];
|
||||
foreach ($errors as $error)
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ class ContainerViewHelper extends AbstractViewHelper
|
||||
}
|
||||
|
||||
$classes = [];
|
||||
if (in_array($arguments['data']['colPos'], static::$columnsWithoutContainers, false)) {
|
||||
if (\in_array($arguments['data']['colPos'], static::$columnsWithoutContainers, false)) {
|
||||
$classes[] = 'container';
|
||||
} else {
|
||||
$classes[] = 'in-column';
|
||||
|
||||
Reference in New Issue
Block a user