Skip to content

Commit 22192c2

Browse files
committed
run psalm only against master as the app is shipped
Signed-off-by: Robin Appelman <[email protected]>
1 parent d30339d commit 22192c2

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

.github/workflows/psalm-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# do not stop on another job's failure
2525
fail-fast: false
2626
matrix:
27-
ocp-version: [ 'dev-master', 'dev-stable27', 'dev-stable26', 'dev-stable25']
27+
ocp-version: [ 'dev-master' ]
2828

2929
name: Nextcloud ${{ matrix.ocp-version }}
3030
steps:

lib/Listener/LogListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class LogListener implements IEventListener {
3535
private ?Console $console;
3636

3737
public function __construct(Formatter $formatter, SystemConfig $config) {
38-
if (\OC_CONSOLE) {
38+
if (defined('OC_CONSOLE') && \OC_CONSOLE) {
3939
$level = getenv('OCC_LOG');
4040
if ($level) {
4141
$terminal = new Terminal();

lib/Log/Console.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(Formatter $formatter, SystemConfig $config, string $
4242
$this->terminalWidth = $terminalWidth;
4343
}
4444

45-
public function log(int $level, string $app, $entry) {
45+
public function log(int $level, string $app, array $entry) {
4646
if ($level >= $this->level) {
4747
$messageWidth = $this->terminalWidth - 8 - 18 - 6;
4848

tests/stubs/stub.phpstub

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,18 @@ namespace OC\Core\Command {
3232
class InterruptedException extends \Exception {
3333
}
3434
}
35+
36+
namespace OC {
37+
class SystemConfig {
38+
}
39+
}
40+
41+
namespace OC\Log {
42+
use OC\SystemConfig;
43+
class LogDetails {
44+
public function __construct(SystemConfig $config) {
45+
}
46+
public function logDetails(string $app, $message, int $level): array {
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)