Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Range types #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

janklan
Copy link
Contributor

@janklan janklan commented May 7, 2025

This PR complements #263 that added support for range functions. It adds the support for simple mapping of range types in Doctrine entities.

Summary by CodeRabbit

  • New Features

    • Added support for PostgreSQL numeric range (NUMRANGE) types, enabling conversion between database range strings and PHP objects.
    • Introduced a numeric range object with methods for parsing, string formatting, and containment checks.
    • Provided utility functions for numeric range calculations and string-to-number conversions.
  • Tests

    • Added comprehensive unit tests for numeric range utility functions, covering range containment and string-to-number conversion scenarios.

@janklan
Copy link
Contributor Author

janklan commented May 7, 2025

@martin-georgiev I've been mapping various range types to my entities for ages and so I thought you might be interested in having the funcitonality in this package. I would be interested in that too, beacuse this PR, together with the others I have recently filed, would allow me to reduce the number of dependencies by consolidating various 3rd party and custom Doctrine extensions into your package.

Obviously I also think others might benefit, and it's time for me to give back to the community.

I've only added the NumRange type as a PoC for you to have a look and tell me WDYT. I didn't want to waste time should you ultimately reject the idea of hosting these things here.

I'm looking forward to your response. Also I tried to reach out via DM on Symfony's slack. It might be a faster thing to talk if you're interested.

Copy link

coderabbitai bot commented May 7, 2025

Walkthrough

This update introduces a set of new classes and interfaces to support numeric range handling in PHP, especially for PostgreSQL's NUMRANGE type. It includes a Doctrine DBAL type for numrange, generic and arithmetic range models, utility methods for numeric operations, and comprehensive unit tests for the utility functions.

Changes

File(s) Change Summary
src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php Added a Doctrine DBAL type class NumRange for PostgreSQL NUMRANGE, implementing conversion between database strings and PHP ArithmeticRange objects with validation and error handling.
src/MartinGeorgiev/Model/ArithmeticRange.php Introduced the ArithmeticRange class, a generic range model for numeric types, supporting parsing from string, containment checks, and string formatting.
src/MartinGeorgiev/Model/BaseRange.php Added the abstract BaseRange class implementing RangeInterface, providing methods to inspect range boundaries (infinite, empty, single/both boundaries).
src/MartinGeorgiev/Model/RangeInterface.php Introduced the RangeInterface interface, defining required methods for range objects including containment and boundary checks.
src/MartinGeorgiev/Utils/MathUtils.php Added the MathUtils utility class with static methods for checking if a value is within a range (inRange) and converting strings to numbers (stringToNumber).
tests/Unit/MartinGeorgiev/Utils/MathUtilsTest.php Added PHPUnit tests for MathUtils, covering range checking and string-to-number conversion with various edge cases and input scenarios.

Sequence Diagram(s)

sequenceDiagram
    participant DB as PostgreSQL Database
    participant NumRange as NumRange Type
    participant PHP as PHP Application
    participant Range as ArithmeticRange

    DB->>NumRange: Provide NUMRANGE string
    NumRange->>NumRange: convertToPHPValue(value)
    NumRange->>Range: ArithmeticRange::createFromString(value)
    Range-->>NumRange: ArithmeticRange object
    NumRange-->>PHP: Return ArithmeticRange

    PHP->>NumRange: Provide ArithmeticRange object
    NumRange->>NumRange: convertToDatabaseValue(value)
    NumRange-->>DB: Return NUMRANGE string
Loading

Poem

In the garden of code, new ranges appear,
Numbers stretch far, both far and near.
With MathUtils to guide, and tests to defend,
Now numrange and friends on Doctrine depend.
From stringy bounds to numbers true—
🐇 This rabbit says, "Bravo! Well done, crew!"

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

🧹 Nitpick comments (10)
src/MartinGeorgiev/Model/BaseRange.php (1)

19-22: Consider inclusivity in the isEmpty implementation.

The current isEmpty() implementation doesn't account for boundary inclusivity flags. A range can be empty even if the boundaries are not identical but both are exclusive.

Consider modifying this method to take inclusivity into account, especially when subclasses like ArithmeticRange use inclusivity flags.

🧰 Tools
🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

src/MartinGeorgiev/Model/RangeInterface.php (1)

12-16: Consider narrowing the input type of the contains method.

The contains method uses mixed as the parameter type, which is very permissive, while the docblock specifies it should be of type T. Consider using a more restrictive type or adding validation.

    /**
     * @param T $target
     */
