-
Notifications
You must be signed in to change notification settings - Fork 5
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
Enhance Provider to support old bindings with warning #32
base: 1.x
Are you sure you want to change the base?
Conversation
The previous implementation made use of the singleton scope for the RowInterface, RowListInterface, and InvokeInterface. This change removes this scope, allowing new instances of these classes to be created each time they are needed. This may improve flexibility in certain use cases and can prevent potential issues related to state persistence across multiple uses.
Added code to handle SqlFileNotFoundException in SqlFinder, RowInterfaceProvider and RowListInterfaceProvider classes. When the SQL file is not found, the code now attempts to get an instance with the specified SQL query instead of immediately throwing an exception.
The providers' RowInterfaceProvider and RowListInterfaceProvider have been updated to implement the QueryInterface instead of RowInterface and RowListInterface respectively. Also, the return type for the get method in RowInterfaceProvider is changed to QueryInterface.
…rovider In this commit, we've improved error handling in two classes - RowInterfaceProvider and RowListInterfaceProvider. If a SQLFileNotFound exception occurs, a warning is logged and the code tries to provide an instance with the given name. This change helps make our exceptions more transparent and our error recovery more robust.
The code was refactored to use PHP 8's attribute Syntax. This affected both the README.md and README.ja.md documentation files. Refactoring involved replacing the older doctrine annotations with the new #[Attribute] syntax. This impacts how constructors are written and how dependencies are injected.
The composer.lock file was updated to include the latest versions of several dependencies, including "amphp/amp", "amphp/byte-stream", "composer/pcre", and "composer/semver" among others. Some metadata and reference details were also updated in the process.
Warning Rate limit exceeded@koriym has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 32 minutes and 2 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe recent updates encompass significant changes across multiple files, focusing on enhancing the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
…viderModule Added SqlQueryInterceptModule to extend functionality. Modified SqlQueryModule to remove unnecessary interceptor bindings. Refactored SqlQueryProviderModule to include sqlDir in the constructor to handle SQL directory instances more efficiently.
This commit involves a significant revision of the README.md file. The changes made include the removal of an unnecessary language link, reframing of the sections for better clarity and relevancy, as well as updating code snippets for improved comprehension. Added a new section for 'Usage', explicitly defined function return types, and eliminated redundant code blocks for concise information. The commit also ensures all code blocks are correctly formatted.
SqlQueryProviderModule and its corresponding test have been removed. SqlFinderInterface has been created. SqlFinder class now implements SqlFinderInterface. Minor changes to other test files and classes have been made, including adjustments to method parameter types and additions of new classes. The changes are made to improve code structure and readability.
In this commit, references and calls to SqlQueryProviderModule across the project were replaced with SqlQueryModule. Moreover, some of the SqlQueryModule instances have been switched to CallableQueryModule for better compatibility with the Named attribute.
The phpstan.neon configuration file has been updated. The "excludes_analyse" parameter has been replaced with the "excludePaths" parameter to ensure proper paths exclusion during the code analysis.
Updated the code to replace all instances of SqlQueryModule with CallableQueryModule. In addition, the constructor parameters in Todo class were refactored to use private properties instead
QueryInterceptor class has been refactored to streamline its structure, removing dependency of InjectorInterface and introducing ExtendedPdoInterface and SqlDir. Also, an explicit count equality check was added in SqlQueryRow to improve code readability and maintainability.
In both 1-constructor-injection.php and 2-query-annotation.php files, the CallableQueryModule was replaced with SqlQueryModule. This change simplifies the code by reducing redundancy and using a more appropriate module for handling SQL operations.
The commit introduces a new SQL Query Interception test case with various scenarios. The interceptor class `QueryInterceptor` is also refactored, simplifying some method calls and optimizing the way the SQL file is loaded. Additionally, Query methods were added to FakeRo, FakeTodo, and the newly added FakeBar class for testing purposes.
New interface GetSqlInterface is introduced along with its two implementations - GetSql and DevGetSql. The SqlQueryModule and CallableQueryModule have been modified to bind GetSqlInterface with GetSql. DevSqlQueryModule and relevant tests are also added. This interface allows for better encapsulation of SQL fetch operations.
In this update, the contents of the SQL files are trimmed when loaded for processing. This removes any unnecessary white spaces, hence streamlining the content. The handling of SQL queries was also updated - specifically, leading comments in SQL queries are properly removed. These changes aim to refine the data processing and improve the overall efficiency and accuracy of the script.
The DevSqlQueryModule and DevGetSql have been renamed to SqlFileNameModule and GetSqlWithFileName respectively, matching their intended purposes. Additionally, all instances of these objects used within the project have been updated to reference the new names.
The README has been updated to include instructions on how to use the SqlFileNameModule. This allows users to run queries with file name comments, providing clarity on which SQL command has been executed when logging SQL. Additional code snippets have been included to demonstrate the setup and usage.
The 'extra' configuration has been added in the composer.json file. This new configuration includes 'bamarni-bin' settings with 'bin-links' and 'forward-command' set to true. These changes enhance the compatibility and functionality of the project's dependencies.
The project description has been updated in both the README.md and composer.json files. The new description accurately represents the project's functionality of converting SQL files and Web API URIs into injectable function objects.
Update query annotations in FakeRo test This commit updates and adds query annotations in the FakeRo test. It adds a query annotation to the `noSql` method and modifies the id parameter in the `withQuery` method's `@Query` annotation for enhanced templating.
@coderabbitai full review |
Actions performedFull review triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 13
Outside diff range and nitpick comments (7)
src/SqlQueryRow.php (1)
Line range hint
17-17
: PHPStan has flagged issues withExtendedPdoInterface
. Ensure this class is correctly included or aliased in your project.Also applies to: 22-22, 32-32
Tools
PHPStan
32-32: Call to method fetchAssoc() on an unknown class Aura\Sql\ExtendedPdoInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolssrc/SqlFinder.php (1)
Line range hint
41-53
: Typo in method callgetParametrAnnotation
should begetParameterAnnotation
. Verify the corrected method's functionality.- $sqlAnnotation = $this->reader->getParametrAnnotation($param, Sql::class); + $sqlAnnotation = $this->reader->getParameterAnnotation($param, Sql::class);src/SqlQueryRowList.php (1)
Line range hint
23-23
: The static analysis tool reports thatExtendedPdoInterface
is not found. Ensure that theAura\Sql
package is correctly included in your project dependencies.Also applies to: 28-28, 52-52
src/QueryInterceptor.php (1)
Line range hint
31-53
: Verify the existence and correct usage ofMethodInvocation
.Static analysis suggests that
MethodInvocation
might not be recognized. Ensure that this class is correctly imported and used within the project.Tools
PHPStan
23-23: Class Ray\Query\QueryInterceptor implements unknown interface Ray\Aop\MethodInterceptor. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Property Ray\Query\QueryInterceptor::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Parameter $pdo of method Ray\Query\QueryInterceptor::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
README.md (3)
3-50
: Revise the grammar and markdown formatting in the installation and usage sections.There are several grammatical errors and markdown linting issues in the installation and usage sections. Consider revising these sections to improve clarity and compliance with markdown standards.
Tools
LanguageTool
[style] ~15-~15: Unless you want to emphasize “not”, use “cannot” which is more common. (CAN_NOT_PREMIUM)
Context: ...odule. It provides storage access which can not be provided by static conversion by PHP...
[uncategorized] ~20-~20: A comma might be missing here. (AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
Context: ...code. * Execution objects are generated automatically so you do not need to write procedural ...
[grammar] ~30-~30: There seems to be a noun/verb agreement error. Did you mean “installs” or “installed”? (SINGULAR_NOUN_VERB_AGREEMENT)
Context: ...er require ray/query-module ### Module install (SQL) ```php use Ray\Di\AbstractModule...
[grammar] ~50-~50: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”? (TO_DO_HYPHEN)
Context: ...e SQL files in one directory. $sqlDir/todo_insert.sql ```sql INSERT INTO todo (id...Markdownlint
23-23: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
49-49: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
28-28: null (MD014, commands-show-output)
Dollar signs used before commands without showing output
45-45: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
44-44: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
32-32: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
Line range hint
62-147
: Improve the formatting of code examples.Some of the code examples in the README have formatting issues, such as inconsistent indentation and missing language specifications for code blocks. Consider revising these examples to ensure they are clear and correctly formatted.
Tools
LanguageTool
[uncategorized] ~130-~130: You might be missing the article “a” here. (AI_EN_LECTOR_MISSING_DETERMINER_A)
Context: ... } } ``` ## Override the method with callable object Entire method invocation can be...
[grammar] ~132-~132: The past participle is required after “can be”. (BE_VBP_IN)
Context: ...object Entire method invocation can be override with callable object in specified with ...
[uncategorized] ~132-~132: You might be missing the article “a” here. (AI_EN_LECTOR_MISSING_DETERMINER_A)
Context: ... method invocation can be override with callable object in specified with#[Query]
. `...Markdownlint
149-149: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
134-134: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
150-150: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
Line range hint
148-307
: Address minor grammatical and markdown formatting issues in the advanced features section.The advanced features section contains minor grammatical errors and markdown formatting issues. Consider revising this section to enhance readability and compliance with markdown standards.
Tools
Markdownlint
281-281: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
280-280: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
288-288: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
318-318: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
278-278: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
286-286: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
291-291: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
299-299: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
307-307: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
312-312: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
318-318: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
vendor-bin/tools/composer.lock
is excluded by!**/*.lock
Files selected for processing (31)
- .github/workflows/continuous-integration.yml (1 hunks)
- README.md (10 hunks)
- composer.json (2 hunks)
- demo/0-manual-injection.php (1 hunks)
- demo/1-constructor-injection.php (2 hunks)
- demo/2-query-annotation.php (1 hunks)
- demo/Todo.php (1 hunks)
- phpstan.neon (1 hunks)
- src/CallableQueryModule.php (1 hunks)
- src/Exception/SqlFileNotFoundException.php (1 hunks)
- src/GetSql.php (1 hunks)
- src/GetSqlInterface.php (1 hunks)
- src/GetSqlWithFileName.php (1 hunks)
- src/QueryInterceptor.php (4 hunks)
- src/RowInterfaceProvider.php (2 hunks)
- src/RowListInterfaceProvider.php (2 hunks)
- src/SqlFileName.php (2 hunks)
- src/SqlFileNameModule.php (1 hunks)
- src/SqlFinder.php (2 hunks)
- src/SqlFinderInterface.php (1 hunks)
- src/SqlQueryInterceptModule.php (1 hunks)
- src/SqlQueryModule.php (2 hunks)
- src/SqlQueryRow.php (1 hunks)
- src/SqlQueryRowList.php (2 hunks)
- tests/Fake/FakeBar.php (1 hunks)
- tests/Fake/FakeRo.php (1 hunks)
- tests/Fake/FakeTodo.php (2 hunks)
- tests/Fake/FakeTodoRepository.php (1 hunks)
- tests/Iso8601FormatModuleTest.php (1 hunks)
- tests/SqlQueryInterceptModuleTest.php (1 hunks)
- tests/SqlQueryModuleTest.php (3 hunks)
Files skipped from review due to trivial changes (4)
- composer.json
- phpstan.neon
- src/GetSqlInterface.php
- src/SqlFileName.php
Additional context used
PHPStan
src/SqlFileNameModule.php
10-10: Class Ray\Query\SqlFileNameModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Call to an undefined method Ray\Query\SqlFileNameModule::bind(). (method.notFound)
src/SqlQueryInterceptModule.php
10-10: Class Ray\Query\SqlQueryInterceptModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
15-15: Method Ray\Query\SqlQueryInterceptModule::configure() has no return type specified. (missingType.return)
17-17: Call to an undefined method Ray\Query\SqlQueryInterceptModule::bindInterceptor(). (method.notFound)
18-18: Access to an undefined property Ray\Query\SqlQueryInterceptModule::$matcher. (property.notFound)
Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
19-19: Access to an undefined property Ray\Query\SqlQueryInterceptModule::$matcher. (property.notFound)
Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-propertysrc/SqlQueryRow.php
17-17: Property Ray\Query\SqlQueryRow::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
22-22: Parameter $pdo of method Ray\Query\SqlQueryRow::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
32-32: Call to method fetchAssoc() on an unknown class Aura\Sql\ExtendedPdoInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolssrc/SqlQueryModule.php
12-12: Class Ray\Query\SqlQueryModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Parameter $module of method Ray\Query\SqlQueryModule::__construct() has invalid type Ray\Di\AbstractModule. (class.notFound)
21-21: Ray\Query\SqlQueryModule::__construct() calls parent::__construct() but Ray\Query\SqlQueryModule does not extend any class. (class.noParent)
27-27: Method Ray\Query\SqlQueryModule::configure() has no return type specified. (missingType.return)
29-29: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
30-30: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
31-31: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
32-32: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
32-32: Class Koriym\ParamReader\ParamReader not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Class Koriym\ParamReader\ParamReaderInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
34-34: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
35-35: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
36-36: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
38-38: Call to an undefined method Ray\Query\SqlQueryModule::install(). (method.notFound)
src/SqlFinder.php
19-19: Property Ray\Query\SqlFinder::$reader has unknown class Koriym\ParamReader\ParamReaderInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Parameter $reader of method Ray\Query\SqlFinder::__construct() has invalid type Koriym\ParamReader\ParamReaderInterface. (class.notFound)
29-29: Parameter $reader of method Ray\Query\SqlFinder::__construct() has invalid type Koriym\ParamReader\ParamReaderInterface. (class.notFound)
41-41: Call to method getParametrAnnotation() on an unknown class Koriym\ParamReader\ParamReaderInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolssrc/SqlQueryRowList.php
23-23: Property Ray\Query\SqlQueryRowList::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Parameter $pdo of method Ray\Query\SqlQueryRowList::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
52-52: Call to method perform() on an unknown class Aura\Sql\ExtendedPdoInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolssrc/RowInterfaceProvider.php
18-18: Class Ray\Query\RowInterfaceProvider implements unknown interface Ray\Di\ProviderInterface. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
18-18: PHPDoc tag @implements has invalid type Ray\Di\ProviderInterface. (class.notFound)
21-21: Property Ray\Query\RowInterfaceProvider::$ip has unknown class Ray\Di\InjectionPointInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
24-24: Property Ray\Query\RowInterfaceProvider::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
30-30: Property Ray\Query\RowInterfaceProvider::$injector has unknown class Ray\Di\InjectorInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Parameter $ip of method Ray\Query\RowInterfaceProvider::__construct() has invalid type Ray\Di\InjectionPointInterface. (class.notFound)
34-34: Parameter $pdo of method Ray\Query\RowInterfaceProvider::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
36-36: Parameter $injector of method Ray\Query\RowInterfaceProvider::__construct() has invalid type Ray\Di\InjectorInterface. (class.notFound)
47-47: Call to method getParameter() on an unknown class Ray\Di\InjectionPointInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Call to method getInstance() on an unknown class Ray\Di\InjectorInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
57-57: Caught class Ray\Di\Exception\Unbound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolstests/Iso8601FormatModuleTest.php
14-14: Class Ray\Query\Iso8601FormatModuleTest extends unknown class PHPUnit\Framework\TestCase. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Property Ray\Query\Iso8601FormatModuleTest::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
20-20: Property Ray\Query\Iso8601FormatModuleTest::$module has unknown class Ray\Di\AbstractModule as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
24-24: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
25-25: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
30-30: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Property Ray\Query\Iso8601FormatModuleTest::$module (Ray\Di\AbstractModule) does not accept class@anonymous/tests/Iso8601FormatModuleTest.php:31. (assign.propertyType)
33-33: Property class@anonymous/tests/Iso8601FormatModuleTest.php:31::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
35-35: Parameter $pdo of method class@anonymous/tests/Iso8601FormatModuleTest.php:31::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
39-39: class@anonymous/tests/Iso8601FormatModuleTest.php:31::__construct() calls parent::__construct() but class@anonymous/tests/Iso8601FormatModuleTest.php:31 does not extend any class. (class.noParent)
42-42: Method class@anonymous/tests/Iso8601FormatModuleTest.php:31::configure() has no return type specified. (missingType.return)
44-44: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::bind(). (method.notFound)
44-44: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
45-45: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
46-46: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
53-53: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
54-54: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
54-54: Class Ray\Query\FakeTodo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: Call to method get() on an unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: PHPDoc tag @var for variable $todo contains unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
62-62: Call to an undefined method Ray\Query\Iso8601FormatModuleTest::assertSame(). (method.notFound)
67-67: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Class Ray\Query\FakeTodo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: Call to method getList() on an unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: PHPDoc tag @var for variable $todo contains unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
78-78: Call to an undefined method Ray\Query\Iso8601FormatModuleTest::assertSame(). (method.notFound)
src/RowListInterfaceProvider.php
19-19: Class Ray\Query\RowListInterfaceProvider implements unknown interface Ray\Di\ProviderInterface. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
19-19: PHPDoc tag @implements has invalid type Ray\Di\ProviderInterface. (class.notFound)
22-22: Property Ray\Query\RowListInterfaceProvider::$ip has unknown class Ray\Di\InjectionPointInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
25-25: Property Ray\Query\RowListInterfaceProvider::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Property Ray\Query\RowListInterfaceProvider::$injector has unknown class Ray\Di\InjectorInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
34-34: Parameter $ip of method Ray\Query\RowListInterfaceProvider::__construct() has invalid type Ray\Di\InjectionPointInterface. (class.notFound)
35-35: Parameter $pdo of method Ray\Query\RowListInterfaceProvider::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
37-37: Parameter $injector of method Ray\Query\RowListInterfaceProvider::__construct() has invalid type Ray\Di\InjectorInterface. (class.notFound)
48-48: Call to method getParameter() on an unknown class Ray\Di\InjectionPointInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Call to method getInstance() on an unknown class Ray\Di\InjectorInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
60-60: Caught class Ray\Di\Exception\Unbound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
65-65: Call to method getInstance() on an unknown class Ray\Di\InjectorInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: Caught class Ray\Di\Exception\Unbound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolstests/SqlQueryInterceptModuleTest.php
15-15: Class Ray\Query\SqlQueryInterceptModuleTest extends unknown class PHPUnit\Framework\TestCase. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
18-18: Property Ray\Query\SqlQueryInterceptModuleTest::$fakeRo has unknown class Ray\Query\FakeRo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
21-21: Property Ray\Query\SqlQueryInterceptModuleTest::$fakeBar has unknown class Ray\Query\FakeBar as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
25-25: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
27-27: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
34-34: Property class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
36-36: Parameter $pdo of method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
41-41: Method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::configure() has no return type specified. (missingType.return)
43-43: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::bind(). (method.notFound)
43-43: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
44-44: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::install(). (method.notFound)
45-45: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::bind(). (method.notFound)
45-45: Class Ray\Query\FakeBar not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
48-48: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
49-49: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
49-49: Class Ray\Query\FakeRo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
50-50: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
50-50: Class Ray\Query\FakeBar not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
55-55: Call to method onGet() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
57-57: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
58-58: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
63-63: Call to method onGet() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
64-64: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
65-65: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
66-66: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
71-71: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::expectException(). (method.notFound)
72-72: Call to method noSql() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
77-77: Call to method withQuery() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
78-78: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
79-79: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
80-80: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
85-85: Call to method getIntercepted() on an unknown class Ray\Query\FakeBar. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
86-86: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
src/CallableQueryModule.php
20-20: Class Ray\Query\CallableQueryModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Parameter $module of method Ray\Query\CallableQueryModule::__construct() has invalid type Ray\Di\AbstractModule. (class.notFound)
35-35: Ray\Query\CallableQueryModule::__construct() calls parent::__construct() but Ray\Query\CallableQueryModule does not extend any class. (class.noParent)
41-41: Method Ray\Query\CallableQueryModule::configure() has no return type specified. (missingType.return)
43-43: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
43-43: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
44-44: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
49-49: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
57-57: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
63-63: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
71-71: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
75-75: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
src/QueryInterceptor.php
23-23: Class Ray\Query\QueryInterceptor implements unknown interface Ray\Aop\MethodInterceptor. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Property Ray\Query\QueryInterceptor::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Parameter $pdo of method Ray\Query\QueryInterceptor::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
40-40: Parameter $invocation of method Ray\Query\QueryInterceptor::invoke() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
42-42: Call to method getMethod() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
46-46: Call to method getNamedArguments() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
61-61: Parameter $invocation of method Ray\Query\QueryInterceptor::getQueryResult() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
65-65: Call to method getThis() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
67-67: Class BEAR\Resource\ResourceObject not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
75-75: Method Ray\Query\QueryInterceptor::returnRo() has invalid return type BEAR\Resource\ResourceObject. (class.notFound)
75-75: Parameter $invocation of method Ray\Query\QueryInterceptor::returnRo() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
75-75: Parameter $ro of method Ray\Query\QueryInterceptor::returnRo() has invalid type BEAR\Resource\ResourceObject. (class.notFound)
81-81: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
81-81: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
83-83: Call to method proceed() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
83-83: PHPDoc tag @var for variable $ro contains unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
88-88: Method Ray\Query\QueryInterceptor::return404() has invalid return type BEAR\Resource\ResourceObject. (class.notFound)
88-88: Parameter $ro of method Ray\Query\QueryInterceptor::return404() has invalid type BEAR\Resource\ResourceObject. (class.notFound)
90-90: Access to property $code on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
90-90: Access to property $code on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
91-91: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
91-91: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
103-103: Function uri_template not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
112-112: Parameter $method of method Ray\Query\QueryInterceptor::getsql() has invalid type Ray\Aop\ReflectionMethod. (class.notFound)
tests/SqlQueryModuleTest.php
20-20: Class Ray\Query\SqlQueryModuleTest extends unknown class PHPUnit\Framework\TestCase. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
23-23: Property Ray\Query\SqlQueryModuleTest::$module has unknown class Ray\Di\AbstractModule as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
27-27: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Property Ray\Query\SqlQueryModuleTest::$module (Ray\Di\AbstractModule) does not accept class@anonymous/tests/SqlQueryModuleTest.php:33. (assign.propertyType)
35-35: Property class@anonymous/tests/SqlQueryModuleTest.php:33::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
37-37: Parameter $pdo of method class@anonymous/tests/SqlQueryModuleTest.php:33::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
42-42: Method class@anonymous/tests/SqlQueryModuleTest.php:33::configure() has no return type specified. (missingType.return)
44-44: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:33::bind(). (method.notFound)
44-44: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
45-45: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:33::install(). (method.notFound)
52-52: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Class Ray\Query\FakeTodoRepository not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
60-60: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
61-61: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
61-61: Class Ray\Query\FakeTodoRepositoryAttr not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: PHPDoc tag @var for variable $todo contains unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
69-69: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: Access to property $todoList on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
71-71: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertSame(). (method.notFound)
72-72: Access to property $todoItem on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
73-73: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertSame(). (method.notFound)
78-78: Call to an undefined method Ray\Query\SqlQueryModuleTest::expectException(). (method.notFound)
79-79: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
80-80: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
80-80: Class Ray\Query\FakeTodoProviderSqlNotFound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
85-85: Call to an undefined method Ray\Query\SqlQueryModuleTest::expectException(). (method.notFound)
86-86: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Class Ray\Query\FakeTodoProviderSqlNotAnnotated not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
92-92: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
93-93: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
94-94: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
98-98: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
99-99: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
101-101: Property class@anonymous/tests/SqlQueryModuleTest.php:99::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
103-103: Parameter $pdo of method class@anonymous/tests/SqlQueryModuleTest.php:99::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
108-108: Method class@anonymous/tests/SqlQueryModuleTest.php:99::configure() has no return type specified. (missingType.return)
110-110: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:99::bind(). (method.notFound)
110-110: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
111-111: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:99::install(). (method.notFound)
112-112: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:99::override(). (method.notFound)
115-115: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
116-116: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
116-116: Class Ray\Query\FakeTodoRepository not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
117-117: Class Ray\Query\FakeTodoRepository not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
118-118: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
119-119: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertStringContainsString(). (method.notFound)
LanguageTool
README.md
[style] ~15-~15: Unless you want to emphasize “not”, use “cannot” which is more common. (CAN_NOT_PREMIUM)
Context: ...odule. It provides storage access which can not be provided by static conversion by PHP...
[uncategorized] ~20-~20: A comma might be missing here. (AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
Context: ...code. * Execution objects are generated automatically so you do not need to write procedural ...
[grammar] ~30-~30: There seems to be a noun/verb agreement error. Did you mean “installs” or “installed”? (SINGULAR_NOUN_VERB_AGREEMENT)
Context: ...er require ray/query-module ### Module install (SQL) ```php use Ray\Di\AbstractModule...
[grammar] ~50-~50: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”? (TO_DO_HYPHEN)
Context: ...e SQL files in one directory. $sqlDir/todo_insert.sql ```sql INSERT INTO todo (id...
[grammar] ~56-~56: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”? (TO_DO_HYPHEN)
Context: ...itle) VALUES (:id, :title)$sqlDir/todo_item_by_id.sql
sql SELECT * FROM to...
[uncategorized] ~65-~65: The grammatical number of this noun doesn’t look right. Consider replacing it. (AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
Context: ...ct injected into the constructor. Those object was made in specified sql with#[Sql]
...
[uncategorized] ~65-~65: This verb does not appear to agree with the subject. Consider using a different form. (AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
Context: ...cted into the constructor. Those object was made in specified sql with#[Sql]
bin...
[uncategorized] ~95-~95: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...`` ### Row or RowList You can specify expected return value type is eitherRow
or `R...
[uncategorized] ~96-~96: This verb does not appear to agree with the subject. Consider using a different form. (AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
Context: ...nterface` is handy to specify SQL which return single row. ```php use Ray\Query\RowIn...
[uncategorized] ~96-~96: You might be missing the article “a” here. (AI_EN_LECTOR_MISSING_DETERMINER_A)
Context: ...e` is handy to specify SQL which return single row. ```php use Ray\Query\RowInterface...
[uncategorized] ~130-~130: You might be missing the article “a” here. (AI_EN_LECTOR_MISSING_DETERMINER_A)
Context: ... } } ``` ## Override the method with callable object Entire method invocation can be...
[grammar] ~132-~132: The past participle is required after “can be”. (BE_VBP_IN)
Context: ...object Entire method invocation can be override with callable object in specified with ...
[uncategorized] ~132-~132: You might be missing the article “a” here. (AI_EN_LECTOR_MISSING_DETERMINER_A)
Context: ... method invocation can be override with callable object in specified with#[Query]
. `...
[uncategorized] ~160-~160: Possible missing preposition found. (AI_HYDRA_LEO_MISSING_TO)
Context: ...} ``` When parameter name is different method arguments and Query object arguments, u...
[uncategorized] ~172-~172: You might be missing the article “a” here. (AI_EN_LECTOR_MISSING_DETERMINER_A)
Context: ... } }Specify `type='row'` when single row result is expected to return.
p...
[uncategorized] ~189-~189: You might be missing the article “a” here. (AI_EN_LECTOR_MISSING_DETERMINER_A)
Context: ...tion object of$createTodo
which makesPOST
request to `https://httpbin.org/t...
[uncategorized] ~243-~243: You might be missing the article “a” here. (AI_EN_LECTOR_MISSING_DETERMINER_A)
Context: ...her dependencies are needed, we bind to PHP class and use dependency as a service. ...
Markdownlint
README.md
62-62: Expected: h3; Actual: h4 (MD001, heading-increment)
Heading levels should only increment by one level at a time
23-23: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
49-49: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
64-64: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
149-149: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
322-322: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
28-28: null (MD014, commands-show-output)
Dollar signs used before commands without showing output
45-45: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
281-281: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
44-44: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
280-280: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
288-288: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
189-189: null (MD038, no-space-in-code)
Spaces inside code span elements
265-265: null (MD038, no-space-in-code)
Spaces inside code span elements
318-318: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
32-32: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
52-52: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
58-58: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
67-67: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
98-98: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
114-114: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
134-134: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
150-150: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
162-162: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
174-174: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
191-191: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
212-212: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
228-228: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
245-245: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
267-267: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
278-278: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
286-286: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
291-291: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
299-299: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
307-307: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
312-312: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
318-318: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
Additional comments not posted (25)
src/SqlFinderInterface.php (1)
9-12
: TheSqlFinderInterface
is well-defined and adheres to good design principles by being concise and focused..github/workflows/continuous-integration.yml (1)
Line range hint
1-10
: Ensure that the versionv1
of the shared CI workflow is the intended one and that it supports the specified PHP versions.demo/Todo.php (1)
11-11
: The use ofQuery
annotations in theTodo
class is correctly implemented to link methods to SQL queries. Ensure that the dynamic SQL generation (templated: true
) is tested thoroughly.Also applies to: 16-16
src/Exception/SqlFileNotFoundException.php (2)
11-12
: The addition of the$sql
property is well-documented and correctly typed.
14-18
: The constructor is correctly updated to initialize the new$sql
property and properly delegates to the parent constructor.src/SqlFileNameModule.php (1)
17-17
: Ensure thatAbstractModule
andScope
are correctly imported and available in the project.Verification successful
The classes
AbstractModule
andScope
are imported from theRay\Di
namespace, indicating they are part of an external library. The binding configuration insrc/SqlFileNameModule.php
is correct and does not have any issues related to missing classes.
AbstractModule
is imported and used in multiple files, includingsrc/SqlFileNameModule.php
.Scope
is also imported and used insrc/SqlFileNameModule.php
.No issues were found with the binding configuration.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of AbstractModule and Scope classes. # Test: Search for the class definitions. Expect: Definitions found. rg --type php $'class AbstractModule' rg --type php $'class Scope'Length of output: 68
Script:
#!/bin/bash # Description: Verify the import statements and references for AbstractModule and Scope. # Test: Search for import statements and references. Expect: Import statements or references found. rg --type php 'use .*AbstractModule' rg --type php 'use .*Scope' rg --type php 'AbstractModule' rg --type php 'Scope'Length of output: 4714
Tools
PHPStan
17-17: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Call to an undefined method Ray\Query\SqlFileNameModule::bind(). (method.notFound)
src/SqlQueryInterceptModule.php (1)
17-21
: Verify the existence of thematcher
property and thebindInterceptor
method in theAbstractModule
class.Tools
PHPStan
17-17: Call to an undefined method Ray\Query\SqlQueryInterceptModule::bindInterceptor(). (method.notFound)
18-18: Access to an undefined property Ray\Query\SqlQueryInterceptModule::$matcher. (property.notFound)
Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
19-19: Access to an undefined property Ray\Query\SqlQueryInterceptModule::$matcher. (property.notFound)
Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-propertysrc/GetSqlWithFileName.php (1)
18-22
: The implementation of__invoke
inGetSqlWithFileName
is efficient and follows good practices for file handling and string manipulation.tests/Fake/FakeBar.php (1)
21-21
: Transition to attribute-based annotations enhances clarity and modernizes the code.tests/Fake/FakeTodoRepository.php (1)
27-27
: Updated constructor parameters enhance type safety and maintain consistency with the main codebase.src/SqlQueryRow.php (1)
33-33
: Explicit check for empty results improves clarity and robustness of the method.demo/2-query-annotation.php (1)
20-20
: Installation ofSqlQueryModule
and binding ofTodo
class align well with the PR's objectives to enhance SQL query handling.tests/Fake/FakeRo.php (4)
Line range hint
11-13
: Transition from annotation to attribute for@Query
is correctly implemented.
33-40
: Correct use of templated SQL query with new attribute form.
42-45
: MethodwrongPath
has an attribute but lacks implementation. If for testing, please clarify with a comment.
25-31
: Using a non-existent SQL ID in@Query
. If this is for testing error handling, consider adding a comment to clarify.demo/0-manual-injection.php (2)
14-15
: Constructor correctly initializesQueryInterface
properties for SQL queries.
Line range hint
22-31
: Methodsget
andcreate
correctly useQueryInterface
properties to execute SQL queries.demo/1-constructor-injection.php (2)
19-21
: The use of constructor property promotion with attributes for dependency injection is a modern PHP practice that enhances clarity and reduces boilerplate. Good implementation!
41-41
: The installation ofSqlQueryModule
with a directory path is correctly implemented.tests/Fake/FakeTodo.php (2)
12-12
: Transition from PHPDoc to attributes for dependency injection is correctly implemented, aligning with modern PHP practices.
66-72
: The new methodgetIntercepted
uses theQuery
attribute correctly for specifying query details. This is a clean and clear implementation.src/SqlQueryRowList.php (1)
15-15
: Addition of utility functions likepreg_replace
and others are appropriate for the operations performed in this class.tests/Iso8601FormatModuleTest.php (1)
45-45
: Ensure theIso8601FormatModule
is correctly installed.Verification successful
The
Iso8601FormatModule
is correctly installed in theIso8601FormatModuleTest
class.
- Line found:
$this->install(new Iso8601FormatModule(['created_at']));
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the installation of Iso8601FormatModule in the setup method. # Test: Search for the module installation. Expect: Installation code should be present. rg --type php $'this->install(new Iso8601FormatModule(['created_at']))' tests/Iso8601FormatModuleTest.phpLength of output: 104
Script:
#!/bin/bash # Description: Verify the installation of Iso8601FormatModule in the setup method. # Test: Search for the module installation with different variations. rg --type php 'Iso8601FormatModule' tests/Iso8601FormatModuleTest.phpLength of output: 189
Tools
PHPStan
45-45: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
tests/SqlQueryInterceptModuleTest.php (1)
41-46
: Ensure correct binding and installation of modules.Verification successful
The binding and installation of modules in the
configure
method are correctly implemented.
ExtendedPdoInterface
is bound to an instance of$this->pdo
.SqlQueryModule
is installed with the path__DIR__ . '/Fake/sql'
.FakeBar
is bound.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the binding and installation of modules in the setup method. # Test: Search for the binding and installation code. Expect: Binding and installation code should be present. rg --type php $'this->bind(ExtendedPdoInterface::class)->toInstance(this->pdo);' tests/SqlQueryInterceptModuleTest.phpLength of output: 119
Script:
#!/bin/bash # Description: Verify the binding and installation of modules in the setup method by searching for the configure method and its contents. # Test: Search for the configure method and its contents. Expect: The configure method should contain binding and installation code. rg --type php 'protected function configure' -A 10 tests/SqlQueryInterceptModuleTest.phpLength of output: 569
Tools
PHPStan
41-41: Method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::configure() has no return type specified. (missingType.return)
43-43: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::bind(). (method.notFound)
43-43: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
44-44: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::install(). (method.notFound)
45-45: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::bind(). (method.notFound)
45-45: Class Ray\Query\FakeBar not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
There was a problem hiding this 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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
vendor-bin/tools/composer.lock
is excluded by!**/*.lock
Files selected for processing (31)
- .github/workflows/continuous-integration.yml (1 hunks)
- README.md (10 hunks)
- composer.json (2 hunks)
- demo/0-manual-injection.php (1 hunks)
- demo/1-constructor-injection.php (2 hunks)
- demo/2-query-annotation.php (1 hunks)
- demo/Todo.php (1 hunks)
- phpstan.neon (1 hunks)
- src/CallableQueryModule.php (1 hunks)
- src/Exception/SqlFileNotFoundException.php (1 hunks)
- src/GetSql.php (1 hunks)
- src/GetSqlInterface.php (1 hunks)
- src/GetSqlWithFileName.php (1 hunks)
- src/QueryInterceptor.php (4 hunks)
- src/RowInterfaceProvider.php (2 hunks)
- src/RowListInterfaceProvider.php (2 hunks)
- src/SqlFileName.php (2 hunks)
- src/SqlFileNameModule.php (1 hunks)
- src/SqlFinder.php (2 hunks)
- src/SqlFinderInterface.php (1 hunks)
- src/SqlQueryInterceptModule.php (1 hunks)
- src/SqlQueryModule.php (2 hunks)
- src/SqlQueryRow.php (1 hunks)
- src/SqlQueryRowList.php (2 hunks)
- tests/Fake/FakeBar.php (1 hunks)
- tests/Fake/FakeRo.php (1 hunks)
- tests/Fake/FakeTodo.php (2 hunks)
- tests/Fake/FakeTodoRepository.php (1 hunks)
- tests/Iso8601FormatModuleTest.php (1 hunks)
- tests/SqlQueryInterceptModuleTest.php (1 hunks)
- tests/SqlQueryModuleTest.php (3 hunks)
Additional context used
Learnings (3)
src/RowInterfaceProvider.php (1)
User: koriym PR: ray-di/Ray.QueryModule#32 File: src/RowInterfaceProvider.php:44-63 Timestamp: 2024-06-12T02:30:57.062Z Learning: The error handling code in the `get` method of `RowInterfaceProvider`, which issues a warning and suggests changes, is intended for development use only and not for production.
src/CallableQueryModule.php (1)
User: koriym PR: ray-di/Ray.QueryModule#32 File: src/CallableQueryModule.php:43-58 Timestamp: 2024-06-12T02:34:35.196Z Learning: Historical code in the `CallableQueryModule` is maintained for compatibility reasons and should not be suggested for refactoring.
tests/SqlQueryModuleTest.php (1)
User: koriym PR: ray-di/Ray.Compiler#112 File: tests/Fake/CompileVisitor/FakeQux.php:7-23 Timestamp: 2024-05-25T02:32:30.728Z Learning: The `InjectorInterface` in the `Ray\Di` namespace may not be directly visible in static analysis due to dynamic inclusion or being part of external dependencies. This was inferred from the user's assertion and the fact that related tests are passing.
PHPStan
src/SqlFileNameModule.php
10-10: Class Ray\Query\SqlFileNameModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Call to an undefined method Ray\Query\SqlFileNameModule::bind(). (method.notFound)
src/SqlQueryInterceptModule.php
10-10: Class Ray\Query\SqlQueryInterceptModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
15-15: Method Ray\Query\SqlQueryInterceptModule::configure() has no return type specified. (missingType.return)
17-17: Call to an undefined method Ray\Query\SqlQueryInterceptModule::bindInterceptor(). (method.notFound)
18-18: Access to an undefined property Ray\Query\SqlQueryInterceptModule::$matcher. (property.notFound)
Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
19-19: Access to an undefined property Ray\Query\SqlQueryInterceptModule::$matcher. (property.notFound)
Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-propertysrc/SqlQueryRow.php
17-17: Property Ray\Query\SqlQueryRow::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
22-22: Parameter $pdo of method Ray\Query\SqlQueryRow::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
32-32: Call to method fetchAssoc() on an unknown class Aura\Sql\ExtendedPdoInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolssrc/SqlQueryModule.php
12-12: Class Ray\Query\SqlQueryModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Parameter $module of method Ray\Query\SqlQueryModule::__construct() has invalid type Ray\Di\AbstractModule. (class.notFound)
21-21: Ray\Query\SqlQueryModule::__construct() calls parent::__construct() but Ray\Query\SqlQueryModule does not extend any class. (class.noParent)
27-27: Method Ray\Query\SqlQueryModule::configure() has no return type specified. (missingType.return)
29-29: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
30-30: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
31-31: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
32-32: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
32-32: Class Koriym\ParamReader\ParamReader not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Class Koriym\ParamReader\ParamReaderInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
34-34: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
35-35: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
36-36: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
38-38: Call to an undefined method Ray\Query\SqlQueryModule::install(). (method.notFound)
src/SqlFinder.php
19-19: Property Ray\Query\SqlFinder::$reader has unknown class Koriym\ParamReader\ParamReaderInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Parameter $reader of method Ray\Query\SqlFinder::__construct() has invalid type Koriym\ParamReader\ParamReaderInterface. (class.notFound)
29-29: Parameter $reader of method Ray\Query\SqlFinder::__construct() has invalid type Koriym\ParamReader\ParamReaderInterface. (class.notFound)
41-41: Call to method getParametrAnnotation() on an unknown class Koriym\ParamReader\ParamReaderInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolssrc/SqlQueryRowList.php
23-23: Property Ray\Query\SqlQueryRowList::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Parameter $pdo of method Ray\Query\SqlQueryRowList::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
52-52: Call to method perform() on an unknown class Aura\Sql\ExtendedPdoInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolssrc/RowInterfaceProvider.php
18-18: Class Ray\Query\RowInterfaceProvider implements unknown interface Ray\Di\ProviderInterface. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
18-18: PHPDoc tag @implements has invalid type Ray\Di\ProviderInterface. (class.notFound)
21-21: Property Ray\Query\RowInterfaceProvider::$ip has unknown class Ray\Di\InjectionPointInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
24-24: Property Ray\Query\RowInterfaceProvider::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
30-30: Property Ray\Query\RowInterfaceProvider::$injector has unknown class Ray\Di\InjectorInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Parameter $ip of method Ray\Query\RowInterfaceProvider::__construct() has invalid type Ray\Di\InjectionPointInterface. (class.notFound)
34-34: Parameter $pdo of method Ray\Query\RowInterfaceProvider::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
36-36: Parameter $injector of method Ray\Query\RowInterfaceProvider::__construct() has invalid type Ray\Di\InjectorInterface. (class.notFound)
47-47: Call to method getParameter() on an unknown class Ray\Di\InjectionPointInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Call to method getInstance() on an unknown class Ray\Di\InjectorInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
57-57: Caught class Ray\Di\Exception\Unbound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolstests/Iso8601FormatModuleTest.php
14-14: Class Ray\Query\Iso8601FormatModuleTest extends unknown class PHPUnit\Framework\TestCase. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Property Ray\Query\Iso8601FormatModuleTest::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
20-20: Property Ray\Query\Iso8601FormatModuleTest::$module has unknown class Ray\Di\AbstractModule as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
24-24: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
25-25: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
30-30: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Property Ray\Query\Iso8601FormatModuleTest::$module (Ray\Di\AbstractModule) does not accept class@anonymous/tests/Iso8601FormatModuleTest.php:31. (assign.propertyType)
33-33: Property class@anonymous/tests/Iso8601FormatModuleTest.php:31::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
35-35: Parameter $pdo of method class@anonymous/tests/Iso8601FormatModuleTest.php:31::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
39-39: class@anonymous/tests/Iso8601FormatModuleTest.php:31::__construct() calls parent::__construct() but class@anonymous/tests/Iso8601FormatModuleTest.php:31 does not extend any class. (class.noParent)
42-42: Method class@anonymous/tests/Iso8601FormatModuleTest.php:31::configure() has no return type specified. (missingType.return)
44-44: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::bind(). (method.notFound)
44-44: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
45-45: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
46-46: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
53-53: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
54-54: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
54-54: Class Ray\Query\FakeTodo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: Call to method get() on an unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: PHPDoc tag @var for variable $todo contains unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
62-62: Call to an undefined method Ray\Query\Iso8601FormatModuleTest::assertSame(). (method.notFound)
67-67: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Class Ray\Query\FakeTodo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: Call to method getList() on an unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: PHPDoc tag @var for variable $todo contains unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
78-78: Call to an undefined method Ray\Query\Iso8601FormatModuleTest::assertSame(). (method.notFound)
src/RowListInterfaceProvider.php
19-19: Class Ray\Query\RowListInterfaceProvider implements unknown interface Ray\Di\ProviderInterface. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
19-19: PHPDoc tag @implements has invalid type Ray\Di\ProviderInterface. (class.notFound)
22-22: Property Ray\Query\RowListInterfaceProvider::$ip has unknown class Ray\Di\InjectionPointInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
25-25: Property Ray\Query\RowListInterfaceProvider::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Property Ray\Query\RowListInterfaceProvider::$injector has unknown class Ray\Di\InjectorInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
34-34: Parameter $ip of method Ray\Query\RowListInterfaceProvider::__construct() has invalid type Ray\Di\InjectionPointInterface. (class.notFound)
35-35: Parameter $pdo of method Ray\Query\RowListInterfaceProvider::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
37-37: Parameter $injector of method Ray\Query\RowListInterfaceProvider::__construct() has invalid type Ray\Di\InjectorInterface. (class.notFound)
48-48: Call to method getParameter() on an unknown class Ray\Di\InjectionPointInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Call to method getInstance() on an unknown class Ray\Di\InjectorInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
60-60: Caught class Ray\Di\Exception\Unbound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
65-65: Call to method getInstance() on an unknown class Ray\Di\InjectorInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: Caught class Ray\Di\Exception\Unbound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolstests/SqlQueryInterceptModuleTest.php
15-15: Class Ray\Query\SqlQueryInterceptModuleTest extends unknown class PHPUnit\Framework\TestCase. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
18-18: Property Ray\Query\SqlQueryInterceptModuleTest::$fakeRo has unknown class Ray\Query\FakeRo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
21-21: Property Ray\Query\SqlQueryInterceptModuleTest::$fakeBar has unknown class Ray\Query\FakeBar as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
25-25: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
27-27: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
34-34: Property class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
36-36: Parameter $pdo of method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
41-41: Method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::configure() has no return type specified. (missingType.return)
43-43: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::bind(). (method.notFound)
43-43: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
44-44: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::install(). (method.notFound)
45-45: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::bind(). (method.notFound)
45-45: Class Ray\Query\FakeBar not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
48-48: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
49-49: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
49-49: Class Ray\Query\FakeRo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
50-50: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
50-50: Class Ray\Query\FakeBar not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
55-55: Call to method onGet() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
57-57: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
58-58: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
63-63: Call to method onGet() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
64-64: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
65-65: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
66-66: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
71-71: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::expectException(). (method.notFound)
72-72: Call to method noSql() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
77-77: Call to method withQuery() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
78-78: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
79-79: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
80-80: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
85-85: Call to method getIntercepted() on an unknown class Ray\Query\FakeBar. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
86-86: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
src/CallableQueryModule.php
20-20: Class Ray\Query\CallableQueryModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Parameter $module of method Ray\Query\CallableQueryModule::__construct() has invalid type Ray\Di\AbstractModule. (class.notFound)
35-35: Ray\Query\CallableQueryModule::__construct() calls parent::__construct() but Ray\Query\CallableQueryModule does not extend any class. (class.noParent)
41-41: Method Ray\Query\CallableQueryModule::configure() has no return type specified. (missingType.return)
43-43: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
43-43: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
44-44: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
49-49: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
57-57: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
63-63: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
71-71: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
75-75: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
src/QueryInterceptor.php
23-23: Class Ray\Query\QueryInterceptor implements unknown interface Ray\Aop\MethodInterceptor. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Property Ray\Query\QueryInterceptor::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Parameter $pdo of method Ray\Query\QueryInterceptor::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
40-40: Parameter $invocation of method Ray\Query\QueryInterceptor::invoke() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
42-42: Call to method getMethod() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
46-46: Call to method getNamedArguments() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
61-61: Parameter $invocation of method Ray\Query\QueryInterceptor::getQueryResult() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
65-65: Call to method getThis() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
67-67: Class BEAR\Resource\ResourceObject not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
75-75: Method Ray\Query\QueryInterceptor::returnRo() has invalid return type BEAR\Resource\ResourceObject. (class.notFound)
75-75: Parameter $invocation of method Ray\Query\QueryInterceptor::returnRo() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
75-75: Parameter $ro of method Ray\Query\QueryInterceptor::returnRo() has invalid type BEAR\Resource\ResourceObject. (class.notFound)
81-81: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
81-81: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
83-83: Call to method proceed() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
83-83: PHPDoc tag @var for variable $ro contains unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
88-88: Method Ray\Query\QueryInterceptor::return404() has invalid return type BEAR\Resource\ResourceObject. (class.notFound)
88-88: Parameter $ro of method Ray\Query\QueryInterceptor::return404() has invalid type BEAR\Resource\ResourceObject. (class.notFound)
90-90: Access to property $code on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
90-90: Access to property $code on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
91-91: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
91-91: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
103-103: Function uri_template not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
112-112: Parameter $method of method Ray\Query\QueryInterceptor::getsql() has invalid type Ray\Aop\ReflectionMethod. (class.notFound)
tests/SqlQueryModuleTest.php
20-20: Class Ray\Query\SqlQueryModuleTest extends unknown class PHPUnit\Framework\TestCase. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
23-23: Property Ray\Query\SqlQueryModuleTest::$module has unknown class Ray\Di\AbstractModule as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
27-27: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Property Ray\Query\SqlQueryModuleTest::$module (Ray\Di\AbstractModule) does not accept class@anonymous/tests/SqlQueryModuleTest.php:33. (assign.propertyType)
35-35: Property class@anonymous/tests/SqlQueryModuleTest.php:33::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
37-37: Parameter $pdo of method class@anonymous/tests/SqlQueryModuleTest.php:33::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
42-42: Method class@anonymous/tests/SqlQueryModuleTest.php:33::configure() has no return type specified. (missingType.return)
44-44: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:33::bind(). (method.notFound)
44-44: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
45-45: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:33::install(). (method.notFound)
52-52: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Class Ray\Query\FakeTodoRepository not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
60-60: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
61-61: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
61-61: Class Ray\Query\FakeTodoRepositoryAttr not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: PHPDoc tag @var for variable $todo contains unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
69-69: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: Access to property $todoList on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
71-71: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertSame(). (method.notFound)
72-72: Access to property $todoItem on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
73-73: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertSame(). (method.notFound)
78-78: Call to an undefined method Ray\Query\SqlQueryModuleTest::expectException(). (method.notFound)
79-79: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
80-80: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
80-80: Class Ray\Query\FakeTodoProviderSqlNotFound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
85-85: Call to an undefined method Ray\Query\SqlQueryModuleTest::expectException(). (method.notFound)
86-86: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Class Ray\Query\FakeTodoProviderSqlNotAnnotated not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
92-92: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
93-93: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
94-94: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
98-98: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
99-99: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
101-101: Property class@anonymous/tests/SqlQueryModuleTest.php:99::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
103-103: Parameter $pdo of method class@anonymous/tests/SqlQueryModuleTest.php:99::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
108-108: Method class@anonymous/tests/SqlQueryModuleTest.php:99::configure() has no return type specified. (missingType.return)
110-110: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:99::bind(). (method.notFound)
110-110: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
111-111: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:99::install(). (method.notFound)
112-112: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:99::override(). (method.notFound)
115-115: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
116-116: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
116-116: Class Ray\Query\FakeTodoRepository not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
117-117: Class Ray\Query\FakeTodoRepository not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
118-118: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
119-119: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertStringContainsString(). (method.notFound)
LanguageTool
README.md
[style] ~15-~15: Unless you want to emphasize “not”, use “cannot” which is more common. (CAN_NOT_PREMIUM)
Context: ...odule. It provides storage access which can not be provided by static conversion by PHP...
[uncategorized] ~20-~20: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...code. * Execution objects are generated automatically so you do not need to write procedural ...
[grammar] ~30-~30: There seems to be a noun/verb agreement error. Did you mean “installs” or “installed”? (SINGULAR_NOUN_VERB_AGREEMENT)
Context: ...er require ray/query-module ### Module install (SQL) ```php use Ray\Di\AbstractModule...
[grammar] ~50-~50: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”? (TO_DO_HYPHEN)
Context: ...e SQL files in one directory. $sqlDir/todo_insert.sql ```sql INSERT INTO todo (id...
[grammar] ~56-~56: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”? (TO_DO_HYPHEN)
Context: ...itle) VALUES (:id, :title)$sqlDir/todo_item_by_id.sql
sql SELECT * FROM to...
[grammar] ~132-~132: The past participle is required after “can be”. (BE_VBP_IN)
Context: ...object Entire method invocation can be override with callable object in specified with ...
[uncategorized] ~243-~243: Possible missing article found. (AI_HYDRA_LEO_MISSING_THE)
Context: ...her dependencies are needed, we bind to PHP class and use dependency as a service. ...
Markdownlint
README.md
62-62: Expected: h3; Actual: h4 (MD001, heading-increment)
Heading levels should only increment by one level at a time
23-23: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
49-49: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
64-64: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
149-149: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
322-322: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines
28-28: null (MD014, commands-show-output)
Dollar signs used before commands without showing output
45-45: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
281-281: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
44-44: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
280-280: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
288-288: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
189-189: null (MD038, no-space-in-code)
Spaces inside code span elements
265-265: null (MD038, no-space-in-code)
Spaces inside code span elements
318-318: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
32-32: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
52-52: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
58-58: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
67-67: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
98-98: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
114-114: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
134-134: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
150-150: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
162-162: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
174-174: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
191-191: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
212-212: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
228-228: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
245-245: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
267-267: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
278-278: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
286-286: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
291-291: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
299-299: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
307-307: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
312-312: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
318-318: Expected: indented; Actual: fenced (MD046, code-block-style)
Code block style
Additional comments not posted (39)
phpstan.neon (1)
6-6
: Parameter rename aligns with PHPStan's latest standards.Verification successful
Let's verify the configuration changes by checking the
phpstan.neon
file for the correct usage of theexcludePaths
parameter.
The
excludePaths
parameter is correctly set in thephpstan.neon
file, listing the paths to be excluded.
excludePaths
:
%currentWorkingDirectory%/tests/tmp/*
%currentWorkingDirectory%/tests/Fake/*
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all paths are correctly excluded in the new PHPStan configuration. # Test: Check for any PHPStan errors that might indicate misconfigured paths. phpstan analyse -c phpstan.neonLength of output: 108
Script:
#!/bin/bash # Description: Verify the presence and correctness of the `excludePaths` parameter in the `phpstan.neon` file. # Check if the `excludePaths` parameter is correctly set in the `phpstan.neon` file. grep -A 5 'excludePaths:' phpstan.neonLength of output: 143
src/GetSqlInterface.php (1)
7-10
: Interface definition is clear and follows good practices.src/SqlFinderInterface.php (1)
9-12
: Innovative interface design that allows dynamic determination of SQL queries..github/workflows/continuous-integration.yml (1)
Line range hint
5-10
: Using a centralized workflow template enhances consistency and simplifies updates.demo/Todo.php (2)
11-11
: The use of PHP 8 attributes enhances clarity and modernizes the codebase.
16-16
: The attribute-based syntax for templated queries is more expressive and aligns with modern PHP practices.src/GetSql.php (1)
14-17
: Consider adding error handling for file read operations inGetSql
. This can prevent runtime errors if the SQL file is missing or unreadable.- return (string) file_get_contents($filePath); + $content = file_get_contents($filePath); + if ($content === false) { + throw new \RuntimeException("Failed to read SQL file: " . $filePath); + } + return (string) $content;src/Exception/SqlFileNotFoundException.php (1)
14-19
: Enhancing the exception with SQL context is a good practice for better error diagnostics.src/SqlFileNameModule.php (1)
10-18
: Ensure that the superclassAbstractModule
and the methodbind
are correctly recognized by your development environment. This might involve checking the namespace imports and project dependencies.+ use Ray\Di\AbstractModule; + use Ray\Di\Scope;Verification successful
Ensure that the external dependencies, particularly the
Ray\Di
library, are correctly installed and configured in your project. The classesAbstractModule
andScope
appear to be part of this library.
src/SqlFileNameModule.php
: Ensureuse Ray\Di\AbstractModule;
anduse Ray\Di\Scope;
are present.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if the necessary classes are available in the project. fd --type file --name "AbstractModule.php" fd --type file --name "Scope.php"Length of output: 578
Script:
#!/bin/bash # Description: Correctly check if the necessary classes are available in the project. fd --type file "AbstractModule.php" fd --type file "Scope.php"Length of output: 62
Script:
#!/bin/bash # Description: Search for class definitions and imports related to AbstractModule and Scope. ast-grep --lang php --pattern 'class AbstractModule { $$$ }' ast-grep --lang php --pattern 'class Scope { $$$ }' rg 'use Ray\\Di\\AbstractModule' rg 'use Ray\\Di\\Scope'Length of output: 1455
Tools
PHPStan
10-10: Class Ray\Query\SqlFileNameModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Call to an undefined method Ray\Query\SqlFileNameModule::bind(). (method.notFound)
src/SqlFileName.php (1)
11-11
: Good use oftrim
to ensure clean SQL content.Also applies to: 20-20
src/GetSqlWithFileName.php (1)
13-13
: Consistent use oftrim
andfile_get_contents
across similar functionalities.Also applies to: 18-23
tests/Fake/FakeBar.php (1)
19-21
: Using both annotation and attribute forQuery
. Confirm if this is intended for backward compatibility.tests/Fake/FakeTodoRepository.php (1)
27-27
: Constructor correctly initializes properties with appropriate types.src/SqlQueryRow.php (2)
32-32
: Verify the existence and correct usage offetchAssoc
method onExtendedPdoInterface
.Tools
PHPStan
32-32: Call to method fetchAssoc() on an unknown class Aura\Sql\ExtendedPdoInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
Line range hint
17-17
: EnsureExtendedPdoInterface
is correctly included or aliased in the project.Also applies to: 22-22
Verification successful
The
ExtendedPdoInterface
is part of theAura\Sql
package, as indicated by the import statements found in multiple files. This confirms thatExtendedPdoInterface
is an external dependency from the Aura.Sql library.
src/SqlQueryRow.php:use Aura\Sql\ExtendedPdoInterface;
This means the interface is correctly referenced and should be available if the Aura.Sql package is properly included in the project dependencies.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of `ExtendedPdoInterface`. # Test: Search for the interface definition. Expect: At least one definition found. fd 'ExtendedPdoInterface.php' --exec cat {}Length of output: 45
Script:
#!/bin/bash # Description: Search for the definition of `ExtendedPdoInterface` in the codebase. # Test: Search for the interface definition. Expect: At least one definition found. ast-grep --lang php --pattern 'interface ExtendedPdoInterface { $$$ }'Length of output: 179
Script:
#!/bin/bash # Description: Search for the definition of `ExtendedPdoInterface` in the codebase using ripgrep. # Test: Search for the interface definition. Expect: At least one definition found. rg 'interface ExtendedPdoInterface'Length of output: 37
Script:
#!/bin/bash # Description: Check for any composer dependencies that might include `ExtendedPdoInterface`. # Test: Search the composer.json file for relevant packages. rg 'ExtendedPdoInterface' composer.jsonLength of output: 39
Script:
#!/bin/bash # Description: Search for any usage or import statements of `ExtendedPdoInterface` in the codebase. # Test: Search for `ExtendedPdoInterface` usage or import statements. rg 'ExtendedPdoInterface'Length of output: 2003
Tools
PHPStan
32-32: Call to method fetchAssoc() on an unknown class Aura\Sql\ExtendedPdoInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolsdemo/2-query-annotation.php (1)
20-20
: Configuration setup correctly binds SQL modules and theTodo
class.tests/Fake/FakeRo.php (3)
24-24
: Updated annotations to the new attribute syntax correctly.Also applies to: 42-42
26-26
: Verify the intention behind using a non-existent SQL ID in the annotation.Also applies to: 28-28
34-34
: Templated SQL queries are used correctly.Also applies to: 36-36
demo/0-manual-injection.php (2)
6-6
: EnsureQueryInterface
is properly imported and used throughout the project.
14-15
: Constructor parameter type changed toQueryInterface
. Confirm that all usages ofcreateTodo
andtodoItem
are compatible with this interface.Verification successful
The extracted code snippets show that
createTodo
andtodoItem
are consistently used as callables, which aligns with the expected behavior ofQueryInterface
. Therefore, the change in constructor parameter type toQueryInterface
is compatible with their usage.
- : The usages of
createTodo
andtodoItem
are compatible withQueryInterface
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all usages of `createTodo` and `todoItem` are compatible with `QueryInterface`. # Test: Search for the function usage. Expect: Only occurances compatible with `QueryInterface`. rg --type php $'createTodo|todoItem'Length of output: 1625
Script:
#!/bin/bash # Extract and display the relevant code snippets for `createTodo` and `todoItem` to verify compatibility with `QueryInterface`. # Extract usages in tests/Fake/FakeTodoRepository.php echo "File: tests/Fake/FakeTodoRepository.php" rg --context 5 'createTodo|todoItem' tests/Fake/FakeTodoRepository.php # Extract usages in tests/SqlQueryModuleTest.php echo "File: tests/SqlQueryModuleTest.php" rg --context 5 'createTodo|todoItem' tests/SqlQueryModuleTest.php # Extract usages in tests/Fake/FakeTodoRepositoryAttr.php echo "File: tests/Fake/FakeTodoRepositoryAttr.php" rg --context 5 'createTodo|todoItem' tests/Fake/FakeTodoRepositoryAttr.php # Extract usages in tests/Fake/FakeQuery.php echo "File: tests/Fake/FakeQuery.php" rg --context 5 'createTodo|todoItem' tests/Fake/FakeQuery.php # Extract usages in demo/1-constructor-injection.php echo "File: demo/1-constructor-injection.php" rg --context 5 'createTodo|todoItem' demo/1-constructor-injection.php # Extract usages in demo/0-manual-injection.php echo "File: demo/0-manual-injection.php" rg --context 5 'createTodo|todoItem' demo/0-manual-injection.phpLength of output: 3565
src/SqlQueryModule.php (3)
7-10
: Imports forParamReader
andScope
are correctly added. Ensure these classes are available in the project.
17-17
: Constructor correctly initializessqlDir
and calls the parent constructor. EnsureAbstractModule
is correctly imported.Tools
PHPStan
17-17: Parameter $module of method Ray\Query\SqlQueryModule::__construct() has invalid type Ray\Di\AbstractModule. (class.notFound)
29-38
: Bindings in theconfigure
method are set correctly. Ensure that all bound classes and interfaces are correctly imported and available.Tools
PHPStan
29-29: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
30-30: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
31-31: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
32-32: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
32-32: Class Koriym\ParamReader\ParamReader not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Class Koriym\ParamReader\ParamReaderInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
34-34: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
35-35: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
36-36: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
38-38: Call to an undefined method Ray\Query\SqlQueryModule::install(). (method.notFound)
src/SqlFinder.php (2)
16-35
: The constructor correctly initializesreader
,sqlDir
, andgetSql
. Ensure that all dependencies are correctly imported and available.Tools
PHPStan
19-19: Property Ray\Query\SqlFinder::$reader has unknown class Koriym\ParamReader\ParamReaderInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Parameter $reader of method Ray\Query\SqlFinder::__construct() has invalid type Koriym\ParamReader\ParamReaderInterface. (class.notFound)
29-29: Parameter $reader of method Ray\Query\SqlFinder::__construct() has invalid type Koriym\ParamReader\ParamReaderInterface. (class.notFound)
50-53
: Exception handling and SQL file retrieval logic are correctly implemented. Ensure that thegetSql
method is robust and handles potential errors.demo/1-constructor-injection.php (3)
9-11
: Imports forSql
,QueryInterface
, and related classes are correctly added. Ensure these classes are available in the project.
41-41
: Installation ofSqlQueryModule
is correctly done. Ensure the module is correctly configured and integrated into the project.
19-21
: Constructor uses attributes to inject SQL queries. Confirm that all usages ofcreateTodo
andtodoItem
are compatible withQueryInterface
.Verification successful
The extracted code snippets show that
createTodo
andtodoItem
are consistently used as instances ofQueryInterface
. The usages in the filestests/SqlQueryModuleTest.php
,tests/Fake/FakeTodoRepository.php
,demo/0-manual-injection.php
,demo/1-constructor-injection.php
, andtests/Fake/FakeQuery.php
all align with the expected type and usage patterns forQueryInterface
.
- In
tests/SqlQueryModuleTest.php
,todoItem
is used as a callable, which is compatible withQueryInterface
.- In
tests/Fake/FakeTodoRepository.php
,todoItem
is injected asRowInterface
, which is a subtype ofQueryInterface
.- In
demo/0-manual-injection.php
anddemo/1-constructor-injection.php
, bothcreateTodo
andtodoItem
are used as callables, consistent withQueryInterface
.- In
tests/Fake/FakeQuery.php
,createTodo
is asserted to be callable, which is compatible withQueryInterface
.Therefore, all usages of
createTodo
andtodoItem
are compatible withQueryInterface
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all usages of `createTodo` and `todoItem` are compatible with `QueryInterface`. # Test: Search for the function usage. Expect: Only occurances compatible with `QueryInterface`. rg --type php $'createTodo|todoItem'Length of output: 1625
Script:
#!/bin/bash # Extract relevant code snippets to verify compatibility with QueryInterface # Extract usages in tests/SqlQueryModuleTest.php echo "File: tests/SqlQueryModuleTest.php" rg --context 5 'todoItem' tests/SqlQueryModuleTest.php # Extract usages in tests/Fake/FakeTodoRepository.php echo "File: tests/Fake/FakeTodoRepository.php" rg --context 5 'todoItem|createTodo' tests/Fake/FakeTodoRepository.php # Extract usages in demo/0-manual-injection.php echo "File: demo/0-manual-injection.php" rg --context 5 'todoItem|createTodo' demo/0-manual-injection.php # Extract usages in demo/1-constructor-injection.php echo "File: demo/1-constructor-injection.php" rg --context 5 'todoItem|createTodo' demo/1-constructor-injection.php # Extract usages in tests/Fake/FakeQuery.php echo "File: tests/Fake/FakeQuery.php" rg --context 5 'todoItem|createTodo' tests/Fake/FakeQuery.phpLength of output: 3108
tests/Fake/FakeTodo.php (2)
12-12
: Transition to PHP 8 attributes is correctly implemented forNamed
.
68-68
: Transition to PHP 8 attributes is correctly implemented forQuery
.src/SqlQueryRowList.php (1)
58-59
: Correct use ofpreg_replace
to clean SQL queries. Ensure that all dependencies, especiallyAura\Sql\ExtendedPdoInterface
, are correctly configured in your project.Verification successful
The dependency
Aura\Sql\ExtendedPdoInterface
is correctly configured and used across multiple files in the project.
tests/SqlQueryInterceptModuleTest.php
src/SqlQueryRow.php
src/SqlQueryRowList.php
tests/SqlQueryModuleTest.php
src/RowInterfaceProvider.php
src/QueryInterceptor.php
src/RowListInterfaceProvider.php
tests/Iso8601FormatModuleTest.php
demo/2-query-annotation.php
demo/1-constructor-injection.php
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all dependencies are correctly configured. # Test: Search for the dependency configuration. Expect: Configuration files that include `Aura\Sql\ExtendedPdoInterface`. rg --type php 'Aura\\Sql\\ExtendedPdoInterface'Length of output: 692
src/RowInterfaceProvider.php (1)
44-63
: Enhanced error handling and dependency injection are well-implemented. Ensure that all dependencies, especiallyRay\Di\InjectorInterface
, are correctly configured in your project.Tools
PHPStan
47-47: Call to method getParameter() on an unknown class Ray\Di\InjectionPointInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Call to method getInstance() on an unknown class Ray\Di\InjectorInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
57-57: Caught class Ray\Di\Exception\Unbound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolstests/Iso8601FormatModuleTest.php (1)
45-45
: Correct configuration of new modules in the test setup. Ensure that all dependencies, especiallyRay\Di\Injector
, are correctly configured in your project.Verification successful
The search results indicate that
Ray\Di\Injector
is used in multiple test files, includingtests/Iso8601FormatModuleTest.php
. To ensure that it is correctly configured and not causing any issues, we need to verify its usage in thetests/Iso8601FormatModuleTest.php
file.
To ensure that
Ray\Di\Injector
is correctly configured and used in thetests/Iso8601FormatModuleTest.php
file, we need to extract the complete class definition and review its methods.
The
Iso8601FormatModuleTest
class correctly usesRay\Di\Injector
within itstestItem
method. TheInjector
is instantiated with the configured module, and it retrieves an instance ofFakeTodo
to perform the test.The configuration and usage of
Ray\Di\Injector
appear to be correct and consistent with the intended functionality.
Injector
is instantiated with the module and a temporary directory.- The module is configured with necessary bindings and installations.
- The test method verifies the expected behavior.
No issues were found with the configuration of
Ray\Di\Injector
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all dependencies are correctly configured. # Test: Search for the dependency configuration. Expect: Configuration files that include `Ray\Di\Injector`. rg --type php 'Ray\\Di\\Injector'Length of output: 593
Script:
#!/bin/bash # Description: Verify the usage of Ray\Di\Injector in the tests/Iso8601FormatModuleTest.php file. # Extract the relevant lines where Ray\Di\Injector is used in the tests/Iso8601FormatModuleTest.php file. rg --type php 'Ray\\Di\\Injector' -A 10 tests/Iso8601FormatModuleTest.phpLength of output: 287
Script:
#!/bin/bash # Description: Extract the complete class definition of Iso8601FormatModuleTest to review the usage of Ray\Di\Injector. # Extract the complete class definition of Iso8601FormatModuleTest. rg --type php 'class Iso8601FormatModuleTest extends TestCase' -A 50 tests/Iso8601FormatModuleTest.phpLength of output: 1799
Tools
PHPStan
45-45: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
composer.json (2)
3-3
: Updated description accurately reflects the module's functionality.
66-70
: Additions in theextra
section enhance configuration capabilities.src/QueryInterceptor.php (1)
7-36
: Ensure correct namespaces or imports forExtendedPdoInterface
andSqlDir
.Static analysis indicates that the classes
ExtendedPdoInterface
andSqlDir
might not be recognized. This could be due to missing imports or incorrect namespaces. Verify their existence and correct the namespaces if necessary.Tools
PHPStan
23-23: Class Ray\Query\QueryInterceptor implements unknown interface Ray\Aop\MethodInterceptor. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Property Ray\Query\QueryInterceptor::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Parameter $pdo of method Ray\Query\QueryInterceptor::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
tests/SqlQueryModuleTest.php (2)
13-31
: Check the usage and import ofExtendedPdo
.Static analysis indicates that the
ExtendedPdo
class might not be recognized. Verify that this class is correctly imported and used within the project.Verification successful
The
ExtendedPdo
class is correctly imported from theAura\Sql
namespace in thetests/SqlQueryModuleTest.php
file. The class definition itself was not found in the search, but the import statements indicate that it is being used correctly.
tests/SqlQueryModuleTest.php: use Aura\Sql\ExtendedPdo;
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence and correct import of `ExtendedPdo`. # Test: Search for the class definition. Expect: Definition found. ast-grep --lang php --pattern $'class $_ { $$$ }' | rg 'ExtendedPdo'Length of output: 174
Script:
#!/bin/bash # Description: Verify the existence and correct import of `ExtendedPdo`. # Test: Search for the class definition. Expect: Definition found. rg 'class ExtendedPdo' # Test: Search for the import statement. Expect: Import found. rg 'use .*ExtendedPdo'Length of output: 974
Tools
PHPStan
20-20: Class Ray\Query\SqlQueryModuleTest extends unknown class PHPUnit\Framework\TestCase. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
23-23: Property Ray\Query\SqlQueryModuleTest::$module has unknown class Ray\Di\AbstractModule as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
27-27: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
50-87
: Verify the correct implementation and dependencies ofInjector
.Static analysis suggests issues with the
Injector
class and the classes it tries to instantiate. Ensure that all dependencies are correctly configured and that theInjector
class is properly implemented.Verification successful
The
Injector
class appears to be part of an external library (Ray\Di\Injector
). The search results show multiple usages of this class in various test files, but we did not find the actual class definition within the codebase. This suggests that theInjector
class is correctly imported from an external dependency.
tests/SqlQueryInterceptModuleTest.php
tests/SqlQueryModuleTest.php
tests/WebQueryModuleTest.php
tests/Iso8601FormatModuleTest.php
tests/PhpQueryModuleTest.php
demo/2-query-annotation.php
demo/1-constructor-injection.php
Please ensure that the
Ray\Di\Injector
library is correctly included in your project dependencies (e.g., via Composer).Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct implementation of `Injector`. # Test: Search for the class definition and its usage. Expect: Correct implementation and usage. ast-grep --lang php --pattern $'class $_ { $$$ }' | rg 'Injector'Length of output: 171
Script:
#!/bin/bash # Description: Verify the correct implementation of `Injector`. # Search for the class definition of `Injector` rg 'class Injector' -t php # Search for the usage of `Injector` in the codebase rg 'Injector' -t phpLength of output: 2649
Tools
PHPStan
52-52: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Class Ray\Query\FakeTodoRepository not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
60-60: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
61-61: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
61-61: Class Ray\Query\FakeTodoRepositoryAttr not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: PHPDoc tag @var for variable $todo contains unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
69-69: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: Access to property $todoList on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
71-71: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertSame(). (method.notFound)
72-72: Access to property $todoItem on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
73-73: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertSame(). (method.notFound)
78-78: Call to an undefined method Ray\Query\SqlQueryModuleTest::expectException(). (method.notFound)
79-79: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
80-80: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
80-80: Class Ray\Query\FakeTodoProviderSqlNotFound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
85-85: Call to an undefined method Ray\Query\SqlQueryModuleTest::expectException(). (method.notFound)
86-86: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Class Ray\Query\FakeTodoProviderSqlNotAnnotated not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
The GetSql class and interface have been renamed to FileGetContents to better describe the functionality they provide. Associated classes and tests have been updated for this change. A new exception, SqlFileNotReadableException, has been introduced to address issues when files cannot be read. Also, the contents manipulation from GetSqlWithFileName constructor and SqlFileName class have been shifted to the new FileGetContents class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (12)
- src/CallableQueryModule.php (1 hunks)
- src/Exception/SqlFileNotReadableException.php (1 hunks)
- src/FileGetContents.php (1 hunks)
- src/FileGetContentsInterface.php (1 hunks)
- src/FileGetContentsWithFileName.php (1 hunks)
- src/QueryInterceptor.php (4 hunks)
- src/SqlFileName.php (1 hunks)
- src/SqlFileNameModule.php (1 hunks)
- src/SqlFinder.php (2 hunks)
- src/SqlQueryModule.php (2 hunks)
- tests/Iso8601FormatModuleTest.php (2 hunks)
- tests/SqlQueryModuleTest.php (3 hunks)
Files not reviewed due to errors (1)
- tests/SqlQueryModuleTest.php (no review received)
Files skipped from review due to trivial changes (2)
- src/Exception/SqlFileNotReadableException.php
- src/FileGetContentsInterface.php
Additional context used
Learnings (2)
src/CallableQueryModule.php (1)
User: koriym PR: ray-di/Ray.QueryModule#32 File: src/CallableQueryModule.php:43-58 Timestamp: 2024-06-12T02:34:35.196Z Learning: Historical code in the `CallableQueryModule` is maintained for compatibility reasons and should not be suggested for refactoring.
tests/SqlQueryModuleTest.php (1)
User: koriym PR: ray-di/Ray.Compiler#112 File: tests/Fake/CompileVisitor/FakeQux.php:7-23 Timestamp: 2024-05-25T02:32:30.728Z Learning: The `InjectorInterface` in the `Ray\Di` namespace may not be directly visible in static analysis due to dynamic inclusion or being part of external dependencies. This was inferred from the user's assertion and the fact that related tests are passing.
PHPStan
src/SqlFileNameModule.php
10-10: Class Ray\Query\SqlFileNameModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Call to an undefined method Ray\Query\SqlFileNameModule::bind(). (method.notFound)
src/SqlQueryModule.php
12-12: Class Ray\Query\SqlQueryModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Parameter $module of method Ray\Query\SqlQueryModule::__construct() has invalid type Ray\Di\AbstractModule. (class.notFound)
21-21: Ray\Query\SqlQueryModule::__construct() calls parent::__construct() but Ray\Query\SqlQueryModule does not extend any class. (class.noParent)
27-27: Method Ray\Query\SqlQueryModule::configure() has no return type specified. (missingType.return)
29-29: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
30-30: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
30-30: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
31-31: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
32-32: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
33-33: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
33-33: Class Koriym\ParamReader\ParamReader not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Class Koriym\ParamReader\ParamReaderInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
34-34: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
35-35: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
36-36: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
37-37: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
39-39: Call to an undefined method Ray\Query\SqlQueryModule::install(). (method.notFound)
src/SqlFinder.php
19-19: Property Ray\Query\SqlFinder::$reader has unknown class Koriym\ParamReader\ParamReaderInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Parameter $reader of method Ray\Query\SqlFinder::__construct() has invalid type Koriym\ParamReader\ParamReaderInterface. (class.notFound)
29-29: Parameter $reader of method Ray\Query\SqlFinder::__construct() has invalid type Koriym\ParamReader\ParamReaderInterface. (class.notFound)
41-41: Call to method getParametrAnnotation() on an unknown class Koriym\ParamReader\ParamReaderInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolssrc/CallableQueryModule.php
19-19: Class Ray\Query\CallableQueryModule extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
27-27: Parameter $module of method Ray\Query\CallableQueryModule::__construct() has invalid type Ray\Di\AbstractModule. (class.notFound)
36-36: Ray\Query\CallableQueryModule::__construct() calls parent::__construct() but Ray\Query\CallableQueryModule does not extend any class. (class.noParent)
42-42: Method Ray\Query\CallableQueryModule::configure() has no return type specified. (missingType.return)
44-44: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
44-44: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
45-45: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
50-50: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
58-58: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
64-64: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
72-72: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
76-76: Call to an undefined method Ray\Query\CallableQueryModule::bind(). (method.notFound)
src/QueryInterceptor.php
22-22: Class Ray\Query\QueryInterceptor implements unknown interface Ray\Aop\MethodInterceptor. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Property Ray\Query\QueryInterceptor::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
34-34: Parameter $pdo of method Ray\Query\QueryInterceptor::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
44-44: Parameter $invocation of method Ray\Query\QueryInterceptor::invoke() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
46-46: Call to method getMethod() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
50-50: Call to method getNamedArguments() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
65-65: Parameter $invocation of method Ray\Query\QueryInterceptor::getQueryResult() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
69-69: Call to method getThis() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
71-71: Class BEAR\Resource\ResourceObject not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
79-79: Method Ray\Query\QueryInterceptor::returnRo() has invalid return type BEAR\Resource\ResourceObject. (class.notFound)
79-79: Parameter $invocation of method Ray\Query\QueryInterceptor::returnRo() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
79-79: Parameter $ro of method Ray\Query\QueryInterceptor::returnRo() has invalid type BEAR\Resource\ResourceObject. (class.notFound)
85-85: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
85-85: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Call to method proceed() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: PHPDoc tag @var for variable $ro contains unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
92-92: Method Ray\Query\QueryInterceptor::return404() has invalid return type BEAR\Resource\ResourceObject. (class.notFound)
92-92: Parameter $ro of method Ray\Query\QueryInterceptor::return404() has invalid type BEAR\Resource\ResourceObject. (class.notFound)
94-94: Access to property $code on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
94-94: Access to property $code on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
95-95: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
95-95: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
107-107: Function uri_template not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
116-116: Parameter $method of method Ray\Query\QueryInterceptor::getsql() has invalid type Ray\Aop\ReflectionMethod. (class.notFound)
tests/Iso8601FormatModuleTest.php
14-14: Class Ray\Query\Iso8601FormatModuleTest extends unknown class PHPUnit\Framework\TestCase. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
17-17: Property Ray\Query\Iso8601FormatModuleTest::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
20-20: Property Ray\Query\Iso8601FormatModuleTest::$module has unknown class Ray\Di\AbstractModule as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
24-24: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
25-25: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
30-30: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Property Ray\Query\Iso8601FormatModuleTest::$module (Ray\Di\AbstractModule) does not accept class@anonymous/tests/Iso8601FormatModuleTest.php:31. (assign.propertyType)
33-33: Property class@anonymous/tests/Iso8601FormatModuleTest.php:31::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
35-35: Parameter $pdo of method class@anonymous/tests/Iso8601FormatModuleTest.php:31::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
39-39: class@anonymous/tests/Iso8601FormatModuleTest.php:31::__construct() calls parent::__construct() but class@anonymous/tests/Iso8601FormatModuleTest.php:31 does not extend any class. (class.noParent)
42-42: Method class@anonymous/tests/Iso8601FormatModuleTest.php:31::configure() has no return type specified. (missingType.return)
44-44: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::bind(). (method.notFound)
44-44: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
45-45: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
46-46: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
53-53: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
54-54: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
54-54: Class Ray\Query\FakeTodo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: Call to method get() on an unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: PHPDoc tag @var for variable $todo contains unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
62-62: Call to an undefined method Ray\Query\Iso8601FormatModuleTest::assertSame(). (method.notFound)
67-67: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Class Ray\Query\FakeTodo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: Call to method getList() on an unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: PHPDoc tag @var for variable $todo contains unknown class Ray\Query\FakeTodo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
78-78: Call to an undefined method Ray\Query\Iso8601FormatModuleTest::assertSame(). (method.notFound)
83-83: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
84-84: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
85-85: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
89-89: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
91-91: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
93-93: Property class@anonymous/tests/Iso8601FormatModuleTest.php:91::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
95-95: Parameter $pdo of method class@anonymous/tests/Iso8601FormatModuleTest.php:91::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
99-99: class@anonymous/tests/Iso8601FormatModuleTest.php:91::__construct() calls parent::__construct() but class@anonymous/tests/Iso8601FormatModuleTest.php:91 does not extend any class. (class.noParent)
102-102: Method class@anonymous/tests/Iso8601FormatModuleTest.php:91::configure() has no return type specified. (missingType.return)
104-104: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:91::bind(). (method.notFound)
104-104: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
105-105: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:91::install(). (method.notFound)
106-106: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:91::install(). (method.notFound)
109-109: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
110-110: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
110-110: Class Ray\Query\FakeTodo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
111-111: Call to an undefined method Ray\Query\Iso8601FormatModuleTest::assertInstanceOf(). (method.notFound)
111-111: Class Ray\Query\FakeTodo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolstests/SqlQueryModuleTest.php
20-20: Class Ray\Query\SqlQueryModuleTest extends unknown class PHPUnit\Framework\TestCase. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
23-23: Property Ray\Query\SqlQueryModuleTest::$module has unknown class Ray\Di\AbstractModule as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
27-27: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Property Ray\Query\SqlQueryModuleTest::$module (Ray\Di\AbstractModule) does not accept class@anonymous/tests/SqlQueryModuleTest.php:33. (assign.propertyType)
35-35: Property class@anonymous/tests/SqlQueryModuleTest.php:33::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
37-37: Parameter $pdo of method class@anonymous/tests/SqlQueryModuleTest.php:33::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
42-42: Method class@anonymous/tests/SqlQueryModuleTest.php:33::configure() has no return type specified. (missingType.return)
44-44: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:33::bind(). (method.notFound)
44-44: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
45-45: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:33::install(). (method.notFound)
52-52: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
53-53: Class Ray\Query\FakeTodoRepository not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
60-60: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
61-61: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
61-61: Class Ray\Query\FakeTodoRepositoryAttr not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: PHPDoc tag @var for variable $todo contains unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
69-69: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
70-70: Access to property $todoList on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
71-71: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertSame(). (method.notFound)
72-72: Access to property $todoItem on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
73-73: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertSame(). (method.notFound)
78-78: Call to an undefined method Ray\Query\SqlQueryModuleTest::expectException(). (method.notFound)
79-79: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
80-80: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
80-80: Class Ray\Query\FakeTodoProviderSqlNotFound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
85-85: Call to an undefined method Ray\Query\SqlQueryModuleTest::expectException(). (method.notFound)
86-86: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Class Ray\Query\FakeTodoProviderSqlNotAnnotated not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
92-92: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
93-93: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
94-94: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
98-98: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
99-99: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
101-101: Property class@anonymous/tests/SqlQueryModuleTest.php:99::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
103-103: Parameter $pdo of method class@anonymous/tests/SqlQueryModuleTest.php:99::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
108-108: Method class@anonymous/tests/SqlQueryModuleTest.php:99::configure() has no return type specified. (missingType.return)
110-110: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:99::bind(). (method.notFound)
110-110: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
111-111: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:99::install(). (method.notFound)
112-112: Call to an undefined method class@anonymous/tests/SqlQueryModuleTest.php:99::override(). (method.notFound)
115-115: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
116-116: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
116-116: Class Ray\Query\FakeTodoRepository not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
117-117: Class Ray\Query\FakeTodoRepository not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
118-118: Access to property $todoCreate on an unknown class Ray\Query\FakeTodoRepository. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
119-119: Call to an undefined method Ray\Query\SqlQueryModuleTest::assertStringContainsString(). (method.notFound)
Additional comments not posted (13)
src/SqlQueryModule.php (3)
7-10
: Ensure all imports are correctly referenced and available in the project.Verification successful
The imported classes
ParamReader
,ParamReaderInterface
,AbstractModule
, andScope
are part of the external librarieskoriym/param-reader
andray/di
, as confirmed by their presence in thecomposer.json
file.
koriym/param-reader
: "^1.0"ray/di
: "^2.11"These dependencies ensure that the necessary classes and interfaces are available in the project.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of imported classes. # Test: Search for the imported classes. Expect: Definitions or references to these classes. fd --type f --exec grep -H "class AbstractModule" {} fd --type f --exec grep -H "class Scope" {} fd --type f --exec grep -H "class ParamReader" {} fd --type f --exec grep -H "class ParamReaderInterface" {}Length of output: 221
Script:
#!/bin/bash # Description: Verify the existence of imported classes or interfaces, considering namespaces. # Test: Search for the imported classes or interfaces. Expect: Definitions or references to these classes or interfaces. fd --type f --exec grep -H -E "class AbstractModule|interface AbstractModule" {} fd --type f --exec grep -H -E "class Scope|interface Scope" {} fd --type f --exec grep -H -E "class ParamReader|interface ParamReader" {} fd --type f --exec grep -H -E "class ParamReaderInterface|interface ParamReaderInterface" {}Length of output: 327
Script:
#!/bin/bash # Description: Verify the existence of imported classes or interfaces in the project's dependencies. # Test: Search for the dependencies in the composer.json file. Expect: References to the required libraries. grep -E '"koriym/param-reader|ray/di"' composer.jsonLength of output: 119
17-17
: The constructor correctly initializes thesqlDir
property and optionally accepts a module. Ensure that theAbstractModule
is correctly imported to avoid runtime errors.Verification successful
The
AbstractModule
is correctly imported insrc/SqlQueryModule.php
and is defined in the codebase.
src/SqlQueryModule.php
contains the lineuse Ray\Di\AbstractModule;
.- The
AbstractModule
class is defined in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct import of `AbstractModule`. # Test: Search for the `AbstractModule` class definition. Expect: At least one occurrence. fd --type f --exec grep -H "class AbstractModule" {}Length of output: 56
Script:
#!/bin/bash # Description: Verify the correct import of `AbstractModule`. # Test 1: Search for the `AbstractModule` class definition in the codebase. rg "class AbstractModule" # Test 2: Check if `AbstractModule` is imported in `src/SqlQueryModule.php`. rg "AbstractModule" src/SqlQueryModule.phpLength of output: 221
Tools
PHPStan
17-17: Parameter $module of method Ray\Query\SqlQueryModule::__construct() has invalid type Ray\Di\AbstractModule. (class.notFound)
29-39
: Review the bindings in theconfigure
method to ensure they are correctly set up and that all referenced classes and interfaces are available.Tools
PHPStan
29-29: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
30-30: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
30-30: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
31-31: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
32-32: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
33-33: Access to constant SINGLETON on an unknown class Ray\Di\Scope. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
33-33: Class Koriym\ParamReader\ParamReader not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
33-33: Class Koriym\ParamReader\ParamReaderInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
34-34: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
35-35: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
36-36: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
37-37: Call to an undefined method Ray\Query\SqlQueryModule::bind(). (method.notFound)
39-39: Call to an undefined method Ray\Query\SqlQueryModule::install(). (method.notFound)
src/SqlFinder.php (2)
50-53
: Review the exception handling in the__invoke
method to ensure that it correctly handles SQL file not found scenarios and that theSqlFileNotFoundException
is appropriately thrown.
16-35
: Ensure that the constructor parameters are correctly typed and that all dependencies such asParamReaderInterface
,SqlDir
, andFileGetContentsInterface
are available.Verification successful
The
ParamReaderInterface
is referenced in the codebase but is imported from an external namespaceKoriym\ParamReader
. This indicates that it is not defined within the current repository but is likely part of an external library.
ParamReaderInterface
is imported fromKoriym\ParamReader
.SqlDir
andFileGetContentsInterface
are defined within the repository.Given this information, the constructor parameters in
SqlFinder
are correctly typed and their dependencies are available.
ParamReaderInterface
is imported fromKoriym\ParamReader
.SqlDir
is defined insrc/SqlDir.php
.FileGetContentsInterface
is defined insrc/FileGetContentsInterface.php
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct typing and availability of constructor parameters. # Test: Search for the definitions of `ParamReaderInterface`, `SqlDir`, and `FileGetContentsInterface`. Expect: Definitions or references to these interfaces and classes. fd --type f --exec grep -H "interface ParamReaderInterface" {} fd --type f --exec grep -H "class SqlDir" {} fd --type f --exec grep -H "interface FileGetContentsInterface" {}Length of output: 292
Script:
#!/bin/bash # Description: Verify the correct typing and availability of `ParamReaderInterface`. # Test: Search for the definitions of `ParamReaderInterface`. Expect: Definitions or references to this interface. fd --type f --exec grep -H "ParamReaderInterface" {}Length of output: 508
Tools
PHPStan
19-19: Property Ray\Query\SqlFinder::$reader has unknown class Koriym\ParamReader\ParamReaderInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Parameter $reader of method Ray\Query\SqlFinder::__construct() has invalid type Koriym\ParamReader\ParamReaderInterface. (class.notFound)
29-29: Parameter $reader of method Ray\Query\SqlFinder::__construct() has invalid type Koriym\ParamReader\ParamReaderInterface. (class.notFound)
src/CallableQueryModule.php (1)
82-96
: Review the custom file iteration methodfiles
to ensure it correctly iterates over SQL files in the specified directory.src/QueryInterceptor.php (2)
103-125
: Review the custom methodstemplated
andgetsql
to ensure they correctly handle templated queries and SQL file retrieval.Tools
PHPStan
107-107: Function uri_template not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
116-116: Parameter $method of method Ray\Query\QueryInterceptor::getsql() has invalid type Ray\Aop\ReflectionMethod. (class.notFound)
Line range hint
33-57
: Review the constructor to ensure that the parametersExtendedPdoInterface
,SqlDir
, andFileGetContentsInterface
are correctly typed and available. Also, verify the logic in theinvoke
method to ensure it correctly handles method invocations and SQL queries.Verification successful
The
ExtendedPdoInterface
is indeed referenced in the codebase, specifically from theAura\Sql
namespace. Theinvoke
method inQueryInterceptor
is also correctly defined.
ExtendedPdoInterface
is used in multiple files, includingsrc/QueryInterceptor.php
.- The
invoke
method is present insrc/QueryInterceptor.php
.This confirms that the constructor parameters and the
invoke
method logic are correctly implemented.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the constructor parameters and logic in the `invoke` method. # Test: Search for the definitions of `ExtendedPdoInterface`, `SqlDir`, and `FileGetContentsInterface`. Expect: Definitions or references to these interfaces and classes. fd --type f --exec grep -H "interface ExtendedPdoInterface" {} fd --type f --exec grep -H "class SqlDir" {} fd --type f --exec grep -H "interface FileGetContentsInterface" {}Length of output: 292
Script:
#!/bin/bash # Description: Verify the existence and definition of `ExtendedPdoInterface` and review the `invoke` method logic. # Test: Search for the definitions or references to `ExtendedPdoInterface`. Expect: Definitions or references to this interface. fd --type f --exec grep -H "ExtendedPdoInterface" {} # Test: Review the `invoke` method logic to ensure it correctly handles method invocations and SQL queries. fd --type f --exec grep -H "function invoke" {}Length of output: 2522
Tools
PHPStan
22-22: Class Ray\Query\QueryInterceptor implements unknown interface Ray\Aop\MethodInterceptor. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Property Ray\Query\QueryInterceptor::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
34-34: Parameter $pdo of method Ray\Query\QueryInterceptor::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
tests/Iso8601FormatModuleTest.php (5)
105-105
: Check the correct installation ofCallableQueryModule
withSqlFileName
.Verification successful
The search results confirm that
CallableQueryModule
is installed withSqlFileName
in thetests/Iso8601FormatModuleTest.php
file.
tests/Iso8601FormatModuleTest.php: $this->install(new CallableQueryModule(__DIR__ . '/Fake/sql', null, new SqlFileName()));
This verifies that the
CallableQueryModule
is correctly installed withSqlFileName
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct installation of `CallableQueryModule` with `SqlFileName`. # Test: Search for the module installation with `SqlFileName`. rg --type php $'this->install(new CallableQueryModule'Length of output: 157
Script:
#!/bin/bash # Description: Verify the correct installation of `CallableQueryModule` with `SqlFileName`. # Test: Search for the module installation with `SqlFileName`. rg --type php 'this->install\(new CallableQueryModule'Length of output: 315
Tools
PHPStan
105-105: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:91::install(). (method.notFound)
Line range hint
53-53
: Verify the existence and correct implementation ofFakeTodo
.Verification successful
The
FakeTodo
class exists in the codebase.
tests/Fake/FakeTodo.php
: class FakeTodoScripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if `FakeTodo` class exists and is correctly implemented. # Test: Search for the `FakeTodo` class definition. ast-grep --lang php --pattern $'class FakeTodo { $$$ }'Length of output: 163
Script:
#!/bin/bash # Description: Check if `FakeTodo` class exists and is correctly implemented. # Test: Search for the `FakeTodo` class definition using ripgrep. rg 'class FakeTodo'Length of output: 348
Tools
PHPStan
42-42: Method class@anonymous/tests/Iso8601FormatModuleTest.php:31::configure() has no return type specified. (missingType.return)
44-44: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::bind(). (method.notFound)
44-44: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
45-45: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
46-46: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
45-45
: EnsureCallableQueryModule
andIso8601FormatModule
are correctly configured.Verification successful
The configurations for
CallableQueryModule
andIso8601FormatModule
are correctly set up intests/Iso8601FormatModuleTest.php
.
CallableQueryModule
is installed with the path__DIR__ . '/Fake/sql'
andnull
ornew SqlFileName()
.Iso8601FormatModule
is installed with['created_at']
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct configuration of modules in the setup method. # Test: Search for the module configuration in the project. rg --type php $'this->install(new CallableQueryModule' rg --type php $'this->install(new Iso8601FormatModule'Length of output: 315
Script:
#!/bin/bash # Description: Verify the correct configuration of modules in the setup method. # Test: Search for the module configuration in the project. rg --type php 'this->install\(new CallableQueryModule' rg --type php 'this->install\(new Iso8601FormatModule'Length of output: 586
Tools
PHPStan
45-45: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
109-109
: Confirm the instantiation and functionality ofFakeTodo
.Verification successful
The
FakeTodo
class is defined intests/Fake/FakeTodo.php
and is referenced multiple times intests/Iso8601FormatModuleTest.php
. This confirms its instantiation and usage in the codebase.
tests/Fake/FakeTodo.php
: Definition ofFakeTodo
.tests/Iso8601FormatModuleTest.php
: Multiple references toFakeTodo
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Confirm the correct instantiation and functionality of `FakeTodo`. # Test: Search for the instantiation and usage of `FakeTodo`. ast-grep --lang php --pattern $'new FakeTodo()'Length of output: 155
Script:
#!/bin/bash # Description: Confirm the correct instantiation and functionality of `FakeTodo`. # Test: Search for the instantiation and usage of `FakeTodo`. rg 'new FakeTodo'Length of output: 19
Script:
#!/bin/bash # Description: Confirm the existence and usage of `FakeTodo` in the codebase. # Step 1: Search for the definition of `FakeTodo`. rg 'class FakeTodo' # Step 2: Search for any references to `FakeTodo`. rg 'FakeTodo'Length of output: 1837
Tools
PHPStan
109-109: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
Line range hint
67-67
: Ensure the list retrieval functionality is correctly implemented inFakeTodo
.Verification successful
The
getList
method is indeed present in theFakeTodo
class, specifically in thetests/Fake/FakeTodo.php
file.
- Location:
tests/Fake/FakeTodo.php
- Method:
public function getList(string $uuid)
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the list retrieval method in `FakeTodo`. # Test: Search for the `getList` method in `FakeTodo`. ast-grep --lang php --pattern $'class FakeTodo { $$$ getList($_) { $$$ } $$$ }'Length of output: 187
Script:
#!/bin/bash # Description: Verify the list retrieval method in `FakeTodo`. # Step 1: Identify the file containing the FakeTodo class. fake_todo_file=$(rg --files-with-matches 'class FakeTodo') # Step 2: Search for the getList method within that file. if [[ -n "$fake_todo_file" ]]; then rg 'function getList' "$fake_todo_file" else echo "FakeTodo class not found." fiLength of output: 883
Script:
#!/bin/bash # Description: Verify the list retrieval method in `FakeTodo`. # Step 1: Identify the files containing the FakeTodo class. fake_todo_files=$(rg --files-with-matches 'class FakeTodo') # Step 2: Search for the getList method within each identified file. for file in $fake_todo_files; do echo "Searching in $file" rg 'function getList' "$file" doneLength of output: 1299
Tools
PHPStan
42-42: Method class@anonymous/tests/Iso8601FormatModuleTest.php:31::configure() has no return type specified. (missingType.return)
44-44: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::bind(). (method.notFound)
44-44: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
45-45: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
46-46: Call to an undefined method class@anonymous/tests/Iso8601FormatModuleTest.php:31::install(). (method.notFound)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- src/FileGetContents.php (1 hunks)
- src/QueryInterceptor.php (4 hunks)
Files skipped from review due to trivial changes (1)
- src/FileGetContents.php
Additional context used
PHPStan
src/QueryInterceptor.php
23-23: Class Ray\Query\QueryInterceptor implements unknown interface Ray\Aop\MethodInterceptor. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
29-29: Property Ray\Query\QueryInterceptor::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
35-35: Property Ray\Query\QueryInterceptor::$injector has unknown class Ray\Di\InjectorInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
38-38: Parameter $pdo of method Ray\Query\QueryInterceptor::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
41-41: Parameter $injector of method Ray\Query\QueryInterceptor::__construct() has invalid type Ray\Di\InjectorInterface. (class.notFound)
50-50: Parameter $invocation of method Ray\Query\QueryInterceptor::invoke() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
52-52: Call to method getMethod() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: Call to method getNamedArguments() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
65-65: Call to method getInstance() on an unknown class Ray\Di\InjectorInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
67-67: Parameter #3 $param of method Ray\Query\QueryInterceptor::getQueryResult() expects array<string, mixed>, mixed given. (argument.type)
82-82: Parameter $invocation of method Ray\Query\QueryInterceptor::getQueryResult() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
86-86: Call to method getThis() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
88-88: Class BEAR\Resource\ResourceObject not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
96-96: Method Ray\Query\QueryInterceptor::returnRo() has invalid return type BEAR\Resource\ResourceObject. (class.notFound)
96-96: Parameter $invocation of method Ray\Query\QueryInterceptor::returnRo() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
96-96: Parameter $ro of method Ray\Query\QueryInterceptor::returnRo() has invalid type BEAR\Resource\ResourceObject. (class.notFound)
102-102: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
102-102: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
104-104: Call to method proceed() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
104-104: PHPDoc tag @var for variable $ro contains unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
109-109: Method Ray\Query\QueryInterceptor::return404() has invalid return type BEAR\Resource\ResourceObject. (class.notFound)
109-109: Parameter $ro of method Ray\Query\QueryInterceptor::return404() has invalid type BEAR\Resource\ResourceObject. (class.notFound)
111-111: Access to property $code on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
111-111: Access to property $code on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
112-112: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
112-112: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
124-124: Function uri_template not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
133-133: Method Ray\Query\QueryInterceptor::getsql() is unused. (method.unused)
133-133: Parameter $method of method Ray\Query\QueryInterceptor::getsql() has invalid type Ray\Aop\ReflectionMethod. (class.notFound)
GitHub Check: sa / Psalm
src/QueryInterceptor.php
[failure] 67-67:
MixedArgument: Argument 3 of Ray\Query\QueryInterceptor::getQueryResult cannot be mixed, expecting array<string, mixed>
GitHub Check: sa / PHPStan
src/QueryInterceptor.php
[failure] 67-67:
Parameter #3 $param of method Ray\Query\QueryInterceptor::getQueryResult() expects array<string, mixed>, mixed given.
[failure] 133-133:
Method Ray\Query\QueryInterceptor::getsql() is unused.
Additional comments not posted (2)
src/QueryInterceptor.php (2)
37-45
: Constructor parameters and property types should be verified for correctness.Verification successful
The types
ExtendedPdoInterface
andInjectorInterface
are imported from external libraries (Aura\Sql
andRay\Di
, respectively). This confirms that the constructor parameters and property types inQueryInterceptor
are correctly defined.
ExtendedPdoInterface
is imported fromAura\Sql
.InjectorInterface
is imported fromRay\Di
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct types for constructor parameters and properties. # Search for the definitions of the types used in the constructor. fd --type f --exec grep -H "interface ExtendedPdoInterface" {} fd --type f --exec grep -H "class SqlDir" {} fd --type f --exec grep -H "interface FileGetContentsInterface" {} fd --type f --exec grep -H "interface InjectorInterface" {}Length of output: 356
Script:
#!/bin/bash # Description: Verify the correct types for constructor parameters and properties. # Search for the definitions of the types used in the constructor with more comprehensive patterns. fd --type f --exec grep -H -E 'interface ExtendedPdoInterface|class ExtendedPdoInterface' {} fd --type f --exec grep -H -E 'interface InjectorInterface|class InjectorInterface' {}Length of output: 187
Script:
#!/bin/bash # Description: Verify the origins of the types used in the constructor parameters. # Search for import statements related to ExtendedPdoInterface and InjectorInterface. fd --type f --exec grep -H -E 'use .*ExtendedPdoInterface' {} fd --type f --exec grep -H -E 'use .*InjectorInterface' {}Length of output: 1045
Tools
PHPStan
38-38: Parameter $pdo of method Ray\Query\QueryInterceptor::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
41-41: Parameter $injector of method Ray\Query\QueryInterceptor::__construct() has invalid type Ray\Di\InjectorInterface. (class.notFound)
7-15
: Ensure all used classes are properly imported.
A check for file existence has been added to the FileGetContents class. Now, before file content is retrieved, the system will check whether the file exists. This reduces the likelihood of encountering a SqlFileNotReadableException.
The code has been updated to throw SqlFileNotReadableException instead of SqlFileNotFoundException. It also includes the addition of InjectorInterface as a dependency in QueryInterceptor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Outside diff range and nitpick comments (1)
tests/SqlQueryInterceptModuleTest.php (1)
53-87
: Improve clarity of test assertions.Consider adding more descriptive assertion messages to help identify the test purpose and expected outcomes more clearly. This can greatly aid in debugging and understanding tests at a glance.
Tools
PHPStan
55-55: Call to method onGet() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
57-57: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
58-58: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
63-63: Call to method onGet() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
64-64: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
65-65: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
66-66: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
71-71: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::expectException(). (method.notFound)
72-72: Call to method noSql() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
77-77: Call to method withQuery() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
78-78: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
79-79: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
80-80: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
85-85: Call to method getIntercepted() on an unknown class Ray\Query\FakeBar. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
86-86: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- src/FileGetContents.php (1 hunks)
- src/QueryInterceptor.php (4 hunks)
- tests/SqlQueryInterceptModuleTest.php (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/FileGetContents.php
Additional context used
PHPStan
tests/SqlQueryInterceptModuleTest.php
15-15: Class Ray\Query\SqlQueryInterceptModuleTest extends unknown class PHPUnit\Framework\TestCase. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
18-18: Property Ray\Query\SqlQueryInterceptModuleTest::$fakeRo has unknown class Ray\Query\FakeRo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
21-21: Property Ray\Query\SqlQueryInterceptModuleTest::$fakeBar has unknown class Ray\Query\FakeBar as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
25-25: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
27-27: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
32-32: Anonymous class extends unknown class Ray\Di\AbstractModule. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
34-34: Property class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::$pdo has unknown class Aura\Sql\ExtendedPdo as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
36-36: Parameter $pdo of method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::__construct() has invalid type Aura\Sql\ExtendedPdo. (class.notFound)
41-41: Method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::configure() has no return type specified. (missingType.return)
43-43: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::bind(). (method.notFound)
43-43: Class Aura\Sql\ExtendedPdoInterface not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
44-44: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::install(). (method.notFound)
45-45: Call to an undefined method class@anonymous/tests/SqlQueryInterceptModuleTest.php:32::bind(). (method.notFound)
45-45: Class Ray\Query\FakeBar not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
48-48: Instantiated class Ray\Di\Injector not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
49-49: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
49-49: Class Ray\Query\FakeRo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
50-50: Call to method getInstance() on an unknown class Ray\Di\Injector. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
50-50: Class Ray\Query\FakeBar not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
55-55: Call to method onGet() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
56-56: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
57-57: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
58-58: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
63-63: Call to method onGet() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
64-64: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
65-65: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
66-66: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
71-71: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::expectException(). (method.notFound)
72-72: Call to method noSql() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
77-77: Call to method withQuery() on an unknown class Ray\Query\FakeRo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
78-78: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
79-79: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
80-80: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
85-85: Call to method getIntercepted() on an unknown class Ray\Query\FakeBar. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
86-86: Call to an undefined method Ray\Query\SqlQueryInterceptModuleTest::assertSame(). (method.notFound)
src/QueryInterceptor.php
22-22: Class Ray\Query\QueryInterceptor implements unknown interface Ray\Aop\MethodInterceptor. (interface.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
28-28: Property Ray\Query\QueryInterceptor::$pdo has unknown class Aura\Sql\ExtendedPdoInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
34-34: Property Ray\Query\QueryInterceptor::$injector has unknown class Ray\Di\InjectorInterface as its type. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
37-37: Parameter $pdo of method Ray\Query\QueryInterceptor::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
40-40: Parameter $injector of method Ray\Query\QueryInterceptor::__construct() has invalid type Ray\Di\InjectorInterface. (class.notFound)
49-49: Parameter $invocation of method Ray\Query\QueryInterceptor::invoke() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
51-51: Call to method getMethod() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
55-55: Call to method getNamedArguments() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
65-65: Call to method getInstance() on an unknown class Ray\Di\InjectorInterface. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Caught class Ray\Di\Exception\Unbound not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Parameter $invocation of method Ray\Query\QueryInterceptor::getQueryResult() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
91-91: Call to method getThis() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
93-93: Class BEAR\Resource\ResourceObject not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
101-101: Method Ray\Query\QueryInterceptor::returnRo() has invalid return type BEAR\Resource\ResourceObject. (class.notFound)
101-101: Parameter $invocation of method Ray\Query\QueryInterceptor::returnRo() has invalid type Ray\Aop\MethodInvocation. (class.notFound)
101-101: Parameter $ro of method Ray\Query\QueryInterceptor::returnRo() has invalid type BEAR\Resource\ResourceObject. (class.notFound)
107-107: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
107-107: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
109-109: Call to method proceed() on an unknown class Ray\Aop\MethodInvocation. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
109-109: PHPDoc tag @var for variable $ro contains unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
114-114: Method Ray\Query\QueryInterceptor::return404() has invalid return type BEAR\Resource\ResourceObject. (class.notFound)
114-114: Parameter $ro of method Ray\Query\QueryInterceptor::return404() has invalid type BEAR\Resource\ResourceObject. (class.notFound)
116-116: Access to property $code on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
116-116: Access to property $code on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
117-117: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
117-117: Access to property $body on an unknown class BEAR\Resource\ResourceObject. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
129-129: Function uri_template not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
Additional comments not posted (2)
tests/SqlQueryInterceptModuleTest.php (1)
25-31
: Ensure theExtendedPdo
class is correctly imported and available.Verification successful
The
ExtendedPdo
class is imported from theAura\Sql
namespace, as evidenced by multipleuse Aura\Sql\ExtendedPdo;
statements found in the codebase. This confirms that the class is correctly imported and available for use.
tests/SqlQueryInterceptModuleTest.php
:use Aura\Sql\ExtendedPdo;
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of the ExtendedPdo class in the project. fd --type f --exec grep -H "class ExtendedPdo" {}Length of output: 53
Script:
#!/bin/bash # Description: Verify the existence of the ExtendedPdo class in the project and check for its usage. # Search for the class definition ast-grep --lang php --pattern 'class ExtendedPdo { $$$ }' # Search for any usage or import of ExtendedPdo rg 'ExtendedPdo'Length of output: 4034
Tools
PHPStan
25-25: Instantiated class Aura\Sql\ExtendedPdo not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
26-26: Call to method setAttribute() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
27-27: Call to method query() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
31-31: Call to method perform() on an unknown class Aura\Sql\ExtendedPdo. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolssrc/QueryInterceptor.php (1)
36-41
: Ensure correct types and namespaces for constructor parameters.Verification successful
The namespaces for the constructor parameters in
src/QueryInterceptor.php
are correctly used:
ExtendedPdoInterface
is fromAura\Sql
.InjectorInterface
is fromRay\Di
.These namespaces are correctly imported in
src/QueryInterceptor.php
.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct namespaces for ExtendedPdoInterface and InjectorInterface. fd --type f --exec grep -H "class ExtendedPdoInterface" {} fd --type f --exec grep -H "class InjectorInterface" {}Length of output: 122
Script:
#!/bin/bash # Search for the definition and namespace of ExtendedPdoInterface ast-grep --lang php --pattern 'interface ExtendedPdoInterface' --json | jq '.nodes[] | {file: .range.file, namespace: .captures[0].name}' # Search for the definition and namespace of InjectorInterface ast-grep --lang php --pattern 'interface InjectorInterface' --json | jq '.nodes[] | {file: .range.file, namespace: .captures[0].name}' # Verify the usage of these namespaces in src/QueryInterceptor.php rg 'use ' src/QueryInterceptor.phpLength of output: 917
Script:
#!/bin/bash # Search for the definition and namespace of ExtendedPdoInterface rg 'interface ExtendedPdoInterface' -A 5 # Search for the definition and namespace of InjectorInterface rg 'interface InjectorInterface' -A 5Length of output: 82
Script:
#!/bin/bash # Search for the namespace of ExtendedPdoInterface rg 'ExtendedPdoInterface' # Search for the namespace of InjectorInterface rg 'InjectorInterface'Length of output: 2943
Tools
PHPStan
37-37: Parameter $pdo of method Ray\Query\QueryInterceptor::__construct() has invalid type Aura\Sql\ExtendedPdoInterface. (class.notFound)
40-40: Parameter $injector of method Ray\Query\QueryInterceptor::__construct() has invalid type Ray\Di\InjectorInterface. (class.notFound)
The BC (backward compatibility) comment in QueryInterceptor.php was removed, as it served no meaningful purpose. Added to README.md, is a section explaining how to bind a PHP class to a query, instead of specifying an SQL file. The usage and behavior are described, with a corresponding PHP annotation example provided.
The heading about module installation in the README.md file has been modified. The new heading is more descriptive and improves guidance for the user on how to install the SQL module.
The description in both README.md and composer.json files has been changed. The phrase "Converts SQL files, Web API URIs into injectable function objects" was updated to "Converts SQL files and Web API URIs into inject
The commit modifies the documentation to reflect the recent changes in the annotation syntax. Specifically, it updates the code snippet in the README file to use the `#[Query]` syntax instead of `@Query`.
Moved the error handling for SqlFileNotFoundException into its own private method, handleSqlNotFound, for improved readability and simplicity. This change does not alter the functionality but enhances code structure and maintainability.
Added a tearDown() function to the SqlQueryInterceptModuleTest, SqlQueryModuleTest, and SqlQueryTest classes. This method takes care of appropriately cleaning up the SQLite connection after each test, preventing potential issues related to connection leakage.
Summary by CodeRabbit
Documentation
Ray.QueryModule
to reflect changes in class annotations and method signatures.New Features
SqlFileNotReadableException
class for handling unreadable SQL file errors.FileGetContents
,FileGetContentsWithFileName
, andGetSqlWithFileName
.Refactor
Chores
composer.json
description and added new configurations under theextra
section.