Skip to content

Commit 5a83f03

Browse files
committed
BadMethodCallException (style fix)
1 parent 19cf949 commit 5a83f03

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

src/Domain/Common/IspRestrictionsProvider.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ private function readConfigFile(): ?string
3737
$contents = file_get_contents($this->confPath);
3838
if ($contents === false) {
3939
$this->logger->warning('Cannot read ISP restrictions file', ['path' => $this->confPath]);
40+
4041
return null;
4142
}
43+
4244
return $contents;
4345
}
4446

@@ -106,20 +108,24 @@ private function applyKeyValue(
106108
if ($val !== '' && ctype_digit($val)) {
107109
$maxBatch = (int) $val;
108110
}
111+
109112
return [$maxBatch, $minBatchPeriod, $lockFile];
110113
}
111114
if ($key === 'minbatchperiod') {
112115
if ($val !== '' && ctype_digit($val)) {
113116
$minBatchPeriod = (int) $val;
114117
}
118+
115119
return [$maxBatch, $minBatchPeriod, $lockFile];
116120
}
117121
if ($key === 'lockfile') {
118122
if ($val !== '') {
119123
$lockFile = $val;
120124
}
125+
121126
return [$maxBatch, $minBatchPeriod, $lockFile];
122127
}
128+
123129
return [$maxBatch, $minBatchPeriod, $lockFile];
124130
}
125131

src/Domain/Common/Repository/CursorPaginationTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace PhpList\Core\Domain\Common\Repository;
66

7+
use BadMethodCallException;
78
use PhpList\Core\Domain\Common\Model\Filter\FilterRequestInterface;
89
use PhpList\Core\Domain\Common\Model\Interfaces\DomainModel;
910
use RuntimeException;
@@ -38,6 +39,6 @@ public function getFilteredAfterId(int $lastId, int $limit, ?FilterRequestInterf
3839
return $this->getAfterId($lastId, $limit);
3940
}
4041

41-
throw new RuntimeException('Filter method not implemented');
42+
throw new BadMethodCallException('getFilteredAfterId method not implemented');
4243
}
4344
}

src/Domain/Common/SystemInfoCollector.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ class SystemInfoCollector
1616
/**
1717
* @param string[] $configuredKeys keys to include (empty => use defaults)
1818
*/
19-
public function __construct(
20-
RequestStack $requestStack,
21-
array $configuredKeys = []
22-
) {
19+
public function __construct(RequestStack $requestStack, array $configuredKeys = [])
20+
{
2321
$this->requestStack = $requestStack;
2422
$this->configuredKeys = $configuredKeys;
2523
}
@@ -72,6 +70,7 @@ public function collectAsString(): string
7270
foreach ($pairs as $k => $v) {
7371
$lines[] = sprintf('%s = %s', $k, $v);
7472
}
73+
7574
return "\n" . implode("\n", $lines);
7675
}
7776
}

src/Domain/Configuration/Service/Manager/EventLogManager.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function get(
4444
?DateTimeInterface $dateTo = null
4545
): array {
4646
$filter = new EventLogFilter($page, $dateFrom, $dateTo);
47+
4748
return $this->repository->getFilteredAfterId($lastId, $limit, $filter);
4849
}
4950

0 commit comments

Comments
 (0)