-    public function contains(mixed $target): bool;
+    public function contains(int|float|\DateTimeInterface|null $target): bool;
src/MartinGeorgiev/Utils/MathUtils.php (2)

39-39: Fix comment referencing non-existent property.

The comment refers to this->range[Start/End]Inclusive which doesn't exist in this static method context.

-        // Depending on this->range[Start/End]Inclusive, we will use (>= or >) and (<= or <) to work out where the value is
+        // Depending on $startInclusive and $endInclusive, we will use (>= or >) and (<= or <) to work out where the value is

48-55: Consider using strict comparison in stringToNumber conversion.

The method uses loose comparison (==) to determine if a float equals an integer. This could lead to unexpected behavior with values like "0.0" vs "0".

-        return ((float) $number == (int) $number) ? (int) $number : (float) $number;
+        // Use strict equality after removing decimal zeros
+        $floatVal = (float) $number;
+        $intVal = (int) $floatVal;
+        return ($floatVal - $intVal) === 0.0 ? $intVal : $floatVal;
src/MartinGeorgiev/Model/ArithmeticRange.php (1)

48-50: Enhance regex validation for range parsing.

The current regex might not handle all valid PostgreSQL range syntax variations. Consider adding more robust validation and error messages.

The PostgreSQL documentation mentions various syntax like empty, [1,), (,1] that might need special handling.

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php (2)

11-18: Add return type documentation to improve clarity

The class documentation is good, but it would be helpful to add param and return type information in the method docblocks. This improves IDE support and helps explain the expected behavior of the methods.

/**
 * Implementation of PostgreSQL NUMRANGE data type.
 *
 * @see https://www.postgresql.org/docs/current/rangetypes.html
 * @since 3.1
 *
 * @author Jan Klan <[email protected]>
 */

33-35: Enhance regex validation for numeric range pattern

The regex pattern used for validation could be more specific for numeric ranges. Consider enhancing it to better match the expected format of numeric ranges in PostgreSQL.

