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
2 changes: 1 addition & 1 deletion .horde.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ keywords:
vendor: horde
quality:
phpstan:
level: 5
level: 3
Binary file modified ci-tools/horde-components.phar
Binary file not shown.
3 changes: 2 additions & 1 deletion src/Author.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
namespace Horde\Victim;

use Stringable;
use InvalidArgumentException;

class Author implements Stringable
{
public function __construct(public readonly string $name, public string $email = '', public string $homepage = '', public string $role = '')
{
if (empty($name)) {
throw new \InvalidArgumentException('Name cannot be empty');
throw new InvalidArgumentException('Name cannot be empty');
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/ComposerRootProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ComposerRootProject implements Stringable
{
public readonly DirectoryIterator $projectRoot;
public function __construct(
string|stringable|DirectoryIterator $projectRoot
string|Stringable|DirectoryIterator $projectRoot
) {
$this->projectRoot = new DirectoryIterator($projectRoot);
}
Expand Down
3 changes: 2 additions & 1 deletion src/InvalidComposerJsonFileException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
namespace Horde\Victim;

use RuntimeException;
use Throwable;

class InvalidComposerJsonFileException extends RuntimeException
{
public function __construct(
string $message = 'Invalid composer.json file',
int $code = 0,
?\Throwable $previous = null
?Throwable $previous = null
) {
parent::__construct($message, $code, $previous);
}
Expand Down
3 changes: 2 additions & 1 deletion test/unit/AuthorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Horde\Victim\Author;
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use InvalidArgumentException;

#[CoversClass(Author::class)]
class AuthorTest extends TestCase
Expand Down Expand Up @@ -38,7 +39,7 @@ public function testConstructorWithAllParameters(): void

public function testConstructorThrowsExceptionForEmptyName(): void
{
$this->expectException(\InvalidArgumentException::class);
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Name cannot be empty');

new Author('');
Expand Down
Loading