-
Notifications
You must be signed in to change notification settings - Fork 3
Swap terminologies #80
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis update systematically refactors the migration tool's database abstraction layer, renaming all resource types and related code from "Collection/Attribute/Document" to "Table/Column/Row." Method names, class names, constants, and environment variable documentation are updated throughout the codebase, aligning terminology with relational database conventions and extending support for multiple providers. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant Source
participant Destination
User->>CLI: Start migration
CLI->>Source: getDatabase('source')
CLI->>Destination: getDatabase('destination')
loop For each resource type (table, column, row)
Source->>CLI: Export resource (Table/Column/Row)
CLI->>Destination: Import resource (Table/Column/Row)
end
CLI->>User: Migration complete
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 10
🔭 Outside diff range comments (1)
src/Migration/Resources/Database/Columns/Relationship.php (1)
65-79: Fix incorrect array key access causing pipeline failure.The
fromArraymethod is trying to access$array['options']['relatedCollection']but based on the array type annotation, this key should berelatedTable.Apply this fix:
return new self( $array['key'], Table::fromArray($array['collection']), - relatedTable: $array['options']['relatedCollection'], + relatedTable: $array['options']['relatedTable'], relationType: $array['options']['relationType'], twoWay: $array['options']['twoWay'], twoWayKey: $array['options']['twoWayKey'],
🧹 Nitpick comments (9)
src/Migration/Resources/Database/Columns/Text.php (1)
35-71: Update PHPDoc to reflect actual implementation.The
fromArraymethod correctly usesTable::fromArraybut the PHPDoc still referencescollectionin the array structure. This creates documentation inconsistency.Update the PHPDoc to reflect the new terminology:
- * collection: array{ + * table: array{src/Migration/Resources/Database/Columns/Enum.php (1)
40-78: Update PHPDoc to reflect actual implementation.Similar to the Text class, the
fromArraymethod correctly usesTable::fromArraybut the PHPDoc still referencescollectionin the array structure.Update the PHPDoc to reflect the new terminology:
- * collection: array{ + * table: array{src/Migration/Resources/Database/Columns/Decimal.php (1)
41-79: Update PHPDoc to reflect actual implementation.The
fromArraymethod correctly usesTable::fromArraybut the PHPDoc still referencescollectionin the array structure, creating documentation inconsistency.Update the PHPDoc to reflect the new terminology:
- * collection: array{ + * table: array{src/Migration/Resources/Database/Columns/Boolean.php (1)
30-62: Update PHPDoc to reflect new terminology.The PHPDoc comment still references 'collection' in the array structure documentation, but the code correctly uses
Table::fromArray(). The documentation should be updated to reflect the new terminology.* @param array{ * key: string, - * collection: array{ + * table: array{ * database: array{ * id: string, * name: string, * }, * name: string, * id: string, * documentSecurity: bool, * permissions: ?array<string> * },src/Migration/Resources/Database/Columns/DateTime.php (1)
36-68: Update PHPDoc to reflect new terminology.The PHPDoc comment still references 'collection' in the array structure documentation, but the code correctly uses
Table::fromArray(). This should be updated for consistency.* @param array{ * key: string, - * collection: array{ + * table: array{ * database: array{ * id: string, * name: string, * }, * name: string, * id: string, * documentSecurity: bool, * permissions: ?array<string> * },src/Migration/Sources/CSV.php (1)
109-109: Consider refactoring the complex exportRows method.The
exportRowsmethod has high cyclomatic complexity (25) and is quite long (118 lines). Consider breaking it down into smaller, more focused methods.Potential refactor approach:
- Extract column fetching logic into a separate method
- Extract CSV parsing logic into a separate method
- Extract data type conversion logic into a separate method
This would improve readability and maintainability.
src/Migration/Resources/Database/Columns/Relationship.php (1)
9-115: Consider adding class-level documentation.The static analysis tool flagged missing documentation. While not critical, adding PHPDoc comments would improve code maintainability.
Would you like me to generate comprehensive PHPDoc comments for the class and its methods?
src/Migration/Sources/NHost.php (1)
370-400: Method correctly refactored to use new terminology.The transformation from
exportCollectionstoexportTablesis implemented correctly with all internal references updated appropriately.Consider addressing the static analysis warnings by prefixing private methods with an underscore and adding doc comments for consistency with coding standards.
src/Migration/Sources/Appwrite/Reader/Database.php (1)
27-109: Consider refactoring to reduce complexity.The
report()method has high cyclomatic complexity (15) and NPath complexity (2628), making it difficult to maintain and test. Consider extracting the database processing logic into separate methods.- // Process each database - foreach ($databases as $database) { - $databaseSequence = $database->getSequence(); - $tableId = "database_{$databaseSequence}"; - - if (in_array(Resource::TYPE_TABLE, $resources)) { - $report[Resource::TYPE_TABLE] += $this->countResources($tableId); - } - // ... rest of the loop - } + // Process each database + foreach ($databases as $database) { + $this->processDatabaseForReport($database, $resources, $report, $dbResources); + }And create a new private method:
private function processDatabaseForReport( UtopiaDocument $database, array $resources, array &$report, array &$dbResources ): void { // Extract the database processing logic here }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (33)
.env.example(1 hunks)bin/MigrationCLI.php(6 hunks)src/Migration/Cache.php(3 hunks)src/Migration/Destinations/Appwrite.php(29 hunks)src/Migration/Destinations/Local.php(1 hunks)src/Migration/Resource.php(3 hunks)src/Migration/Resources/Database/Column.php(6 hunks)src/Migration/Resources/Database/Columns/Boolean.php(3 hunks)src/Migration/Resources/Database/Columns/DateTime.php(3 hunks)src/Migration/Resources/Database/Columns/Decimal.php(4 hunks)src/Migration/Resources/Database/Columns/Email.php(2 hunks)src/Migration/Resources/Database/Columns/Enum.php(3 hunks)src/Migration/Resources/Database/Columns/IP.php(2 hunks)src/Migration/Resources/Database/Columns/Integer.php(4 hunks)src/Migration/Resources/Database/Columns/Relationship.php(4 hunks)src/Migration/Resources/Database/Columns/Text.php(3 hunks)src/Migration/Resources/Database/Columns/URL.php(2 hunks)src/Migration/Resources/Database/Index.php(5 hunks)src/Migration/Resources/Database/Row.php(3 hunks)src/Migration/Resources/Database/Table.php(6 hunks)src/Migration/Sources/Appwrite.php(12 hunks)src/Migration/Sources/Appwrite/Reader.php(3 hunks)src/Migration/Sources/Appwrite/Reader/API.php(5 hunks)src/Migration/Sources/Appwrite/Reader/Database.php(12 hunks)src/Migration/Sources/CSV.php(8 hunks)src/Migration/Sources/Firebase.php(16 hunks)src/Migration/Sources/NHost.php(20 hunks)src/Migration/Sources/Supabase.php(2 hunks)src/Migration/Transfer.php(4 hunks)tests/Migration/E2E/Sources/NHostTest.php(5 hunks)tests/Migration/E2E/Sources/SupabaseTest.php(5 hunks)tests/Migration/Unit/Adapters/MockDestination.php(1 hunks)tests/Migration/Unit/Adapters/MockSource.php(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (9)
src/Migration/Destinations/Local.php (1)
src/Migration/Resource.php (1)
Resource(5-205)
tests/Migration/Unit/Adapters/MockSource.php (1)
src/Migration/Resource.php (1)
Resource(5-205)
src/Migration/Transfer.php (1)
src/Migration/Resource.php (1)
Resource(5-205)
tests/Migration/Unit/Adapters/MockDestination.php (1)
src/Migration/Resource.php (1)
Resource(5-205)
src/Migration/Resources/Database/Columns/Enum.php (2)
src/Migration/Resources/Database/Column.php (2)
Column(8-151)__construct(36-51)src/Migration/Resources/Database/Table.php (2)
Table(8-109)fromArray(49-61)
src/Migration/Resources/Database/Columns/Email.php (3)
src/Migration/Resources/Database/Column.php (2)
Column(8-151)__construct(36-51)src/Migration/Resources/Database/Table.php (1)
Table(8-109)src/Migration/Resources/Database/Columns/Text.php (2)
Text(9-87)__construct(11-33)
src/Migration/Resources/Database/Columns/Text.php (2)
src/Migration/Resources/Database/Column.php (2)
Column(8-151)__construct(36-51)src/Migration/Resources/Database/Table.php (2)
Table(8-109)fromArray(49-61)
src/Migration/Sources/Supabase.php (11)
src/Migration/Resource.php (1)
Resource(5-205)src/Migration/Exception.php (1)
Exception(5-65)src/Migration/Sources/CSV.php (1)
report(57-74)src/Migration/Sources/Appwrite/Reader/Database.php (1)
report(27-109)src/Migration/Sources/Firebase.php (1)
report(139-165)src/Migration/Destinations/Local.php (1)
report(74-83)src/Migration/Sources/Appwrite.php (1)
report(155-188)src/Migration/Sources/Appwrite/Reader/API.php (1)
report(28-101)tests/Migration/Unit/Adapters/MockSource.php (1)
report(83-86)src/Migration/Sources/NHost.php (1)
report(98-212)src/Migration/Target.php (1)
report(68-68)
src/Migration/Resources/Database/Columns/Relationship.php (2)
src/Migration/Resources/Database/Column.php (2)
Column(8-151)__construct(36-51)src/Migration/Resources/Database/Table.php (2)
Table(8-109)fromArray(49-61)
🪛 phpcs (3.7.2)
tests/Migration/E2E/Sources/NHostTest.php
[ERROR] 221-221: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 221-221: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 221-221: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 249-249: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 249-249: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 249-249: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
src/Migration/Resources/Database/Column.php
[ERROR] 8-8: Missing doc comment for class Column
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 23-23: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 23-23: Expected 16 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 33-33: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 33-33: Expected 15 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 34-34: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 34-34: Expected 15 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 93-93: Missing doc comment for function getTable()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/IP.php
[ERROR] 8-8: Missing doc comment for class IP
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/Enum.php
[ERROR] 8-8: Missing doc comment for class Enum
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 10-10: Doc comment for parameter "$key" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$table" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$required" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$default" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$array" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$size" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$createdAt" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$updatedAt" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 11-11: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 11-11: Doc comment for parameter $elements does not match actual variable name $key
(PEAR.Commenting.FunctionComment.ParamNameNoMatch)
tests/Migration/E2E/Sources/SupabaseTest.php
[ERROR] 204-204: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 204-204: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 204-204: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 253-253: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 253-253: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 253-253: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
src/Migration/Resources/Database/Columns/Boolean.php
[ERROR] 8-8: Missing doc comment for class Boolean
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
bin/MigrationCLI.php
[ERROR] 265-265: Missing doc comment for function getDatabase()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 283-283: Line indented incorrectly; expected 20 spaces, found 24
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 285-285: Line indented incorrectly; expected 24 spaces, found 28
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 287-287: Line indented incorrectly; expected 24 spaces, found 28
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 291-291: Line indented incorrectly; expected 20 spaces, found 24
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 381-381: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 381-381: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
src/Migration/Resources/Database/Columns/Email.php
[ERROR] 8-8: Missing doc comment for class Email
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/Text.php
[ERROR] 9-9: Missing doc comment for class Text
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 11-11: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/URL.php
[ERROR] 8-8: Missing doc comment for class URL
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/Decimal.php
[ERROR] 8-8: Missing doc comment for class Decimal
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/Integer.php
[ERROR] 8-8: Missing doc comment for class Integer
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Row.php
[ERROR] 8-8: Missing doc comment for class Row
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 11-11: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 11-11: Expected 15 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 12-12: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 12-12: Expected 16 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 13-13: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 14-14: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 14-14: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 66-66: Missing doc comment for function getName()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 71-71: Missing doc comment for function getGroup()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 76-76: Missing doc comment for function getTable()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Sources/CSV.php
[ERROR] 109-109: Private method name "CSV::exportRows" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 144-144: First condition of a multi-line IF statement must directly follow the opening parenthesis
(PEAR.ControlStructures.MultiLineCondition.SpacingAfterOpenBrace)
[ERROR] 145-145: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 146-146: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 153-153: First condition of a multi-line IF statement must directly follow the opening parenthesis
(PEAR.ControlStructures.MultiLineCondition.SpacingAfterOpenBrace)
[ERROR] 154-154: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 155-155: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 156-156: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 162-162: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 289-289: Private method name "CSV::validateCSVHeaders" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
src/Migration/Destinations/Appwrite.php
[ERROR] 63-63: Private member variable "rowBuffer" must be prefixed with an underscore
(PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore)
[ERROR] 274-274: Line indented incorrectly; expected 8 spaces, found 12
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 275-275: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 275-275: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 275-275: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 278-278: Line indented incorrectly; expected 8 spaces, found 12
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 279-279: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 279-279: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 279-279: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 282-282: Line indented incorrectly; expected 8 spaces, found 12
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 283-283: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 283-283: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 283-283: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 286-286: Line indented incorrectly; expected 8 spaces, found 12
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 287-287: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 287-287: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 287-287: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 392-392: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 392-392: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 403-403: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
[ERROR] 403-403: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
[ERROR] 511-511: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 569-569: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 652-652: Line indented incorrectly; expected 16 spaces, found 20
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 711-711: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 725-725: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 817-817: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 831-831: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
[ERROR] 924-924: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 924-924: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 954-954: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 954-954: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 954-954: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 969-969: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 972-972: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
src/Migration/Resources/Database/Index.php
[ERROR] 19-19: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 19-19: Expected 9 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 20-20: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 20-20: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 21-21: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 22-22: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 22-22: Expected 4 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 23-23: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 24-24: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 24-24: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 25-25: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 25-25: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 111-111: Missing doc comment for function getTable()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Table.php
[ERROR] 8-8: Missing doc comment for class Table
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 11-11: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 11-11: Expected 6 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 12-12: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 12-12: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 13-13: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 13-13: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 14-14: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 14-14: Expected 10 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 15-15: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 16-16: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 16-16: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 17-17: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 17-17: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 18-18: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 18-18: Expected 10 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 95-95: Missing doc comment for function getTableName()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 100-100: Missing doc comment for function getRowSecurity()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/DateTime.php
[ERROR] 8-8: Missing doc comment for class DateTime
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/Relationship.php
[ERROR] 9-9: Missing doc comment for class Relationship
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 11-11: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 86-86: Missing doc comment for function getRelatedTable()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Sources/Appwrite.php
[ERROR] 669-669: Private method name "Appwrite::exportTables" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 676-676: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 676-676: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 676-676: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 720-720: Private method name "Appwrite::exportColumns" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 723-723: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 723-723: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 723-723: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 738-738: First condition of a multi-line IF statement must directly follow the opening parenthesis
(PEAR.ControlStructures.MultiLineCondition.SpacingAfterOpenBrace)
[ERROR] 739-739: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 746-746: Line indented incorrectly; expected 20 spaces, found 24
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 799-799: Line indented incorrectly; expected 24 spaces, found 28
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 802-802: Line indented incorrectly; expected 20 spaces, found 24
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 813-813: Line indented incorrectly; expected 20 spaces, found 24
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 826-826: Line indented incorrectly; expected 20 spaces, found 24
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 839-839: Line indented incorrectly; expected 20 spaces, found 24
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 853-853: Line indented incorrectly; expected 20 spaces, found 24
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 903-903: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 903-903: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 903-903: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 948-948: Private method name "Appwrite::exportRows" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 953-953: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 953-953: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 953-953: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 970-970: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 970-970: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 970-970: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 971-971: First condition of a multi-line IF statement must directly follow the opening parenthesis
(PEAR.ControlStructures.MultiLineCondition.SpacingAfterOpenBrace)
[ERROR] 972-972: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 973-973: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 987-987: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 987-987: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 987-987: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
src/Migration/Sources/NHost.php
[ERROR] 370-370: Missing doc comment for function exportTables()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 370-370: Private method name "NHost::exportTables" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 402-402: Missing doc comment for function exportColumns()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 402-402: Private method name "NHost::exportColumns" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 408-408: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 408-408: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 408-408: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 424-424: Missing doc comment for function exportIndexes()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 424-424: Private method name "NHost::exportIndexes" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 430-430: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 430-430: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 430-430: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 449-449: Missing doc comment for function exportRows()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 449-449: Private method name "NHost::exportRows" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 456-456: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 456-456: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 456-456: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 457-457: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 459-459: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
[ERROR] 462-462: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 462-462: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 462-462: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 480-480: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 482-482: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
[ERROR] 489-489: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 489-489: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 489-489: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 506-506: Missing doc comment for function convertColumn()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 506-506: Private method name "NHost::convertColumn" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 529-529: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
[ERROR] 534-534: Line indented incorrectly; expected 12 spaces, found 16
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 553-553: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
[ERROR] 558-558: Line indented incorrectly; expected 12 spaces, found 16
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 578-578: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
[ERROR] 582-582: Line indented incorrectly; expected 12 spaces, found 16
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 603-603: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
[ERROR] 608-608: Line indented incorrectly; expected 12 spaces, found 16
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 647-647: Missing doc comment for function convertIndex()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 647-647: Private method name "NHost::convertIndex" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
src/Migration/Sources/Firebase.php
[ERROR] 314-314: Missing doc comment for function exportDB()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 314-314: Private method name "Firebase::exportDB" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 375-375: Private method name "Firebase::convertColumn" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 470-470: Missing doc comment for function calculateArrayType()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 470-470: Private method name "Firebase::calculateArrayType" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 491-491: Missing doc comment for function exportTable()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 491-491: Private method name "Firebase::exportTable" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
[ERROR] 536-536: The open comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentAfterOpen)
[ERROR] 536-536: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 536-536: The close comment tag must be the only content on the line
(Generic.Commenting.DocComment.ContentBeforeClose)
[ERROR] 593-593: Missing doc comment for function convertRow()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 593-593: Private method name "Firebase::convertRow" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
src/Migration/Sources/Appwrite/Reader.php
[ERROR] 43-43: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 43-43: Expected 12 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 43-43: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 44-44: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 44-44: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 45-45: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 52-52: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 52-52: Expected 12 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 52-52: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 53-53: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 53-53: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 54-54: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 61-61: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 61-61: Expected 12 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 61-61: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 62-62: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 62-62: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 63-63: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 70-70: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 70-70: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 70-70: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 71-71: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 71-71: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 72-72: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 72-72: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 72-72: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 73-73: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 80-80: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 80-80: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 81-81: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 88-88: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 88-88: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 89-89: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 89-89: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 89-89: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 90-90: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
src/Migration/Sources/Appwrite/Reader/API.php
[ERROR] 14-14: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 16-16: Missing @category tag in class comment
(PEAR.Commenting.ClassComment.MissingCategoryTag)
[ERROR] 16-16: Missing @Package tag in class comment
(PEAR.Commenting.ClassComment.MissingPackageTag)
[ERROR] 16-16: Missing @author tag in class comment
(PEAR.Commenting.ClassComment.MissingAuthorTag)
[ERROR] 16-16: Missing @license tag in class comment
(PEAR.Commenting.ClassComment.MissingLicenseTag)
[ERROR] 16-16: Missing @link tag in class comment
(PEAR.Commenting.ClassComment.MissingLinkTag)
[ERROR] 19-19: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 25-25: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 25-25: Doc comment for parameter "$resources" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 25-25: Doc comment for parameter "$report" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 27-27: Missing @return tag in function comment
(PEAR.Commenting.FunctionComment.MissingReturn)
[ERROR] 56-56: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 56-56: Closing parenthesis of a multi-line IF statement must be on a new line
(PEAR.ControlStructures.MultiLineCondition.CloseBracketNewLine)
[ERROR] 72-72: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 73-73: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 73-73: Closing parenthesis of a multi-line IF statement must be on a new line
(PEAR.ControlStructures.MultiLineCondition.CloseBracketNewLine)
[ERROR] 123-123: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 124-124: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 124-124: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 125-125: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 125-125: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 126-126: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 127-127: Tag @throws cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 140-140: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 140-140: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 141-141: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 141-141: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 142-142: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 143-143: Tag @throws cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 157-157: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 157-157: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 158-158: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 158-158: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 159-159: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 160-160: Tag @throws cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 173-173: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 173-173: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 173-173: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 174-174: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 174-174: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 175-175: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 175-175: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 175-175: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 176-176: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 177-177: Tag @throws cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 190-190: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 191-191: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 191-191: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 192-192: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 199-199: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 200-200: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 200-200: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 201-201: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 201-201: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 201-201: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 202-202: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
src/Migration/Sources/Appwrite/Reader/Database.php
[ERROR] 27-27: Missing doc comment for function report()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 52-52: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 52-52: Closing parenthesis of a multi-line IF statement must be on a new line
(PEAR.ControlStructures.MultiLineCondition.CloseBracketNewLine)
[ERROR] 111-111: Missing doc comment for function listDatabases()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 116-116: Missing doc comment for function listTables()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 157-157: Missing doc comment for function listColumns()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 219-219: Missing doc comment for function listIndexes()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 266-266: Missing doc comment for function listRows()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 311-311: Opening parenthesis of a multi-line function call must be the last content on the line
(PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket)
[ERROR] 313-313: Closing parenthesis of a multi-line function call must be on a line by itself
(PEAR.Functions.FunctionCallSignature.CloseBracketLine)
[ERROR] 316-316: Missing doc comment for function getRow()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 355-355: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 356-356: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 356-356: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 357-357: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 364-364: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 365-365: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 365-365: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 366-366: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 366-366: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 366-366: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 367-367: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 390-390: Line indented incorrectly; expected 8 spaces, found 12
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 394-394: Line indented incorrectly; expected 8 spaces, found 12
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 397-397: Line indented incorrectly; expected 8 spaces, found 12
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 400-400: Line indented incorrectly; expected 8 spaces, found 12
(PEAR.WhiteSpace.ScopeIndent.IncorrectExact)
[ERROR] 417-417: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 417-417: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 418-418: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 418-418: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 418-418: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 419-419: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 420-420: Tag @throws cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 422-422: Private method name "Database::countResources" must be prefixed with an underscore
(PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore)
🪛 GitHub Actions: CodeQL
tests/Migration/E2E/Sources/NHostTest.php
[error] 222-222: PHPStan: Variable $table in PHPDoc tag @var does not exist.
[error] 250-250: PHPStan: Variable $table in PHPDoc tag @var does not exist.
tests/Migration/E2E/Sources/SupabaseTest.php
[error] 205-205: PHPStan: Variable $table in PHPDoc tag @var does not exist.
[error] 254-254: PHPStan: Variable $table in PHPDoc tag @var does not exist.
src/Migration/Resources/Database/Columns/Relationship.php
[error] 70-70: PHPStan: Offset 'relatedCollection' does not exist on array{relatedTable: string, relationType: string, twoWay: bool, twoWayKey: string|null, onDelete: string, side: string}.
🪛 PHPMD (2.15.0)
src/Migration/Resources/Database/Column.php
40-40: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
42-42: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
43-43: The method __construct has a boolean flag argument $signed, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
src/Migration/Resources/Database/Columns/IP.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
src/Migration/Resources/Database/Columns/Enum.php
17-17: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
19-19: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
69-69: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/Boolean.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
55-55: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
bin/MigrationCLI.php
265-399: The method getDatabase() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. (Code Size Rules)
(CyclomaticComplexity)
265-399: The method getDatabase() has an NPath complexity of 384. The configured NPath complexity threshold is 200. (Code Size Rules)
(NPathComplexity)
265-399: The method getDatabase() has 135 lines of code. Current threshold is set to 100. Avoid really long methods. (Code Size Rules)
(ExcessiveMethodLength)
378-378: Missing class import via use statement (line '378', column '34'). (Clean Code Rules)
(MissingImport)
381-381: Missing class import via use statement (line '381', column '50'). (Clean Code Rules)
(MissingImport)
src/Migration/Resources/Database/Columns/Email.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
src/Migration/Resources/Database/Columns/Text.php
14-14: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
16-16: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
62-62: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/URL.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
src/Migration/Resources/Database/Columns/Decimal.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
18-18: The method __construct has a boolean flag argument $signed, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
70-70: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/Integer.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
18-18: The method __construct has a boolean flag argument $signed, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
72-72: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Row.php
47-47: Avoid using static access to class 'Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Sources/Supabase.php
272-272: Missing class import via use statement (line '272', column '27'). (Clean Code Rules)
(MissingImport)
283-283: Missing class import via use statement (line '283', column '27'). (Clean Code Rules)
(MissingImport)
305-305: Missing class import via use statement (line '305', column '27'). (Clean Code Rules)
(MissingImport)
src/Migration/Sources/CSV.php
109-226: The method exportRows() has a Cyclomatic Complexity of 25. The configured cyclomatic complexity threshold is 10. (Code Size Rules)
(CyclomaticComplexity)
109-226: The method exportRows() has an NPath complexity of 208494. The configured NPath complexity threshold is 200. (Code Size Rules)
(NPathComplexity)
109-226: The method exportRows() has 118 lines of code. Current threshold is set to 100. Avoid really long methods. (Code Size Rules)
(ExcessiveMethodLength)
174-174: Missing class import via use statement (line '174', column '31'). (Clean Code Rules)
(MissingImport)
src/Migration/Destinations/Appwrite.php
396-396: Avoid using static access to class '\Utopia\Database\Helpers\Permission' in method 'createTable'. (Clean Code Rules)
(StaticAccess)
421-677: The method createColumn() has a Cyclomatic Complexity of 27. The configured cyclomatic complexity threshold is 10. (Code Size Rules)
(CyclomaticComplexity)
421-677: The method createColumn() has an NPath complexity of 186624. The configured NPath complexity threshold is 200. (Code Size Rules)
(NPathComplexity)
421-677: The method createColumn() has 257 lines of code. Current threshold is set to 100. Avoid really long methods. (Code Size Rules)
(ExcessiveMethodLength)
434-434: Missing class import via use statement (line '434', column '34'). (Clean Code Rules)
(MissingImport)
512-512: Avoid using static access to class '\Utopia\Database\Helpers\ID' in method 'createColumn'. (Clean Code Rules)
(StaticAccess)
570-570: Avoid using static access to class '\Utopia\Database\Helpers\ID' in method 'createColumn'. (Clean Code Rules)
(StaticAccess)
651-651: Missing class import via use statement (line '651', column '35'). (Clean Code Rules)
(MissingImport)
712-712: Avoid using static access to class '\Utopia\Database\Query' in method 'createIndex'. (Clean Code Rules)
(StaticAccess)
818-818: Avoid using static access to class '\Utopia\Database\Helpers\ID' in method 'createIndex'. (Clean Code Rules)
(StaticAccess)
893-981: The method createRow() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. (Code Size Rules)
(CyclomaticComplexity)
src/Migration/Resources/Database/Index.php
68-68: Avoid using static access to class 'Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Table.php
24-24: The method __construct has a boolean flag argument $rowSecurity, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
src/Migration/Resources/Database/Columns/DateTime.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
61-61: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/Relationship.php
16-16: The method __construct has a boolean flag argument $twoWay, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
69-69: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Sources/Appwrite.php
671-671: Avoid using static access to class '\Utopia\Migration\Resources\Database\Database' in method 'exportTables'. (Clean Code Rules)
(StaticAccess)
720-891: The method exportColumns() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10. (Code Size Rules)
(CyclomaticComplexity)
720-891: The method exportColumns() has an NPath complexity of 298. The configured NPath complexity threshold is 200. (Code Size Rules)
(NPathComplexity)
720-891: The method exportColumns() has 172 lines of code. Current threshold is set to 100. Avoid really long methods. (Code Size Rules)
(ExcessiveMethodLength)
722-722: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'exportColumns'. (Clean Code Rules)
(StaticAccess)
948-1043: The method exportRows() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10. (Code Size Rules)
(CyclomaticComplexity)
950-950: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'exportRows'. (Clean Code Rules)
(StaticAccess)
968-968: Avoid using static access to class '\Utopia\Migration\Resources\Database\Column' in method 'exportRows'. (Clean Code Rules)
(StaticAccess)
src/Migration/Sources/NHost.php
138-138: Missing class import via use statement (line '138', column '27'). (Clean Code Rules)
(MissingImport)
149-149: Missing class import via use statement (line '149', column '27'). (Clean Code Rules)
(MissingImport)
171-171: Missing class import via use statement (line '171', column '27'). (Clean Code Rules)
(MissingImport)
404-404: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'exportColumns'. (Clean Code Rules)
(StaticAccess)
426-426: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'exportIndexes'. (Clean Code Rules)
(StaticAccess)
451-451: Avoid using static access to class '\Utopia\Migration\Resources\Database\Database' in method 'exportRows'. (Clean Code Rules)
(StaticAccess)
452-452: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'exportRows'. (Clean Code Rules)
(StaticAccess)
479-479: Avoid using static access to class '\Utopia\Migration\Resources\Database\Column' in method 'exportRows'. (Clean Code Rules)
(StaticAccess)
492-494: The method exportRows uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (Clean Code Rules)
(ElseExpression)
679-682: The method convertIndex uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (Clean Code Rules)
(ElseExpression)
src/Migration/Sources/Firebase.php
355-357: The method exportDB uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (Clean Code Rules)
(ElseExpression)
375-375: The method convertColumn has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
375-468: The method convertColumn() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. (Code Size Rules)
(CyclomaticComplexity)
465-467: The method convertColumn uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (Clean Code Rules)
(ElseExpression)
466-466: Missing class import via use statement (line '466', column '23'). (Clean Code Rules)
(MissingImport)
530-530: Avoid using static access to class '\Utopia\Migration\Resources\Database\Column' in method 'exportTable'. (Clean Code Rules)
(StaticAccess)
src/Migration/Sources/Appwrite/Reader/API.php
82-82: Avoid using static access to class '\Appwrite\Query' in method 'report'. (Clean Code Rules)
(StaticAccess)
196-196: Avoid using static access to class '\Appwrite\Query' in method 'querySelect'. (Clean Code Rules)
(StaticAccess)
206-206: Avoid using static access to class '\Appwrite\Query' in method 'queryEqual'. (Clean Code Rules)
(StaticAccess)
src/Migration/Sources/Appwrite/Reader/Database.php
27-109: The method report() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10. (Code Size Rules)
(CyclomaticComplexity)
27-109: The method report() has an NPath complexity of 2628. The configured NPath complexity threshold is 200. (Code Size Rules)
(NPathComplexity)
94-94: Avoid using static access to class '\Utopia\Database\Query' in method 'report'. (Clean Code Rules)
(StaticAccess)
95-95: Avoid using static access to class '\Utopia\Database\Query' in method 'report'. (Clean Code Rules)
(StaticAccess)
187-187: Avoid using static access to class '\Utopia\Database\Query' in method 'listColumns'. (Clean Code Rules)
(StaticAccess)
188-188: Avoid using static access to class '\Utopia\Database\Query' in method 'listColumns'. (Clean Code Rules)
(StaticAccess)
249-249: Avoid using static access to class '\Utopia\Database\Query' in method 'listIndexes'. (Clean Code Rules)
(StaticAccess)
250-250: Avoid using static access to class '\Utopia\Database\Query' in method 'listIndexes'. (Clean Code Rules)
(StaticAccess)
361-361: Avoid using static access to class '\Utopia\Database\Query' in method 'querySelect'. (Clean Code Rules)
(StaticAccess)
371-371: Avoid using static access to class '\Utopia\Database\Query' in method 'queryEqual'. (Clean Code Rules)
(StaticAccess)
🔇 Additional comments (103)
tests/Migration/E2E/Sources/NHostTest.php (5)
10-10: LGTM! Import statement correctly updated.The import statement properly reflects the new Table class terminology.
217-217: LGTM! Resource type constant correctly updated.The resource type constant is properly updated from
TYPE_COLLECTIONtoTYPE_TABLE.
234-234: LGTM! Method call correctly updated.The method call properly reflects the new
getTableName()method.
245-245: LGTM! Resource type constant correctly updated.The resource type constant is properly updated from
TYPE_COLLECTIONtoTYPE_TABLE.
262-262: LGTM! Method call correctly updated.The method call properly reflects the new
getTableName()method.src/Migration/Cache.php (3)
42-47: LGTM! Consistent terminology update for row resources.The cache logic correctly handles
TYPE_ROWresources instead ofTYPE_DOCUMENT, with appropriate variable renaming fromdocumentIdtorowId.
81-91: LGTM! Consistent terminology update in update method.The update method correctly uses
TYPE_ROWterminology androwIdvariable naming, maintaining the same logic with updated terminology.
122-122: LGTM! Consistent terminology update in remove method.The remove method condition correctly uses
TYPE_ROWinstead ofTYPE_DOCUMENT.tests/Migration/Unit/Adapters/MockDestination.php (1)
37-41: LGTM! Resource types correctly updated to new terminology.The supported resource types are properly updated from collection/attribute/document to table/column/row terminology, aligning with the
Resourceclass constants defined insrc/Migration/Resource.php..env.example (1)
1-46: LGTM! Comprehensive environment configuration for multiple providers.The environment variable configuration properly supports multiple migration providers and modes, providing clear organization with sections for:
- Provider selection
- Appwrite (both database and API key modes)
- Firebase, Supabase, and NHost providers
This aligns well with the broader migration system refactor and expanded provider support.
src/Migration/Destinations/Local.php (1)
55-58: LGTM! Resource types correctly updated to new terminology.The supported resource types are properly updated from collection/attribute/document to table/column/row terminology, maintaining consistency with the broader migration system refactor and the
Resourceclass constants.src/Migration/Resource.php (2)
29-29: LGTM! Clean terminology update to database conventions.The constant renames from collection/attribute/document to table/column/row align well with standard relational database terminology and provide a clearer foundation for the migration framework.
Also applies to: 33-33, 49-49
58-62: Consistent array updates.The ALL_RESOURCES array properly reflects the renamed constants, maintaining consistency across the framework.
src/Migration/Sources/Supabase.php (1)
267-275: Terminology updates are consistent.The resource type constant updates from TYPE_COLLECTION/TYPE_ATTRIBUTE to TYPE_TABLE/TYPE_COLUMN are correctly applied and maintain the same SQL query logic.
Also applies to: 278-286
tests/Migration/Unit/Adapters/MockSource.php (1)
66-70: Consistent mock adapter updates.The supported resources list correctly reflects the renamed resource type constants, ensuring the mock source stays aligned with the updated framework.
src/Migration/Transfer.php (2)
39-42: Resource type arrays correctly updated.The GROUP_DATABASES_RESOURCES and ALL_PUBLIC_RESOURCES arrays properly reflect the renamed constants, maintaining framework consistency.
Also applies to: 57-60
135-137: Row handling logic correctly updated.The logic for handling TYPE_ROW instead of TYPE_DOCUMENT maintains the same behavior while using the updated terminology. The comment updates provide clarity about row status handling.
Also applies to: 279-283
tests/Migration/E2E/Sources/SupabaseTest.php (1)
10-10: Test updates are consistent with new terminology.The import statement, cache access methods, and method calls are correctly updated to use the new table/row terminology.
Also applies to: 198-198, 205-205, 217-217, 222-222
src/Migration/Resources/Database/Columns/Text.php (3)
3-9: LGTM: Namespace and class hierarchy updates are consistent.The namespace change from
AttributestoColumnsand the class inheritance update fromAttributetoColumnalign perfectly with the terminology migration objectives.
12-24: LGTM: Constructor parameter type and parent call updated correctly.The constructor parameter type change from
CollectiontoTableand the corresponding parent constructor call are properly implemented.
75-75: LGTM: Type constant updated correctly.The
getType()method correctly returnsColumn::TYPE_STRINGinstead of the oldAttribute::TYPE_STRINGconstant.src/Migration/Resources/Database/Column.php (4)
8-19: LGTM: Class renamed and type constants updated consistently.The class name change from
AttributetoColumnand all the type constants are properly updated to reflect the new terminology.
36-50: LGTM: Constructor updated with new parameter types and enhanced with timestamps.The constructor parameter type change from
CollectiontoTableis correct, and the addition of$createdAtand$updatedAtparameters enhances the resource model with proper timestamp tracking.
58-74: LGTM: Serialization updated to use new terminology.The
jsonSerialize()method correctly usestableinstead ofcollectionand includes the new timestamp fields, maintaining consistency with the new resource model.
93-96: LGTM: Getter method renamed consistently.The method name change from
getCollection()togetTable()properly aligns with the new terminology while maintaining the same functionality.src/Migration/Resources/Database/Columns/Enum.php (3)
3-8: LGTM: Namespace and class hierarchy updates are consistent.The namespace change from
AttributestoColumnsand class inheritance update fromAttributetoColumnalign perfectly with the terminology migration.
13-38: LGTM: Constructor properly updated for new terminology.The constructor parameter type change from
CollectiontoTableand the parent constructor call are correctly implemented.
82-82: LGTM: Type constant updated correctly.The
getType()method correctly returnsColumn::TYPE_ENUMinstead of the oldAttribute::TYPE_ENUMconstant.src/Migration/Resources/Database/Columns/Email.php (3)
3-6: LGTM: Namespace and import updates are consistent.The namespace change from
AttributestoColumnsand the import statements usingColumnandTablealign with the terminology migration.
10-31: LGTM: Constructor parameter type updated correctly.The constructor parameter type change from
CollectiontoTableand the parent constructor call are properly implemented.
35-35: LGTM: Type constant updated correctly.The
getType()method correctly returnsColumn::TYPE_EMAILinstead of the oldAttribute::TYPE_EMAILconstant.src/Migration/Resources/Database/Columns/Decimal.php (3)
3-8: LGTM: Namespace and class hierarchy updates are consistent.The namespace change from
AttributestoColumnsand class inheritance update fromAttributetoColumnalign with the terminology migration objectives.
10-39: LGTM: Constructor properly updated for new terminology.The constructor parameter type change from
CollectiontoTableand the parent constructor call are correctly implemented.
83-83: LGTM: Type constant updated correctly.The
getType()method correctly returnsColumn::TYPE_FLOATinstead of the oldAttribute::TYPE_FLOATconstant.src/Migration/Resources/Database/Columns/URL.php (3)
3-6: LGTM! Clean namespace and import updates.The refactoring correctly moves the class from
AttributestoColumnsnamespace and updates imports to use the newColumnandTableclasses.
10-22: LGTM! Constructor properly updated.The constructor parameter type correctly changed from
CollectiontoTable, maintaining consistency with the new terminology.
33-36: LGTM! Type constant correctly updated.The
getType()method properly returnsColumn::TYPE_URLinstead of the oldAttribute::TYPE_URL.src/Migration/Resources/Database/Columns/Boolean.php (4)
3-8: LGTM! Namespace and import updates are correct.The refactoring properly moves from
AttributestoColumnsnamespace and updates imports consistently.
10-28: LGTM! Constructor correctly refactored.The constructor parameter type properly changed from
CollectiontoTablewith correct parent constructor call.
54-55: LGTM! Static method correctly updated.The
fromArraymethod properly usesTable::fromArray()instead of the oldCollection::fromArray().
64-67: LGTM! Type constant correctly updated.The
getType()method properly returnsColumn::TYPE_BOOLEANinstead of the old constant.src/Migration/Resources/Database/Columns/DateTime.php (3)
3-8: LGTM! Namespace and import updates are correct.The refactoring properly updates the namespace and imports to use the new terminology.
10-29: LGTM! Constructor properly refactored.The constructor correctly changed parameter type from
CollectiontoTablewith proper parent constructor call.
31-34: LGTM! Type constant correctly updated.The
getType()method properly returnsColumn::TYPE_DATETIMEinstead of the old constant.bin/MigrationCLI.php (5)
218-218: LGTM! Dynamic database configuration for source.The change to pass database type to
getDatabase()method enables proper source/destination configuration separation.
255-255: LGTM! Dynamic database configuration for destination.Consistent with the source configuration change, properly enabling type-specific database setup.
265-265: LGTM! Improved method signature.Adding the
$typeparameter enables dynamic configuration selection between source and destination databases.
279-295: LGTM! Enhanced attribute filtering logic.The new switch statement properly handles different attribute types:
VAR_RELATIONSHIP: Correctly processes options and removes the options attributeVAR_STRING: Appropriately sets encryption flag based on filtersThis improves the attribute processing capabilities.
375-396: LGTM! Clean dynamic environment variable selection.The match expression cleanly selects the appropriate environment variable prefix based on type, and the database configuration properly uses the dynamic prefix for DSN, user, password, and namespace.
src/Migration/Resources/Database/Columns/IP.php (3)
3-6: LGTM! Namespace and import updates are correct.The refactoring properly moves from
AttributestoColumnsnamespace and updates imports to use the new terminology.
10-31: LGTM! Constructor properly updated.The constructor parameter type correctly changed from
CollectiontoTable, maintaining consistency with the new terminology.
33-36: LGTM! Type constant correctly updated.The
getType()method properly returnsColumn::TYPE_IPinstead of the oldAttribute::TYPE_IP.src/Migration/Resources/Database/Columns/Integer.php (6)
3-6: LGTM: Namespace and import updates are consistent.The namespace change from
AttributestoColumnsand the corresponding import updates properly reflect the terminology migration.
8-8: LGTM: Class inheritance updated correctly.The class now extends
Columninstead ofAttribute, aligning with the new terminology.
12-12: LGTM: Constructor parameter type updated correctly.The parameter type change from
CollectiontoTableis consistent with the terminology migration.
28-28: LGTM: Parent constructor call updated correctly.The
$tableparameter is now passed to the parent constructor, maintaining consistency with the type change.
72-72: LGTM: Static method call updated correctly.The call to
Table::fromArray()instead ofCollection::fromArray()is consistent with the class renaming.
85-85: LGTM: Constant reference updated correctly.The return value now uses
Column::TYPE_INTEGERinstead ofAttribute::TYPE_INTEGER, maintaining consistency with the terminology migration.src/Migration/Resources/Database/Row.php (6)
8-8: LGTM: Class name updated correctly.The class renaming from
DocumenttoRowaligns with the new terminology.
12-12: LGTM: Property type annotation updated correctly.The PHPDoc annotation correctly reflects the type change from
CollectiontoTable.
17-18: LGTM: Constructor parameter updated correctly.The parameter type and property declaration have been consistently updated from
CollectiontoTable.
47-47: LGTM: Static factory method updated correctly.The
Table::fromArray()call is consistent with the class renaming.
68-68: LGTM: Resource type constant updated correctly.The return value now uses
Resource::TYPE_ROWinstead ofResource::TYPE_DOCUMENT, maintaining consistency with the terminology migration.
76-78: LGTM: Getter method renamed and updated correctly.The method renaming from
getCollection()togetTable()and the corresponding return statement are consistent with the refactor.src/Migration/Resources/Database/Table.php (10)
8-8: LGTM: Class name updated correctly.The class renaming from
CollectiontoTablealigns with the new relational database terminology.
14-14: LGTM: Property parameter renamed correctly.The parameter name change from
$documentSecurityto$rowSecurityis consistent with the terminology migration.
18-18: LGTM: New enabled property added.The addition of the
$enabledproperty with a default value oftrueappears to be a feature enhancement.
24-24: LGTM: Constructor property updated correctly.The property declaration uses the new
$rowSecuritynaming consistently.
46-46: LGTM: Documentation updated for new property.The PHPDoc correctly documents the new
enabledproperty in the array structure.
55-55: LGTM: Backward compatibility maintained.The
fromArraymethod correctly maps the old'documentSecurity'key to the newrowSecurityparameter, maintaining backward compatibility during the transition.
72-72: LGTM: Serialization key updated correctly.The JSON serialization now uses
'rowSecurity'instead of'documentSecurity', consistent with the property renaming.
82-82: LGTM: Resource type constant updated correctly.The return value now uses
Resource::TYPE_TABLEinstead ofResource::TYPE_COLLECTION, maintaining consistency with the terminology migration.
95-95: LGTM: Method renamed correctly.The method name change from
getCollectionName()togetTableName()is consistent with the class refactor.
100-102: LGTM: Security getter method updated correctly.The method renaming from
getDocumentSecurity()togetRowSecurity()and the corresponding property access are consistent with the refactor.src/Migration/Resources/Database/Index.php (9)
19-19: LGTM: Parameter type annotation updated correctly.The PHPDoc correctly reflects the type change from
CollectiontoTable.
21-21: LGTM: Parameter annotation updated correctly.The PHPDoc correctly reflects the parameter change from
attributestocolumns.
30-30: LGTM: Constructor parameter updated correctly.The parameter type change from
CollectiontoTableis consistent with the terminology migration.
32-32: LGTM: Constructor parameter updated correctly.The parameter name and type change from
$attributesto$columnsis consistent with the terminology migration.
68-68: LGTM: Static method call updated correctly.The call to
Table::fromArray()instead ofCollection::fromArray()is consistent with the class renaming.
86-86: Verify serialization format compatibility.The JSON serialization key changed from
'collection'to'table'. Ensure that downstream consumers have been updated to handle this change.
88-88: Verify serialization format compatibility.The JSON serialization key changed from
'attributes'to'columns'. Ensure that downstream consumers have been updated to handle this change.
111-113: LGTM: Getter method renamed correctly.The method renaming from
getCollection()togetTable()and the corresponding return statement are consistent with the refactor.
124-126: LGTM: Getter method renamed correctly.The method renaming from
getAttributes()togetColumns()and the corresponding property access are consistent with the refactor.src/Migration/Sources/CSV.php (14)
8-11: LGTM: Import statements updated correctly.The imports now reference the new
Column,Row, andTableclasses instead of the oldAttribute,Document, andCollectionclasses.
52-52: LGTM: Resource type constant updated correctly.The supported resource type now uses
Resource::TYPE_ROWinstead ofResource::TYPE_DOCUMENT.
71-71: LGTM: Report resource type updated correctly.The report array key now uses
Resource::TYPE_ROWconsistently.
87-88: LGTM: Method call updated correctly.The condition check and method call have been updated to use
Resource::TYPE_ROWandexportRows()respectively.
93-93: LGTM: Exception resource type updated correctly.The exception now uses
Resource::TYPE_ROWin the error context.
112-117: LGTM: Variable naming and object creation updated correctly.The variable names have been updated from
$attributesto$columns, and the object creation uses the newTableclass consistently.
115-115: LGTM: Resource ID parsing updated correctly.The parsing now correctly splits into
$databaseIdand$tableIdinstead of$collectionId.
125-125: LGTM: Database reader method updated correctly.The method call now uses
listColumns()instead oflistAttributes(), consistent with the terminology migration.
145-145: LGTM: Column type constant updated correctly.The comparison now uses
Column::TYPE_RELATIONSHIPinstead ofAttribute::TYPE_RELATIONSHIP.
154-154: LGTM: Column type constant updated correctly.The condition now uses
Column::TYPE_RELATIONSHIPconsistently.
201-203: LGTM: Type matching updated correctly.The match expression now uses the new
Column::TYPE_*constants instead ofAttribute::TYPE_*constants.
208-214: LGTM: Row creation updated correctly.The variable naming (
$rowId) and object creation now use theRowclass instead ofDocument, maintaining consistency with the terminology migration.
289-289: LGTM: Method parameter updated correctly.The parameter name change from
$attributeTypesto$columnTypesis consistent with the terminology migration.
291-309: LGTM: Validation logic updated correctly.The validation error messages now refer to "columns" instead of "attributes", maintaining consistency with the new terminology.
src/Migration/Destinations/Appwrite.php (2)
336-350: Good terminology updates in the createDatabase method.The method correctly uses the new
columnsvariable name and properly creates the database structure with the updated terminology.
134-204: Comprehensive API scope checking implementation.The
report()method implementation is well-structured with proper error handling and scope validation for each resource type.src/Migration/Sources/Appwrite.php (2)
1293-1295: Good defensive programming for optional deployment field.Using the null coalescing operator prevents potential undefined index errors when the deployment field is missing.
669-714: Well-implemented table export functionality.The
exportTablesmethod correctly uses the new terminology and maintains the same logic flow as before with proper error handling.src/Migration/Sources/Appwrite/Reader.php (1)
9-109: Interface updates are consistent with new terminology.All method names and parameter types have been properly updated from Collection/Attribute/Document to Table/Column/Row. The explicit
mixedreturn type on thereportmethod improves type safety.src/Migration/Sources/NHost.php (1)
772-772: LGTM! Valid simplification of PDO parameter binding.Removing the explicit
PDO::PARAM_STRtype hint is acceptable asbindValue()will automatically infer the correct parameter type from the value.
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: 1
♻️ Duplicate comments (1)
src/Migration/Resources/Database/Columns/Relationship.php (1)
86-89: Update method to use consistent terminology.The
getRelatedTable()method is returning$this->options['relatedCollection']but the constructor sets this asrelatedTable.Apply this fix:
public function getRelatedTable(): string { - return $this->options['relatedCollection']; + return $this->options['relatedTable']; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/Migration/Resources/Database/Columns/Relationship.php(3 hunks)tests/Migration/E2E/Sources/NHostTest.php(2 hunks)tests/Migration/E2E/Sources/SupabaseTest.php(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- tests/Migration/E2E/Sources/NHostTest.php
- tests/Migration/E2E/Sources/SupabaseTest.php
🧰 Additional context used
🪛 PHPMD (2.15.0)
src/Migration/Resources/Database/Columns/Relationship.php
16-16: The method __construct has a boolean flag argument $twoWay, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
69-69: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
🔇 Additional comments (3)
src/Migration/Resources/Database/Columns/Relationship.php (3)
3-7: LGTM! Namespace and imports correctly updated.The namespace change from
AttributestoColumnsand the import updates fromAttribute/CollectiontoColumn/Tableare consistent with the systematic terminology refactoring.
9-37: LGTM! Constructor properly updated for new terminology.The class inheritance change from
AttributetoColumnand the constructor parameter updates fromCollection $collectiontoTable $tableand$relatedCollectionto$relatedTableare consistent with the systematic refactoring. The options array correctly stores therelatedTablevalue.
83-83: LGTM! Type constant correctly updated.The change from
Attribute::TYPE_RELATIONSHIPtoColumn::TYPE_RELATIONSHIPis consistent with the systematic refactoring.
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: 0
♻️ Duplicate comments (1)
src/Migration/Sources/Appwrite/Reader/API.php (1)
8-8: Commented Tables service references are intentionally kept for future implementation.Based on the retrieved learnings, these commented-out Tables service references (import and constructor parameter) are intentional placeholders for when the Tables service becomes available in the Appwrite SDK, rather than dead code that should be removed.
Also applies to: 19-22
🧹 Nitpick comments (1)
src/Migration/Sources/Appwrite/Reader/API.php (1)
96-96: Minor comment inconsistency in placeholder.The comment mentions
$columnsResponsebut should be$indexesResponsesince this section handles index counting.- /* $columnsResponse = $this->tables->listIndexes(...); */ + /* $indexesResponse = $this->tables->listIndexes(...); */
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
src/Migration/Resources/Database/Columns/Boolean.php(5 hunks)src/Migration/Resources/Database/Columns/DateTime.php(4 hunks)src/Migration/Resources/Database/Columns/Decimal.php(6 hunks)src/Migration/Resources/Database/Columns/Enum.php(5 hunks)src/Migration/Resources/Database/Columns/Integer.php(6 hunks)src/Migration/Resources/Database/Columns/Relationship.php(5 hunks)src/Migration/Resources/Database/Columns/Text.php(5 hunks)src/Migration/Resources/Database/Index.php(7 hunks)src/Migration/Resources/Database/Row.php(5 hunks)src/Migration/Resources/Database/Table.php(6 hunks)src/Migration/Sources/Appwrite/Reader/API.php(5 hunks)
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Columns/Relationship.php:86-89
Timestamp: 2025-06-28T09:45:57.650Z
Learning: In the utopia-php/migration codebase Relationship column class, the `getRelatedTable()` method intentionally returns `$this->options['relatedCollection']` (not `relatedTable`) because the underlying API still uses "collection" terminology, even though the internal codebase has been refactored to use "table" terminology.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite/Reader/API.php:8-8
Timestamp: 2025-06-28T09:47:11.436Z
Learning: In the Appwrite migration codebase, commented-out Tables service references (import statements and constructor parameters) are intentionally kept for future implementation when the Tables service becomes available in the Appwrite SDK, rather than being dead code that should be removed.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
src/Migration/Sources/Appwrite/Reader/API.php (4)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite/Reader/API.php:8-8
Timestamp: 2025-06-28T09:47:11.436Z
Learning: In the Appwrite migration codebase, commented-out Tables service references (import statements and constructor parameters) are intentionally kept for future implementation when the Tables service becomes available in the Appwrite SDK, rather than being dead code that should be removed.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Columns/Relationship.php:86-89
Timestamp: 2025-06-28T09:45:57.650Z
Learning: In the utopia-php/migration codebase Relationship column class, the `getRelatedTable()` method intentionally returns `$this->options['relatedCollection']` (not `relatedTable`) because the underlying API still uses "collection" terminology, even though the internal codebase has been refactored to use "table" terminology.
src/Migration/Resources/Database/Columns/Boolean.php (3)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
src/Migration/Resources/Database/Columns/DateTime.php (4)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Columns/Relationship.php:86-89
Timestamp: 2025-06-28T09:45:57.650Z
Learning: In the utopia-php/migration codebase Relationship column class, the `getRelatedTable()` method intentionally returns `$this->options['relatedCollection']` (not `relatedTable`) because the underlying API still uses "collection" terminology, even though the internal codebase has been refactored to use "table" terminology.
src/Migration/Resources/Database/Columns/Decimal.php (3)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
src/Migration/Resources/Database/Columns/Enum.php (3)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
src/Migration/Resources/Database/Columns/Integer.php (3)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
src/Migration/Resources/Database/Columns/Relationship.php (5)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Columns/Relationship.php:86-89
Timestamp: 2025-06-28T09:45:57.650Z
Learning: In the utopia-php/migration codebase Relationship column class, the `getRelatedTable()` method intentionally returns `$this->options['relatedCollection']` (not `relatedTable`) because the underlying API still uses "collection" terminology, even though the internal codebase has been refactored to use "table" terminology.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite/Reader/API.php:8-8
Timestamp: 2025-06-28T09:47:11.436Z
Learning: In the Appwrite migration codebase, commented-out Tables service references (import statements and constructor parameters) are intentionally kept for future implementation when the Tables service becomes available in the Appwrite SDK, rather than being dead code that should be removed.
src/Migration/Resources/Database/Columns/Text.php (4)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Columns/Relationship.php:86-89
Timestamp: 2025-06-28T09:45:57.650Z
Learning: In the utopia-php/migration codebase Relationship column class, the `getRelatedTable()` method intentionally returns `$this->options['relatedCollection']` (not `relatedTable`) because the underlying API still uses "collection" terminology, even though the internal codebase has been refactored to use "table" terminology.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
src/Migration/Resources/Database/Index.php (4)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Columns/Relationship.php:86-89
Timestamp: 2025-06-28T09:45:57.650Z
Learning: In the utopia-php/migration codebase Relationship column class, the `getRelatedTable()` method intentionally returns `$this->options['relatedCollection']` (not `relatedTable`) because the underlying API still uses "collection" terminology, even though the internal codebase has been refactored to use "table" terminology.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
src/Migration/Resources/Database/Row.php (4)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Columns/Relationship.php:86-89
Timestamp: 2025-06-28T09:45:57.650Z
Learning: In the utopia-php/migration codebase Relationship column class, the `getRelatedTable()` method intentionally returns `$this->options['relatedCollection']` (not `relatedTable`) because the underlying API still uses "collection" terminology, even though the internal codebase has been refactored to use "table" terminology.
src/Migration/Resources/Database/Table.php (5)
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite.php:843-851
Timestamp: 2025-06-28T09:47:08.333Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the class constructors and method parameters use the new terminology (like "relatedTable"), but the underlying data structures and API responses still use the legacy keys (like "relatedCollection"). This is an intentional design pattern to allow gradual migration while maintaining compatibility with existing data sources.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Supabase.php:300-308
Timestamp: 2025-06-28T09:47:58.757Z
Learning: In the utopia-php/migration codebase, during the terminology swap from Collection/Attribute/Document to Table/Column/Row, the user ItzNotABug prefers to keep the existing query logic unchanged even if it becomes semantically incorrect with the new naming. The focus is purely on resource type renaming, not on fixing logical issues that become apparent after the terminology change.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Columns/Relationship.php:86-89
Timestamp: 2025-06-28T09:45:57.650Z
Learning: In the utopia-php/migration codebase Relationship column class, the `getRelatedTable()` method intentionally returns `$this->options['relatedCollection']` (not `relatedTable`) because the underlying API still uses "collection" terminology, even though the internal codebase has been refactored to use "table" terminology.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Resources/Database/Row.php:60-60
Timestamp: 2025-06-28T09:45:36.026Z
Learning: In the utopia-php/migration codebase, the `fromArray` method is not used on Row objects, so mismatches between `jsonSerialize()` output keys and `fromArray()` input expectations for Row class are not problematic.
Learnt from: ItzNotABug
PR: utopia-php/migration#80
File: src/Migration/Sources/Appwrite/Reader/API.php:8-8
Timestamp: 2025-06-28T09:47:11.436Z
Learning: In the Appwrite migration codebase, commented-out Tables service references (import statements and constructor parameters) are intentionally kept for future implementation when the Tables service becomes available in the Appwrite SDK, rather than being dead code that should be removed.
🧬 Code Graph Analysis (3)
src/Migration/Resources/Database/Columns/Decimal.php (8)
src/Migration/Resources/Database/Column.php (1)
Column(8-151)src/Migration/Resources/Database/Table.php (3)
Table(8-110)__construct(20-32)fromArray(50-62)src/Migration/Resources/Database/Columns/Enum.php (2)
__construct(13-38)fromArray(75-88)src/Migration/Resources/Database/Columns/DateTime.php (2)
__construct(10-29)fromArray(67-78)src/Migration/Resources/Database/Columns/Boolean.php (2)
__construct(10-28)fromArray(61-72)src/Migration/Resources/Database/Columns/Relationship.php (2)
__construct(11-37)fromArray(75-89)src/Migration/Resources/Database/Columns/Integer.php (2)
__construct(10-41)fromArray(78-91)src/Migration/Resources/Database/Columns/Text.php (2)
__construct(11-33)fromArray(68-81)
src/Migration/Resources/Database/Columns/Enum.php (2)
src/Migration/Resources/Database/Column.php (1)
Column(8-151)src/Migration/Resources/Database/Table.php (3)
Table(8-110)__construct(20-32)fromArray(50-62)
src/Migration/Resources/Database/Columns/Text.php (2)
src/Migration/Resources/Database/Column.php (1)
Column(8-151)src/Migration/Resources/Database/Table.php (3)
Table(8-110)__construct(20-32)fromArray(50-62)
🪛 phpcs (3.7.2)
src/Migration/Sources/Appwrite/Reader/API.php
[ERROR] 14-14: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 16-16: Missing @category tag in class comment
(PEAR.Commenting.ClassComment.MissingCategoryTag)
[ERROR] 16-16: Missing @Package tag in class comment
(PEAR.Commenting.ClassComment.MissingPackageTag)
[ERROR] 16-16: Missing @author tag in class comment
(PEAR.Commenting.ClassComment.MissingAuthorTag)
[ERROR] 16-16: Missing @license tag in class comment
(PEAR.Commenting.ClassComment.MissingLicenseTag)
[ERROR] 16-16: Missing @link tag in class comment
(PEAR.Commenting.ClassComment.MissingLinkTag)
[ERROR] 19-19: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 25-25: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 25-25: Doc comment for parameter "$resources" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 25-25: Doc comment for parameter "$report" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 27-27: Missing @return tag in function comment
(PEAR.Commenting.FunctionComment.MissingReturn)
[ERROR] 56-56: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 56-56: Closing parenthesis of a multi-line IF statement must be on a new line
(PEAR.ControlStructures.MultiLineCondition.CloseBracketNewLine)
[ERROR] 73-73: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 74-74: Each line in a multi-line IF statement must begin with a boolean operator
(PEAR.ControlStructures.MultiLineCondition.StartWithBoolean)
[ERROR] 74-74: Closing parenthesis of a multi-line IF statement must be on a new line
(PEAR.ControlStructures.MultiLineCondition.CloseBracketNewLine)
[ERROR] 127-127: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 128-128: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 128-128: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 129-129: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 129-129: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 130-130: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 131-131: Tag @throws cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 144-144: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 144-144: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 145-145: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 145-145: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 146-146: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 147-147: Tag @throws cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 161-161: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 161-161: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 162-162: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 162-162: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 163-163: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 164-164: Tag @throws cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 177-177: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 177-177: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 177-177: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 178-178: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 178-178: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 179-179: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 179-179: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 179-179: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 180-180: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 181-181: Tag @throws cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 194-194: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 195-195: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 195-195: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 196-196: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
[ERROR] 203-203: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 204-204: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 204-204: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 205-205: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 205-205: Expected 2 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 205-205: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
[ERROR] 206-206: Tag @return cannot be grouped with parameter tags in a doc comment
(Generic.Commenting.DocComment.NonParamGroup)
src/Migration/Resources/Database/Columns/Boolean.php
[ERROR] 8-8: Missing doc comment for class Boolean
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/DateTime.php
[ERROR] 8-8: Missing doc comment for class DateTime
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 36-36: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 36-36: Doc comment for parameter "$array" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 37-37: Missing parameter name
(PEAR.Commenting.FunctionComment.MissingParamName)
[ERROR] 37-37: Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
(Generic.Commenting.DocComment.TagValueIndent)
src/Migration/Resources/Database/Columns/Decimal.php
[ERROR] 8-8: Missing doc comment for class Decimal
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/Enum.php
[ERROR] 8-8: Missing doc comment for class Enum
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 10-10: Doc comment for parameter "$key" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$table" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$required" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$default" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$array" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$size" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$createdAt" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 10-10: Doc comment for parameter "$updatedAt" missing
(PEAR.Commenting.FunctionComment.MissingParamTag)
[ERROR] 11-11: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 11-11: Doc comment for parameter $elements does not match actual variable name $key
(PEAR.Commenting.FunctionComment.ParamNameNoMatch)
src/Migration/Resources/Database/Columns/Integer.php
[ERROR] 8-8: Missing doc comment for class Integer
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/Relationship.php
[ERROR] 9-9: Missing doc comment for class Relationship
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 11-11: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 96-96: Missing doc comment for function getRelatedTable()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Columns/Text.php
[ERROR] 9-9: Missing doc comment for class Text
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 11-11: Missing doc comment for function __construct()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Index.php
[ERROR] 19-19: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 19-19: Expected 9 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 20-20: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 20-20: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 21-21: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 22-22: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 22-22: Expected 4 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 23-23: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 24-24: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 24-24: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 25-25: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 25-25: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 122-122: Missing doc comment for function getTable()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Row.php
[ERROR] 8-8: Missing doc comment for class Row
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 11-11: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 11-11: Expected 15 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 12-12: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 12-12: Expected 16 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 13-13: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 14-14: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 14-14: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 76-76: Missing doc comment for function getName()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 81-81: Missing doc comment for function getGroup()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 86-86: Missing doc comment for function getTable()
(PEAR.Commenting.FunctionComment.Missing)
src/Migration/Resources/Database/Table.php
[ERROR] 8-8: Missing doc comment for class Table
(PEAR.Commenting.ClassComment.Missing)
[ERROR] 10-10: Missing short description in doc comment
(Generic.Commenting.DocComment.MissingShort)
[ERROR] 11-11: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 11-11: Expected 6 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 12-12: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 12-12: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 13-13: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 13-13: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 14-14: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 14-14: Expected 10 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 15-15: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 16-16: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 16-16: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 17-17: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 17-17: Expected 8 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 18-18: Missing parameter comment
(PEAR.Commenting.FunctionComment.MissingParamComment)
[ERROR] 18-18: Expected 10 spaces after parameter type; 1 found
(PEAR.Commenting.FunctionComment.SpacingAfterParamType)
[ERROR] 96-96: Missing doc comment for function getTableName()
(PEAR.Commenting.FunctionComment.Missing)
[ERROR] 101-101: Missing doc comment for function getRowSecurity()
(PEAR.Commenting.FunctionComment.Missing)
🪛 PHPMD (2.15.0)
src/Migration/Sources/Appwrite/Reader/API.php
84-84: Avoid using static access to class '\Appwrite\Query' in method 'report'. (Clean Code Rules)
(StaticAccess)
200-200: Avoid using static access to class '\Appwrite\Query' in method 'querySelect'. (Clean Code Rules)
(StaticAccess)
210-210: Avoid using static access to class '\Appwrite\Query' in method 'queryEqual'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/Boolean.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
65-65: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/DateTime.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
71-71: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/Decimal.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
18-18: The method __construct has a boolean flag argument $signed, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
80-80: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/Enum.php
17-17: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
19-19: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
79-79: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/Integer.php
13-13: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
15-15: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
18-18: The method __construct has a boolean flag argument $signed, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
82-82: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/Relationship.php
16-16: The method __construct has a boolean flag argument $twoWay, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
79-79: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Columns/Text.php
14-14: The method __construct has a boolean flag argument $required, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
16-16: The method __construct has a boolean flag argument $array, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
72-72: Avoid using static access to class '\Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Index.php
79-79: Avoid using static access to class 'Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Row.php
57-57: Avoid using static access to class 'Utopia\Migration\Resources\Database\Table' in method 'fromArray'. (Clean Code Rules)
(StaticAccess)
src/Migration/Resources/Database/Table.php
24-24: The method __construct has a boolean flag argument $rowSecurity, which is a certain sign of a Single Responsibility Principle violation. (Clean Code Rules)
(BooleanArgumentFlag)
🔇 Additional comments (28)
src/Migration/Resources/Database/Columns/Enum.php (4)
3-3: LGTM! Namespace and inheritance changes align with terminology swap.The namespace change from
AttributestoColumnsand class inheritance change fromAttributetoColumnare consistent with the systematic refactor across the codebase.Also applies to: 5-6, 8-8
14-15: LGTM! Constructor parameter type updated correctly.The constructor parameter type change from
CollectiontoTableand corresponding parent constructor call are consistent with the terminology swap.Also applies to: 26-26
43-62: LGTM! Backward compatibility maintained in fromArray method.The
fromArraymethod correctly supports bothtableandcollectionkeys with proper fallback ($array['table'] ?? $array['collection']), maintaining compatibility with existing data sources during the gradual migration.Also applies to: 79-79
92-92: LGTM! Type constant updated correctly.The
getType()method now correctly returnsColumn::TYPE_ENUMinstead of the legacyAttribute::TYPE_ENUMconstant.src/Migration/Resources/Database/Columns/Decimal.php (4)
3-3: LGTM! Namespace and inheritance changes follow established pattern.Consistent with other column classes in this refactor - moved from
AttributestoColumnsnamespace and now extendsColumninstead ofAttribute.Also applies to: 5-6, 8-8
12-12: LGTM! Constructor correctly updated for Table parameter.The constructor parameter type change from
CollectiontoTableand parent constructor call are implemented correctly.Also applies to: 27-27
44-63: LGTM! Proper backward compatibility in fromArray.The
fromArraymethod maintains compatibility by accepting bothtableandcollectionkeys, consistent with the gradual migration strategy.Also applies to: 80-80
93-93: LGTM! Type constant updated appropriately.Returns
Column::TYPE_FLOATwhich is the correct constant for decimal/float columns in the new system.src/Migration/Resources/Database/Columns/Text.php (4)
3-3: LGTM! Namespace and inheritance changes are consistent.The namespace change to
Columnsand inheritance fromColumnfollow the established refactoring pattern.Also applies to: 6-7, 9-9
12-13: LGTM! Constructor parameter correctly updated.The
Tableparameter type and parent constructor call are properly implemented for the terminology swap.Also applies to: 24-24
38-57: LGTM! fromArray supports both old and new terminology.Proper backward compatibility implementation with
$array['table'] ?? $array['collection']fallback pattern.Also applies to: 72-72
85-85: LGTM! Correct type constant for text columns.Returns
Column::TYPE_STRINGwhich is the appropriate constant for text-based columns.src/Migration/Resources/Database/Row.php (4)
8-8: LGTM! Class rename and constructor updated correctly.The class rename from
DocumenttoRowand constructor parameter change fromCollectiontoTableare consistent with the systematic terminology refactor.Also applies to: 12-12, 18-18
29-48: LGTM! fromArray maintains backward compatibility.The
fromArraymethod correctly supports bothtableandcollectionkeys for gradual migration compatibility.Also applies to: 57-57
70-70: LGTM! Serialization key updated to 'table'.The
jsonSerialize()method now correctly outputs'table'instead of'collection', aligning with the new terminology. Based on previous learnings,fromArrayis not used on Row objects, so this change won't cause compatibility issues.
78-78: LGTM! Method and constant names updated appropriately.The
getName()method returnsResource::TYPE_ROWand the getter method is correctly renamed fromgetCollection()togetTable().Also applies to: 86-88
src/Migration/Resources/Database/Columns/Boolean.php (4)
3-3: LGTM! Namespace and inheritance changes are consistent.The move from
AttributestoColumnsnamespace and inheritance fromColumninstead ofAttributefollow the established refactoring pattern.Also applies to: 5-6, 8-8
12-12: LGTM! Constructor parameter type updated correctly.The
Tableparameter type and parent constructor call properly implement the terminology swap fromCollectiontoTable.Also applies to: 21-21
33-52: LGTM! Backward compatibility maintained in fromArray.The
fromArraymethod correctly supports bothtableandcollectionkeys with proper fallback, maintaining compatibility during the gradual migration.Also applies to: 65-65
76-76: LGTM! Type constant updated correctly.Returns
Column::TYPE_BOOLEANwhich is the appropriate constant for boolean columns in the new system.src/Migration/Resources/Database/Columns/DateTime.php (1)
3-34: LGTM! Consistent terminology refactoring.The namespace change from
AttributestoColumns, class inheritance fromColumn, and constructor parameter type change fromCollectiontoTableare all consistent with the broader terminology migration. The backward compatibility infromArraymethod (line 71) is well-handled.src/Migration/Resources/Database/Columns/Integer.php (1)
3-96: LGTM! Consistent refactoring implementation.The changes follow the same pattern as other column classes: namespace migration to
Columns, extendingColumninstead ofAttribute, and updating constructor to acceptTableinstead ofCollection. ThefromArraymethod properly handles compatibility with both new and legacy keys.src/Migration/Resources/Database/Table.php (1)
8-110: LGTM! Core table refactoring properly implemented.The class successfully transitions from
CollectiontoTablewith comprehensive updates:
- Property
documentSecurity→rowSecurity- Method
getCollectionName()→getTableName()- Backward compatibility maintained in
fromArray()(line 56)- Serialization updated to use new terminology
The refactoring maintains consistency across the codebase while preserving compatibility with existing data structures.
src/Migration/Resources/Database/Index.php (1)
19-138: LGTM! Consistent index refactoring with proper compatibility.The Index class properly updates terminology:
- Constructor parameter
Collection→Table- Property/method
attributes→columns- Backward compatibility maintained in
fromArray()(lines 79, 81)- Serialization keys updated consistently
The changes align with the broader database resource model migration.
src/Migration/Resources/Database/Columns/Relationship.php (1)
3-125: LGTM! Relationship refactoring with proper API compatibility.The changes consistently follow the terminology migration pattern while maintaining compatibility with the underlying API. The
fromArray()method (line 80) andgetRelatedTable()method (line 98) correctly handle both new (relatedTable) and legacy (relatedCollection) keys, which aligns with the intentional design pattern for gradual migration while preserving compatibility with existing data sources.src/Migration/Sources/Appwrite/Reader/API.php (3)
28-105: LGTM! Improved report() method implementation.The report method has been significantly improved with:
- Clear definition of relevant resource types using new terminology
- Efficient early returns when no relevant resources are requested
- Well-structured nested loops for processing databases and tables
- Proper resource counting for all supported types
The logic correctly handles the terminology transition while maintaining compatibility with the existing Databases service API.
118-125: Consistent method signature updates for terminology swap.All method signatures have been properly updated to use the new
Tableclass and terminology while maintaining compatibility with the underlying Databases service API. The pattern of using new terminology in method parameters while calling legacy API methods is consistent with the gradual migration approach.Also applies to: 133-141, 149-157, 166-174, 183-192
198-211: Parameter names correctly updated for query methods.The parameter names have been properly updated from
attributes/attributetocolumns/columnto align with the new terminology, while the underlying Query methods remain unchanged for compatibility.
This PR changes naming by swapping old terminologies with the new ones across constants, methods, and variables.
Note: The new API is not used yet for API Key - based source fetches, as the source instance may not support it.
Also includes improvements to the
report()method on the Databases for better perf.Summary by CodeRabbit
Refactor
Documentation