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

@@ -119,7 +119,7 @@ class TimelineActivityProvider implements TimelineProviderInterface
*/
private function checkContext(string $context)
{
if (false === in_array($context, self::SUPPORTED_CONTEXTS)) {
if (false === in_array($context, self::SUPPORTED_CONTEXTS, true)) {
throw new LogicException(
sprintf(
"The context '%s' is not supported. Currently only 'person' is supported",
@@ -160,7 +160,7 @@ class TimelineActivityProvider implements TimelineProviderInterface
// loop on reachable scopes
foreach ($reachableScopes as $scope) {
if (in_array($scope->getId(), $scopes_ids)) {
if (in_array($scope->getId(), $scopes_ids, true)) {
continue;
}
$scopes_ids[] = '?';