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
54 changes: 0 additions & 54 deletions analyzer-baseline.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1458,60 +1458,6 @@ code = "unhandled-thrown-type"
message = 'Potentially unhandled exception `Psr\Container\NotFoundExceptionInterface` in `PhpDb\Container\AdapterInterfaceFactory::__invoke`.'
count = 1

[[issues]]
file = "src/Exception/ExceptionInterface.php"
code = "missing-api-or-internal"
message = 'Interface `PhpDb\Exception\ExceptionInterface` is missing an `@api` or `@internal` annotation.'
count = 1

[[issues]]
file = "src/Metadata/Exception/InvalidArgumentException.php"
code = "class-must-be-final"
message = 'Class `PhpDb\Metadata\Exception\InvalidArgumentException` should be declared `final`.'
count = 1

[[issues]]
file = "src/Metadata/Exception/RuntimeException.php"
code = "class-must-be-final"
message = 'Class `PhpDb\Metadata\Exception\RuntimeException` should be declared `final`.'
count = 1

[[issues]]
file = "src/Metadata/Object/ConstraintKeyObject.php"
code = "missing-constant-type"
message = "Class constant `FK_CASCADE` is missing a type hint."
count = 1

[[issues]]
file = "src/Metadata/Object/ConstraintKeyObject.php"
code = "missing-constant-type"
message = "Class constant `FK_NO_ACTION` is missing a type hint."
count = 1

[[issues]]
file = "src/Metadata/Object/ConstraintKeyObject.php"
code = "missing-constant-type"
message = "Class constant `FK_RESTRICT` is missing a type hint."
count = 1

[[issues]]
file = "src/Metadata/Object/ConstraintKeyObject.php"
code = "missing-constant-type"
message = "Class constant `FK_SET_DEFAULT` is missing a type hint."
count = 1

[[issues]]
file = "src/Metadata/Object/ConstraintKeyObject.php"
code = "missing-constant-type"
message = "Class constant `FK_SET_NULL` is missing a type hint."
count = 1

[[issues]]
file = "src/Metadata/Source/AbstractSource.php"
code = "missing-constant-type"
message = "Class constant `DEFAULT_SCHEMA` is missing a type hint."
count = 1

[[issues]]
file = "src/ResultSet/AbstractResultSet.php"
code = "incompatible-return-type"
Expand Down
18 changes: 0 additions & 18 deletions lint-baseline.toml
Original file line number Diff line number Diff line change
Expand Up @@ -228,24 +228,6 @@ code = "no-isset"
message = "Use of the `isset` construct."
count = 1

[[issues]]
file = "src/Exception/InvalidArgumentException.php"
code = "no-fully-qualified-global-class-like"
message = "Fully-qualified class-like reference detected."
count = 1

[[issues]]
file = "src/Exception/RuntimeException.php"
code = "no-fully-qualified-global-class-like"
message = "Fully-qualified class-like reference detected."
count = 1

[[issues]]
file = "src/Exception/UnexpectedValueException.php"
code = "no-fully-qualified-global-class-like"
message = "Fully-qualified class-like reference detected."
count = 1

[[issues]]
file = "src/ResultSet/AbstractResultSet.php"
code = "cyclomatic-complexity"
Expand Down
6 changes: 5 additions & 1 deletion src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@

use Throwable;

/** Marker for every exception this package throws. */
/**
* Marker for every exception this package throws.
*
* @api
*/
interface ExceptionInterface extends Throwable {}
4 changes: 3 additions & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace PhpDb\Exception;

class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface {}
use InvalidArgumentException as BaseInvalidArgumentException;

class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface {}
4 changes: 3 additions & 1 deletion src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace PhpDb\Exception;

class RuntimeException extends \RuntimeException implements ExceptionInterface {}
use RuntimeException as BaseRuntimeException;

class RuntimeException extends BaseRuntimeException implements ExceptionInterface {}
4 changes: 3 additions & 1 deletion src/Exception/UnexpectedValueException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

namespace PhpDb\Exception;

class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface {}
use UnexpectedValueException as BaseUnexpectedValueException;

class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface {}
2 changes: 1 addition & 1 deletion src/Metadata/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

use PhpDb\Exception;

class InvalidArgumentException extends Exception\InvalidArgumentException {}
final class InvalidArgumentException extends Exception\InvalidArgumentException {}
2 changes: 1 addition & 1 deletion src/Metadata/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use function sprintf;

class RuntimeException extends Exception\RuntimeException
final class RuntimeException extends Exception\RuntimeException
{
final public const string UNKNOWN_COLUMN = 'A column by that name was not found.';

Expand Down
10 changes: 5 additions & 5 deletions src/Metadata/Object/ConstraintKeyObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

final class ConstraintKeyObject
{
final public const FK_CASCADE = 'CASCADE';
final public const string FK_CASCADE = 'CASCADE';

final public const FK_SET_NULL = 'SET NULL';
final public const string FK_SET_NULL = 'SET NULL';

final public const FK_NO_ACTION = 'NO ACTION';
final public const string FK_NO_ACTION = 'NO ACTION';

final public const FK_RESTRICT = 'RESTRICT';
final public const string FK_RESTRICT = 'RESTRICT';

final public const FK_SET_DEFAULT = 'SET DEFAULT';
final public const string FK_SET_DEFAULT = 'SET DEFAULT';

private ?int $ordinalPosition = null;

Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/Source/AbstractSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
*/
abstract class AbstractSource implements MetadataInterface
{
public const DEFAULT_SCHEMA = '__DEFAULT_SCHEMA__';
public const string DEFAULT_SCHEMA = '__DEFAULT_SCHEMA__';

protected string $defaultSchema;

Expand Down
Loading