-        if (!\preg_match('/(\[|\()(.*)\,(.*)(\]|\))/', $value, $matches)) {
+        if (!\preg_match('/(\[|\()([0-9.eE+-]*|)\,([0-9.eE+-]*|)(\]|\))/', $value, $matches)) {
            throw new \RuntimeException(sprintf('unexpected value from DB: %s', $value));
        }
tests/Unit/MartinGeorgiev/Utils/MathUtilsTest.php (3)

46-55: Consider consolidating test cases for null values

You have a separate assertion for null values, but the test data is not being used. This approach is less clear than having explicit test cases for null. Consider restructuring to make the test cases more explicit.

-        self::assertFalse(
-            MathUtils::inRange(
-                null,
-                $start,
-                $end,
-                $startInclusive,
-                $endInclusive,
-            )
-        );

And add explicit null test cases to the data provider:

yield [
    'value' => null,
    'start' => 1,
    'end' => 3,
    'startInclusive' => true,
    'endInclusive' => true,
    'expected' => false,
];

131-134: Consider using assertSame instead of assertEquals for numeric comparisons

When comparing numeric values, assertEquals uses the == operator which might not catch type differences. For strict type checking, consider using assertSame which uses the === operator.

    public function test_string_to_number(?string $input, null|float|int $expected): void
    {
-        self::assertEquals($expected, MathUtils::stringToNumber($input));
+        self::assertSame($expected, MathUtils::stringToNumber($input));
    }

154-155: Consider adding more scientific notation test cases

You have a test case for positive scientific notation, but it would be good to also test negative scientific notation to ensure comprehensive coverage.

        yield ['2.2E+1', 22];
+        yield ['2.2E-1', 0.22];
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bb6a6b6 and e14a83c.

📒 Files selected for processing (6)
  • src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php (1 hunks)
  • src/MartinGeorgiev/Model/ArithmeticRange.php (1 hunks)
  • src/MartinGeorgiev/Model/BaseRange.php (1 hunks)
  • src/MartinGeorgiev/Model/RangeInterface.php (1 hunks)
  • src/MartinGeorgiev/Utils/MathUtils.php (1 hunks)
  • tests/Unit/MartinGeorgiev/Utils/MathUtilsTest.php (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#263
File: src/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/Numrange.php:19-21
Timestamp: 2025-03-11T12:32:10.726Z
Learning: In the postgresql-for-doctrine repository, PostgreSQL range functions have distinct implementations for different data types. The `Numrange` function works with numeric/decimal values and is tested using the `ContainsDecimals` fixture with properties typed as `float`. In contrast, the `Int4range` function works with 32-bit integers and is tested using the `ContainsIntegers` fixture with properties typed as `int`. While the PHP implementations share a similar structure (extending `BaseFunction`), they are semantically different as they handle different PostgreSQL data types.
src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php (1)
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#263
File: src/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/Numrange.php:19-21
Timestamp: 2025-03-11T12:32:10.726Z
Learning: In the postgresql-for-doctrine repository, PostgreSQL range functions have distinct implementations for different data types. The `Numrange` function works with numeric/decimal values and is tested using the `ContainsDecimals` fixture with properties typed as `float`. In contrast, the `Int4range` function works with 32-bit integers and is tested using the `ContainsIntegers` fixture with properties typed as `int`. While the PHP implementations share a similar structure (extending `BaseFunction`), they are semantically different as they handle different PostgreSQL data types.
🧬 Code Graph Analysis (2)
src/MartinGeorgiev/Model/BaseRange.php (1)
src/MartinGeorgiev/Model/RangeInterface.php (6)
  • isLowerInfinite (17-17)
  • isUpperInfinite (19-19)
  • isEmpty (21-21)
  • isInfinite (23-23)
  • hasSingleBoundary (25-25)
  • hasBothBoundaries (27-27)
src/MartinGeorgiev/Model/RangeInterface.php (2)
src/MartinGeorgiev/Model/ArithmeticRange.php (1)
  • contains (38-41)
src/MartinGeorgiev/Model/BaseRange.php (6)
  • isLowerInfinite (9-12)
  • isUpperInfinite (14-17)
  • isEmpty (19-22)
  • isInfinite (24-27)
  • hasSingleBoundary (29-32)
  • hasBothBoundaries (34-37)
🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
src/MartinGeorgiev/Model/ArithmeticRange.php

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.


[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.


[failure] 12-12:
Class MartinGeorgiev\Model\ArithmeticRange has @implements tag, but does not implement any interface.

src/MartinGeorgiev/Model/BaseRange.php

[failure] 21-21:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 16-16:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$upper.


[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.


[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

[failure] 46-46:
Cannot cast mixed to string.


[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest
  • GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2
🔇 Additional comments (4)
src/MartinGeorgiev/Model/BaseRange.php (1)

29-32: Check the logic of hasSingleBoundary.

The XOR operator usage here is correct for checking if exactly one boundary is infinite. However, the method name might be clearer as hasExactlyOneBoundary() to avoid ambiguity.

src/MartinGeorgiev/Model/RangeInterface.php (1)

7-11: Well-defined generic interface with proper type constraints.

The interface definition with a generic type parameter constrained to numeric or DateTime types is well-designed and provides good type safety.

src/MartinGeorgiev/Utils/MathUtils.php (1)

23-29: Handling of null values and edge cases is well-implemented.

The method correctly handles null values for the target and the special case where start and end are equal.

src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php (1)

19-20:

✅ Verification successful

Verify BaseType import or class existence

The class extends BaseType, but I don't see this class being imported in the use statements. If BaseType is in the same namespace, then this is fine. Otherwise, you'll need to add a proper import statement.


🏁 Script executed:

#!/bin/bash
# Look for BaseType class definition
echo "Looking for BaseType class definition..."
fd --type f -e php "class BaseType" src/
grep -r "class BaseType" --include="*.php" src/

Length of output: 272


No import needed for BaseType
Verified that BaseType is declared in the same namespace (MartinGeorgiev\Doctrine\DBAL\Types) at

  • src/MartinGeorgiev/Doctrine/DBAL/Types/BaseType.php

No import statement is required.

Comment on lines +9 to +12
public function isLowerInfinite(): bool
{
return null === $this->lower;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Define the lower and upper boundary properties or accessor methods.

The class accesses undefined properties $lower and $upper. Since this is an abstract class, you should either:

  1. Declare abstract protected properties/methods to ensure implementations provide them, or
  2. Define protected properties in the base class

Static analysis fails on all PHP and Doctrine versions for this reason.

abstract class BaseRange implements RangeInterface
{
+    /**
+     * @var T|null
+     */
+    protected $lower;
+
+    /**
+     * @var T|null
+     */
+    protected $upper;
+
+    /**
+     * @return T|null
+     */
+    protected function getLower()
+    {
+        return $this->lower;
+    }
+
+    /**
+     * @return T|null
+     */
+    protected function getUpper()
+    {
+        return $this->upper;
+    }

    public function isLowerInfinite(): bool
    {
        return null === $this->lower;
    }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public function isLowerInfinite(): bool
{
return null === $this->lower;
}
abstract class BaseRange implements RangeInterface
{
/**
* @var T|null
*/
protected $lower;
/**
* @var T|null
*/
protected $upper;
/**
* @return T|null
*/
protected function getLower()
{
return $this->lower;
}
/**
* @return T|null
*/
protected function getUpper()
{
return $this->upper;
}
public function isLowerInfinite(): bool
{
return null === $this->lower;
}
// ... rest of class ...
}
🧰 Tools
🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 11-11:
Access to an undefined property MartinGeorgiev\Model\BaseRange::$lower.

🤖 Prompt for AI Agents (early access)
In src/MartinGeorgiev/Model/BaseRange.php around lines 9 to 12, the class uses undefined properties $lower and $upper, causing static analysis errors. To fix this, declare these properties as protected in the base class or define abstract protected getter methods for them, ensuring all subclasses implement or inherit these members. This will make the properties explicitly defined and resolve the static analysis issues.


namespace MartinGeorgiev\Model;

abstract class BaseRange implements RangeInterface
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add generic type parameters to the class definition.

The class implements the generic RangeInterface but doesn't specify its type parameter, which is causing static analysis errors across all PHP versions.

-abstract class BaseRange implements RangeInterface
+/**
+ * @template T of int|float|\DateTimeInterface
+ * @implements RangeInterface<T>
+ */
+abstract class BaseRange implements RangeInterface
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
abstract class BaseRange implements RangeInterface
/**
* @template T of int|float|\DateTimeInterface
* @implements RangeInterface<T>
*/
abstract class BaseRange implements RangeInterface
🧰 Tools
🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 7-7:
Class MartinGeorgiev\Model\BaseRange implements generic interface MartinGeorgiev\Model\RangeInterface but does not specify its types: T

🤖 Prompt for AI Agents (early access)
In src/MartinGeorgiev/Model/BaseRange.php at line 7, the BaseRange class implements the generic RangeInterface but does not specify the required generic type parameter. To fix the static analysis errors, update the class definition to include the appropriate generic type parameter matching the RangeInterface's definition.

@@ -0,0 +1,38 @@
<?php

declare(strict_types=0);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix strict types declaration.

The strict_types declaration should be set to 1, not 0, to prevent type coercion and ensure consistent type checking.

-declare(strict_types=0);
+declare(strict_types=1);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
declare(strict_types=0);
-declare(strict_types=0);
+declare(strict_types=1);
🤖 Prompt for AI Agents (early access)
In src/MartinGeorgiev/Model/BaseRange.php at line 3, the strict_types declaration is incorrectly set to 0. Change the declaration to strict_types=1 to enable strict type checking and prevent type coercion.

@@ -0,0 +1,74 @@
<?php

declare(strict_types=0);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix strict types declaration.

The strict_types declaration should be set to 1, not 0, to prevent type coercion and ensure consistent type checking.

-declare(strict_types=0);
+declare(strict_types=1);
🤖 Prompt for AI Agents (early access)
In src/MartinGeorgiev/Model/ArithmeticRange.php at line 3, the strict_types declaration is incorrectly set to 0. Change the declaration to declare(strict_types=1); to enable strict type checking and prevent type coercion.

$startInclusive = '[' === $startParenthesis;
$endInclusive = ']' === $endParenthesis;

return new NumRange($startsAt, $endsAt, $startInclusive, $endInclusive);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix incorrect class instantiation in createFromString.

The method returns self but instantiates a non-existent NumRange class. This is causing static analysis failures in all test environments.

-        return new NumRange($startsAt, $endsAt, $startInclusive, $endInclusive);
+        return new self($startsAt, $endsAt, $startInclusive, $endInclusive);
🧰 Tools
🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 72-72:
Method MartinGeorgiev\Model\ArithmeticRange::createFromString() should return MartinGeorgiev\Model\ArithmeticRange but returns MartinGeorgiev\Model\NumRange.


[failure] 72-72:
Instantiated class MartinGeorgiev\Model\NumRange not found.

🤖 Prompt for AI Agents (early access)
In src/MartinGeorgiev/Model/ArithmeticRange.php at line 72, the createFromString method incorrectly instantiates a non-existent NumRange class instead of the current class. Replace the instantiation of NumRange with self or static to correctly return an instance of the current class and resolve static analysis errors.

Comment on lines +38 to +41
public function contains(mixed $target): bool
{
return MathUtils::inRange($target, $this->lower, $this->upper, $this->lowerInclusive, $this->upperInclusive);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Type compatibility issue in contains method.

The static analyzer is detecting a potential type compatibility issue when passing values to MathUtils::inRange().

Consider explicitly casting or validating the input parameter:

    public function contains(mixed $target): bool
    {
-        return MathUtils::inRange($target, $this->lower, $this->upper, $this->lowerInclusive, $this->upperInclusive);
+        if (!is_numeric($target)) {
+            return false;
+        }
+        return MathUtils::inRange(
+            is_numeric($target) ? (float)$target : null,
+            $this->lower, 
+            $this->upper, 
+            $this->lowerInclusive, 
+            $this->upperInclusive
+        );
    }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public function contains(mixed $target): bool
{
return MathUtils::inRange($target, $this->lower, $this->upper, $this->lowerInclusive, $this->upperInclusive);
}
public function contains(mixed $target): bool
{
if (!is_numeric($target)) {
return false;
}
return MathUtils::inRange(
is_numeric($target) ? (float)$target : null,
$this->lower,
$this->upper,
$this->lowerInclusive,
$this->upperInclusive
);
}
🧰 Tools
🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 40-40:
Parameter #1 $value of static method MartinGeorgiev\Utils\MathUtils::inRange() expects float|int|null, DateTimeInterface|float|int given.

🤖 Prompt for AI Agents (early access)
In src/MartinGeorgiev/Model/ArithmeticRange.php around lines 38 to 41, the contains method passes a mixed type parameter directly to MathUtils::inRange, causing a type compatibility issue. To fix this, add explicit type validation or casting for the $target parameter before passing it to inRange, ensuring it matches the expected type that inRange accepts.

Comment on lines +40 to +53
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (empty($value)) {
return null;
}

$stringValue = (string) $value;

if ('(,)' === $stringValue) {
return null;
}

return $stringValue;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix mixed type handling in string conversion

The static analysis tools are reporting an error on line 46 when casting $value to string. Since $value is of mixed type, you need to handle type conversion more explicitly.

    public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
    {
        if (empty($value)) {
            return null;
        }

-        $stringValue = (string) $value;
+        $stringValue = \is_object($value) && method_exists($value, '__toString') 
+            ? (string) $value 
+            : (\is_scalar($value) ? (string) $value : '');

        if ('(,)' === $stringValue) {
            return null;
        }

        return $stringValue;
    }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (empty($value)) {
return null;
}
$stringValue = (string) $value;
if ('(,)' === $stringValue) {
return null;
}
return $stringValue;
}
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (empty($value)) {
return null;
}
$stringValue = \is_object($value) && method_exists($value, '__toString')
? (string) $value
: (\is_scalar($value) ? (string) $value : '');
if ('(,)' === $stringValue) {
return null;
}
return $stringValue;
}
🧰 Tools
🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 46-46:
Cannot cast mixed to string.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 46-46:
Cannot cast mixed to string.

🤖 Prompt for AI Agents (early access)
In src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php between lines 40 and 53, the code casts a mixed type $value directly to string, causing static analysis errors. To fix this, explicitly check the type of $value before conversion: if it's already a string, use it as is; if it's an object with a __toString method, cast it to string; otherwise, handle other types appropriately or throw an error. This explicit handling will satisfy static analysis and ensure correct string conversion.

Comment on lines +23 to +38
public function convertToPHPValue($value, AbstractPlatform $platform): ?ArithmeticRange
{
if (null === $value || 'empty' === $value) {
return null;
}

if (!\is_string($value)) {
throw new \RuntimeException('NumRange expects only string. Unexpected value from DB: '.$value);
}

if (!\preg_match('/(\[|\()(.*)\,(.*)(\]|\))/', $value, $matches)) {
throw new \RuntimeException('unexpected value from DB: '.$value);
}

return ArithmeticRange::createFromString($value);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix mixed type handling to resolve static analysis errors

The static analysis tools are reporting errors in this method. The issue occurs when concatenating $value with a string, as $value is treated as mixed by the analyzer. You should use explicit type casting or checking.

    public function convertToPHPValue($value, AbstractPlatform $platform): ?ArithmeticRange
    {
        if (null === $value || 'empty' === $value) {
            return null;
        }

        if (!\is_string($value)) {
-            throw new \RuntimeException('NumRange expects only string. Unexpected value from DB: '.$value);
+            throw new \RuntimeException(sprintf('NumRange expects only string. Unexpected value from DB: %s', var_export($value, true)));
        }

        if (!\preg_match('/(\[|\()(.*)\,(.*)(\]|\))/', $value, $matches)) {
-            throw new \RuntimeException('unexpected value from DB: '.$value);
+            throw new \RuntimeException(sprintf('unexpected value from DB: %s', $value));
        }

        return ArithmeticRange::createFromString($value);
    }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public function convertToPHPValue($value, AbstractPlatform $platform): ?ArithmeticRange
{
if (null === $value || 'empty' === $value) {
return null;
}
if (!\is_string($value)) {
throw new \RuntimeException('NumRange expects only string. Unexpected value from DB: '.$value);
}
if (!\preg_match('/(\[|\()(.*)\,(.*)(\]|\))/', $value, $matches)) {
throw new \RuntimeException('unexpected value from DB: '.$value);
}
return ArithmeticRange::createFromString($value);
}
public function convertToPHPValue($value, AbstractPlatform $platform): ?ArithmeticRange
{
if (null === $value || 'empty' === $value) {
return null;
}
if (!\is_string($value)) {
throw new \RuntimeException(
sprintf(
'NumRange expects only string. Unexpected value from DB: %s',
var_export($value, true)
)
);
}
if (!\preg_match('/(\[|\()(.*)\,(.*)(\]|\))/', $value, $matches)) {
throw new \RuntimeException(
sprintf(
'unexpected value from DB: %s',
$value
)
);
}
return ArithmeticRange::createFromString($value);
}
🧰 Tools
🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

[failure] 30-30:
Binary operation "." between 'NumRange expects…' and mixed results in an error.

🤖 Prompt for AI Agents (early access)
In src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php lines 23 to 38, the method concatenates $value with strings in exception messages, but static analysis reports errors because $value is treated as mixed. To fix this, explicitly cast $value to string when concatenating in the RuntimeException messages or ensure $value is a string before concatenation by adding appropriate type checks or casting.

Comment on lines +26 to +34
MathUtils::inRange(
(int) $value,
$start,
$end,
$startInclusive,
$endInclusive,
)
);

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Be cautious of potential type issues in test cases

You're casting $value to int in line 27, but the function signature allows for null, float, or int. This casting could cause issues if the value is null. Consider passing the value directly without casting.

        self::assertEquals(
            $expected,
            MathUtils::inRange(
-                (int) $value,
+                $value,
                $start,
                $end,
                $startInclusive,
                $endInclusive,
            )
        );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
MathUtils::inRange(
(int) $value,
$start,
$end,
$startInclusive,
$endInclusive,
)
);
self::assertEquals(
$expected,
MathUtils::inRange(
$value,
$start,
$end,
$startInclusive,
$endInclusive,
)
);
🤖 Prompt for AI Agents (early access)
In tests/Unit/MartinGeorgiev/Utils/MathUtilsTest.php around lines 26 to 34, remove the explicit (int) cast on the $value argument passed to MathUtils::inRange. Since the function accepts null, float, or int, passing $value directly without casting will prevent type issues when $value is null or a float.

Comment on lines +35 to +44
self::assertEquals(
$expected,
MathUtils::inRange(
(float) $value,
$start,
$end,
$startInclusive,
$endInclusive,
)
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Be cautious of potential type issues in test cases

Similar to the previous comment, you're casting $value to float in line 38, which could cause issues if the value is null. Consider passing the value directly without casting.

        self::assertEquals(
            $expected,
            MathUtils::inRange(
-                (float) $value,
+                $value,
                $start,
                $end,
                $startInclusive,
                $endInclusive,
            )
        );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
self::assertEquals(
$expected,
MathUtils::inRange(
(float) $value,
$start,
$end,
$startInclusive,
$endInclusive,
)
);
self::assertEquals(
$expected,
MathUtils::inRange(
$value,
$start,
$end,
$startInclusive,
$endInclusive,
)
);
🤖 Prompt for AI Agents (early access)
In tests/Unit/MartinGeorgiev/Utils/MathUtilsTest.php around lines 35 to 44, avoid casting $value to float before passing it to MathUtils::inRange, as this can cause issues if $value is null. Instead, pass $value directly without casting to preserve its original type and prevent potential type errors in the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant