Skip to content
Open
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 .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
composer-options: "--prefer-dist --no-audit"

- name: Install StructArmed
run: composer require --dev boundwize/structarmed:^0.14.0 --no-interaction --prefer-dist --no-audit
run: composer require --dev boundwize/structarmed:^0.15.0 --no-interaction --prefer-dist --no-audit

# Execution
- name: Run StructArmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Router\Annotation\Route;

class HomeController
final class HomeController
{
#[Route(route: '/', name: 'index', methods: 'GET')]
public function index(): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Router\Annotation\Route;

class NamelessRoutesController
final class NamelessRoutesController
{
#[Route('/nameless', methods: 'GET')]
public function index(): string
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/tests/Stub/TestAuthProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Spiral\Auth\ActorProviderInterface;
use Spiral\Auth\TokenInterface;

class TestAuthProvider implements ActorProviderInterface
final class TestAuthProvider implements ActorProviderInterface
{
public function getActor(TokenInterface $token): ?object
{
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/tests/Stub/TestAuthToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Auth\TokenInterface;

class TestAuthToken implements TokenInterface
final class TestAuthToken implements TokenInterface
{
/** @var string */
private $id;
Expand Down
2 changes: 1 addition & 1 deletion src/AuthHttp/tests/Stub/TestAuthHttpProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Spiral\Auth\ActorProviderInterface;
use Spiral\Auth\TokenInterface;

class TestAuthHttpProvider implements ActorProviderInterface
final class TestAuthHttpProvider implements ActorProviderInterface
{
public function getActor(TokenInterface $token): ?object
{
Expand Down
2 changes: 1 addition & 1 deletion src/AuthHttp/tests/Stub/TestAuthHttpStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Spiral\Auth\TokenInterface;
use Spiral\Auth\TokenStorageInterface;

class TestAuthHttpStorage implements TokenStorageInterface
final class TestAuthHttpStorage implements TokenStorageInterface
{
public function load(string $id): ?TokenInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/AuthHttp/tests/Stub/TestAuthHttpToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Auth\TokenInterface;

class TestAuthHttpToken implements TokenInterface
final class TestAuthHttpToken implements TokenInterface
{
/** @var string */
private $id;
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Stempler/tests/EnableCachePatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Config\PatchInterface;

class EnableCachePatch implements PatchInterface
final class EnableCachePatch implements PatchInterface
{
public function patch(array $config): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Config/tests/TestConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Core\InjectableConfig;

class TestConfig extends InjectableConfig
final class TestConfig extends InjectableConfig
{
public const CONFIG = 'test';
}
2 changes: 1 addition & 1 deletion src/Config/tests/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Config;

class Value
final class Value
{
public function __construct(private readonly string $value = 'value!') {}

Expand Down
2 changes: 1 addition & 1 deletion src/Console/tests/ShortException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Console;

class ShortException extends \Exception
final class ShortException extends \Exception
{
public function __toString(): string
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/tests/Internal/Destructor/FinalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PHPUnit\Framework\TestCase;
use Spiral\Core\Container;

class FinalizerTest extends TestCase
final class FinalizerTest extends TestCase
{
public function testInternalServicesDontBlockContainer(): void
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/tests/Internal/Destructor/MemoryLeaksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PHPUnit\Framework\TestCase;
use Spiral\Core\Container;

class MemoryLeaksTest extends TestCase
final class MemoryLeaksTest extends TestCase
{
public function testInternalServicesDontBlockContainer(): void
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/tests/Scope/Stub/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Psr\Container\ContainerInterface;

class Factory
final class Factory
{
public function __construct(
protected ContainerInterface $container,
Expand Down
2 changes: 1 addition & 1 deletion src/Core/tests/Stub/EngineMarkTwo.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Core\Stub;

class EngineMarkTwo extends LightEngine
final class EngineMarkTwo extends LightEngine
{
public const NAME = 'Mark Two';

Expand Down
2 changes: 1 addition & 1 deletion src/Core/tests/Stub/EngineVAZ2101.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Core\Stub;

class EngineVAZ2101 extends LightEngine implements MadeInUssrInterface
final class EngineVAZ2101 extends LightEngine implements MadeInUssrInterface
{
public const NAME = 'VAZ 2101';

Expand Down
2 changes: 1 addition & 1 deletion src/Core/tests/Stub/EngineZIL130.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Core\Stub;

class EngineZIL130 implements EngineInterface, MadeInUssrInterface
final class EngineZIL130 implements EngineInterface, MadeInUssrInterface
{
public const NAME = 'ZIL 130';

Expand Down
2 changes: 1 addition & 1 deletion src/Core/tests/Stub/EnumService.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Core\Stub;

class EnumService
final class EnumService
{
public function __construct(public EnumObject $enum) {}
}
2 changes: 1 addition & 1 deletion src/Core/tests/Stub/LightEngineDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Core\Stub;

class LightEngineDecorator
final class LightEngineDecorator
{
public function __construct(
public LightEngine $engine,
Expand Down
2 changes: 1 addition & 1 deletion src/Core/tests/Stub/NewObjectInParam.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Core\Stub;

class NewObjectInParam
final class NewObjectInParam
{
public function __construct(
private object $object = new \stdClass(),
Expand Down
2 changes: 1 addition & 1 deletion src/Hmvc/tests/DemoInterceptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Spiral\Core\CoreInterceptorInterface;
use Spiral\Core\CoreInterface;

class DemoInterceptor implements CoreInterceptorInterface
final class DemoInterceptor implements CoreInterceptorInterface
{
public function process(string $controller, string $action, array $parameters, CoreInterface $core): string
{
Expand Down
2 changes: 1 addition & 1 deletion src/Http/tests/Header2Middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;

class Header2Middleware implements MiddlewareInterface
final class Header2Middleware implements MiddlewareInterface
{
public function process(
ServerRequestInterface $request,
Expand Down
2 changes: 1 addition & 1 deletion src/Http/tests/HeaderMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;

class HeaderMiddleware implements MiddlewareInterface
final class HeaderMiddleware implements MiddlewareInterface
{
public function process(
ServerRequestInterface $request,
Expand Down
2 changes: 1 addition & 1 deletion src/Http/tests/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Http;

class Json implements \JsonSerializable
final class Json implements \JsonSerializable
{
public function __construct(private $data) {}

Expand Down
2 changes: 1 addition & 1 deletion src/Http/tests/Streamable.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Psr\Http\Message\StreamInterface;
use Spiral\Streams\StreamableInterface;

class Streamable implements StreamableInterface
final class Streamable implements StreamableInterface
{
public function __construct(private readonly StreamInterface $stream) {}

Expand Down
2 changes: 1 addition & 1 deletion src/Http/tests/TestMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;

class TestMiddleware implements MiddlewareInterface
final class TestMiddleware implements MiddlewareInterface
{
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Models/tests/AccessedEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Models\DataEntity;

class AccessedEntity extends DataEntity
final class AccessedEntity extends DataEntity
{
protected const FILLABLE = '*';
protected const ACCESSORS = [
Expand Down
2 changes: 1 addition & 1 deletion src/Models/tests/BadAccessedEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Models\DataEntity;

class BadAccessedEntity extends DataEntity
final class BadAccessedEntity extends DataEntity
{
protected const FILLABLE = '*';
protected const ACCESSORS = [
Expand Down
2 changes: 1 addition & 1 deletion src/Models/tests/ExtendedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Models;

class ExtendedModel extends TestModel
final class ExtendedModel extends TestModel
{
protected $fillable = ['name'];
protected $setters = ['name' => 'strval'];
Expand Down
2 changes: 1 addition & 1 deletion src/Models/tests/FilteredEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Models\DataEntity;

class FilteredEntity extends DataEntity
final class FilteredEntity extends DataEntity
{
protected const FILLABLE = ['id'];
protected const SETTERS = ['id' => 'intval'];
Expand Down
2 changes: 1 addition & 1 deletion src/Models/tests/GetEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Mockery\Exception\RuntimeException;
use Spiral\Models\DataEntity;

class GetEntity extends DataEntity
final class GetEntity extends DataEntity
{
protected const GETTERS = ['id' => [self::class, 'filter']];

Expand Down
2 changes: 1 addition & 1 deletion src/Models/tests/NameValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Models\ValueInterface;

class NameValue implements ValueInterface, \Stringable
final class NameValue implements ValueInterface, \Stringable
{
private $value;

Expand Down
2 changes: 1 addition & 1 deletion src/Models/tests/NullableEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Models\DataEntity;

class NullableEntity extends DataEntity
final class NullableEntity extends DataEntity
{
protected const FILLABLE = '*';
protected const SETTERS = ['id' => 'intval'];
Expand Down
2 changes: 1 addition & 1 deletion src/Models/tests/PartiallySecuredEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Models\DataEntity;

class PartiallySecuredEntity extends DataEntity
final class PartiallySecuredEntity extends DataEntity
{
protected const SECURED = ['name'];
}
2 changes: 1 addition & 1 deletion src/Models/tests/PublicEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Models\DataEntity;

class PublicEntity extends DataEntity
final class PublicEntity extends DataEntity
{
protected const FILLABLE = '*';

Expand Down
2 changes: 1 addition & 1 deletion src/Models/tests/SchemaModelB.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Models;

class SchemaModelB extends SchemaModel
final class SchemaModelB extends SchemaModel
{
protected $schema = ['nice2'];
}
2 changes: 1 addition & 1 deletion src/Models/tests/SchemaModelC.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Models\DataEntity;

class SchemaModelC extends DataEntity
final class SchemaModelC extends DataEntity
{
protected $schema = ['nice2'];
}
2 changes: 1 addition & 1 deletion src/Models/tests/SecuredEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Spiral\Models\DataEntity;

class SecuredEntity extends DataEntity
final class SecuredEntity extends DataEntity
{
protected const SECURED = '*';
}
2 changes: 1 addition & 1 deletion src/Prototype/tests/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Prototype;

class Storage
final class Storage
{
/** @var array */
protected $storage = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Prototype/tests/Traverse/ConstructorParamsVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;

class ConstructorParamsVisitor extends NodeVisitorAbstract
final class ConstructorParamsVisitor extends NodeVisitorAbstract
{
private array $params = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Prototype/tests/Traverse/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use PhpParser\Parser;
use PhpParser\ParserFactory;

class Extractor
final class Extractor
{
private readonly Parser $parser;

Expand Down
2 changes: 1 addition & 1 deletion src/Router/tests/Call.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Spiral\Tests\Router;

class Call
final class Call
{
public function __invoke(): string
{
Expand Down
2 changes: 1 addition & 1 deletion src/Router/tests/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

use Spiral\Core\AbstractCore;

class Core extends AbstractCore {}
final class Core extends AbstractCore {}
Loading
Loading