Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cli/sysinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<?php

use KnotsPHP\System\System;
use NunoMaduro\Collision\Provider;

error_reporting(E_ALL ^ E_DEPRECATED ^ E_NOTICE);

Expand All @@ -10,7 +11,7 @@
}

if (class_exists('\NunoMaduro\Collision\Provider')) {
(new \NunoMaduro\Collision\Provider)->register();
(new Provider)->register();
}

$ipVersion = null;
Expand Down
4 changes: 3 additions & 1 deletion examples/basic.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php

use KnotsPHP\System\Enums\OperatingSystem;

require_once __DIR__.'/../vendor/autoload.php';

// Get the command
$os = \KnotsPHP\System\Enums\OperatingSystem::current();
$os = OperatingSystem::current();

echo $os->friendlyName().PHP_EOL;

Expand Down
12 changes: 8 additions & 4 deletions tests/Unit/ArchTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

use KnotsPHP\System\Exceptions\Exception;
use KnotsPHP\System\Exceptions\InvalidArgumentException;
use KnotsPHP\System\Exceptions\RuntimeException;

arch('enums')
->expect('KnotsPHP\System\Enums')
->toBeEnums();
Expand All @@ -14,10 +18,10 @@

arch('exceptions')
->expect('KnotsPHP\System\Exceptions')
->toExtend(\KnotsPHP\System\Exceptions\Exception::class)
->ignoring(\KnotsPHP\System\Exceptions\Exception::class)
->ignoring(\KnotsPHP\System\Exceptions\InvalidArgumentException::class)
->ignoring(\KnotsPHP\System\Exceptions\RuntimeException::class);
->toExtend(Exception::class)
->ignoring(Exception::class)
->ignoring(InvalidArgumentException::class)
->ignoring(RuntimeException::class);

arch('library.operating-system')
->expect('KnotsPHP\System\OperatingSystems')
Expand Down
Loading