cs: Switch to a stricter way of coding - this might break in a lot of places.

This commit is contained in:
Pol Dellaiera
2021-11-30 13:33:18 +01:00
parent 28d2c42454
commit 47c5855a21
957 changed files with 9025 additions and 568 deletions

View File

@@ -123,7 +123,8 @@ class TimelineReportProvider implements TimelineProviderInterface
foreach ($entity->getCFGroup()->getCustomFields() as $customField) {
if (in_array(
$customField->getSlug(),
$entity->getCFGroup()->getOptions()['summary_fields']
$entity->getCFGroup()->getOptions()['summary_fields'],
true
)) {
// if we do not want to show empty values
if (false === $this->showEmptyValues) {
@@ -239,7 +240,7 @@ break;
$askedCenters = $args['centers'];
foreach ($reachableCenters as $center) {
if (false === in_array($center, $askedCenters)) {
if (false === in_array($center, $askedCenters, true)) {
continue;
}
@@ -249,7 +250,7 @@ break;
$scopeIds = [];
foreach ($this->helper->getReachableScopes($this->security->getUser(), $role, $center) as $scope) {
if (in_array($scope->getId(), $scopeIds)) {
if (in_array($scope->getId(), $scopeIds, true)) {
continue;
}
$scopeIds[] = $scope->getId();
@@ -297,7 +298,7 @@ break;
$scopes = $this->helper->getReachableScopes($this->security->getUser(), $role, $args['person']->getCenter());
foreach ($scopes as $scope) {
if (in_array($scope->getId(), $parameters)) {
if (in_array($scope->getId(), $parameters, true)) {
continue;
}