Skip to content

Commit

Permalink
Reduce baseline
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Apr 1, 2022
1 parent 7563727 commit 391d6da
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 47 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"nextcloud/coding-standard": "^0.4.0",
"christophwurst/nextcloud": "dev-master@dev",
"psalm/phar": "^4.22",
"bantu/ini-get-wrapper": "v1.0.1",
"phpunit/phpunit": "^9.5"
},
"scripts": {
Expand Down
81 changes: 57 additions & 24 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions lib/OperatingSystems/FreeBSD.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
use OCA\ServerInfo\Resources\Disk;
use OCA\ServerInfo\Resources\Memory;

/**
* Class FreeBSD
*
* @package OCA\ServerInfo\OperatingSystems
*/
class FreeBSD implements IOperatingSystem {

public function supported(): bool {
Expand Down Expand Up @@ -81,7 +76,7 @@ public function getCpuName(): string {
$model = $this->executeCommand('/sbin/sysctl -n hw.model');
$cores = $this->executeCommand('/sbin/sysctl -n kern.smp.cpus');

if ($cores === 1) {
if ((int)$cores === 1) {
$data = $model . ' (1 core)';
} else {
$data = $model . ' (' . $cores . ' cores)';
Expand Down
18 changes: 1 addition & 17 deletions tests/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,6 @@
<code>$matches['Used'][$i]</code>
<code>$matches['Used'][0]</code>
</InvalidOperand>
<TypeDoesNotContainType occurrences="2">
<code>$cores === 1</code>
<code>$cores === 1</code>
</TypeDoesNotContainType>
</file>
<file src="lib/PhpStatistics.php">
<UndefinedClass occurrences="5">
<code>$this-&gt;phpIni</code>
<code>$this-&gt;phpIni</code>
<code>$this-&gt;phpIni</code>
<code>IniGetWrapper</code>
<code>IniGetWrapper</code>
</UndefinedClass>
</file>
<file src="lib/SystemStatistics.php">
<RedundantCondition occurrences="1">
Expand All @@ -49,11 +36,8 @@
<TypeDoesNotContainType occurrences="1">
<code>$loadavg === false</code>
</TypeDoesNotContainType>
<UndefinedClass occurrences="6">
<UndefinedClass occurrences="3">
<code>$this-&gt;installer</code>
<code>$this-&gt;phpIni</code>
<code>IniGetWrapper</code>
<code>IniGetWrapper</code>
<code>Installer</code>
<code>Installer</code>
</UndefinedClass>
Expand Down

0 comments on commit 391d6da

Please sign in to comment.