Skip to content

Conversation

@ItzNotABug
Copy link
Member

@ItzNotABug ItzNotABug commented Jun 28, 2025

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

    • Updated terminology throughout the application from "Collection", "Attribute", and "Document" to "Table", "Column", and "Row" for all database-related resources.
    • Enhanced environment variable examples to support multiple providers and connection modes with updated naming conventions.
    • Streamlined resource handling, reporting, and export logic across all supported database sources and destinations to reflect new terminology.
    • Updated tests to align with the revised resource naming conventions.
  • Documentation

    • Expanded and reorganized environment variable documentation for clearer configuration across different providers.

@ItzNotABug ItzNotABug self-assigned this Jun 28, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 28, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This 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

File(s) Change Summary
.env.example Expanded with detailed environment variable sections for multiple providers and modes, including Appwrite, Firebase, Supabase, and NHost, and organized for clarity.
bin/MigrationCLI.php getDatabase() now takes a $type parameter for source/destination, dynamically fetches environment variables, and attribute filter logic is extended for string encryption.
src/Migration/Cache.php Internal logic updated to operate on TYPE_ROW alongside TYPE_DOCUMENT for cache operations and status tracking.
src/Migration/Destinations/Appwrite.php
src/Migration/Destinations/Local.php
All resource handling renamed from collection/attribute/document to table/column/row; method signatures and supported resource lists updated accordingly.
src/Migration/Resource.php Constants renamed: TYPE_COLLECTIONTYPE_TABLE, TYPE_ATTRIBUTETYPE_COLUMN, TYPE_DOCUMENTTYPE_ROW; updated in ALL_RESOURCES array; added compatibility map and isSupported() method.
src/Migration/Resources/Database/Column.php
src/Migration/Resources/Database/Columns/*
src/Migration/Resources/Database/Row.php
src/Migration/Resources/Database/Table.php
Classes renamed and refactored from collection/attribute/document to table/column/row, including constructor parameters, property names, serialization keys, static method return values, and added new properties like enabled.
src/Migration/Resources/Database/Index.php References to collections/attributes renamed to tables/columns; constructor parameters, method names, serialization keys, and type hints updated.
src/Migration/Sources/Appwrite.php
src/Migration/Sources/Appwrite/Reader.php
src/Migration/Sources/Appwrite/Reader/API.php
src/Migration/Sources/Appwrite/Reader/Database.php
Resource types, method names, parameter types, and reporting/export logic refactored from collection/attribute/document to table/column/row; interface and implementation signatures updated accordingly.
src/Migration/Sources/CSV.php CSV import/export refactored from document-centric to row-centric; method names, type checks, and error messages updated to reflect table/column/row terminology.
src/Migration/Sources/Firebase.php Resource handling and conversion logic renamed from collection/attribute/document to table/column/row; method names and parameters updated accordingly.
src/Migration/Sources/NHost.php Resource handling, conversion, and reporting logic renamed from collection/attribute/document to table/column/row; method names and SQL queries updated; minor PDO bind parameter type removed.
src/Migration/Sources/Supabase.php Internal report logic updated to use table/column/row resource types instead of collection/attribute/document; no signature changes.
src/Migration/Transfer.php Resource type constants and related logic updated to use table/column/row throughout resource groups and status reporting; variable names and comments updated accordingly.
tests/Migration/E2E/Sources/NHostTest.php
tests/Migration/E2E/Sources/SupabaseTest.php
tests/Migration/Unit/Adapters/MockDestination.php
tests/Migration/Unit/Adapters/MockSource.php
Test code and mock adapters updated to use table/column/row resource types and related method calls instead of collection/attribute/document; import statements and variable names adjusted.

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
Loading

Possibly related PRs

  • Swap terminologies #80: Implements a comprehensive renaming of database resource types and related classes, methods, and variables from legacy terms to new terms, reflecting the same core refactor and terminology swap at the code level.

Poem

🐰
Goodbye, collections, attributes, and docs—
Now tables, columns, rows unlock!
With names aligned and logic neat,
Our migrations skip, hop, and repeat.
From source to destination, clear as day,
The bunny cheers, “Hooray, hooray!”
🥕


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8aae74 and 7b819e9.

📒 Files selected for processing (2)
  • src/Migration/Destinations/Appwrite.php (29 hunks)
  • src/Migration/Sources/Appwrite.php (11 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

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

Support

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

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

CodeRabbit Commands (Invoked using PR comments)

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

Other keywords and placeholders

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

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 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 fromArray method is trying to access $array['options']['relatedCollection'] but based on the array type annotation, this key should be relatedTable.

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 fromArray method correctly uses Table::fromArray but the PHPDoc still references collection in 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 fromArray method correctly uses Table::fromArray but the PHPDoc still references collection in 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 fromArray method correctly uses Table::fromArray but the PHPDoc still references collection in 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 exportRows method 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 exportCollections to exportTables is 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

📥 Commits

Reviewing files that changed from the base of the PR and between ea1c585 and 5a5503f.

📒 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_COLLECTION to TYPE_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_COLLECTION to TYPE_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_ROW resources instead of TYPE_DOCUMENT, with appropriate variable renaming from documentId to rowId.


81-91: LGTM! Consistent terminology update in update method.

The update method correctly uses TYPE_ROW terminology and rowId variable naming, maintaining the same logic with updated terminology.


122-122: LGTM! Consistent terminology update in remove method.

The remove method condition correctly uses TYPE_ROW instead of TYPE_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 Resource class constants defined in src/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 Resource class 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 Attributes to Columns and the class inheritance update from Attribute to Column align perfectly with the terminology migration objectives.


12-24: LGTM: Constructor parameter type and parent call updated correctly.

The constructor parameter type change from Collection to Table and the corresponding parent constructor call are properly implemented.


75-75: LGTM: Type constant updated correctly.

The getType() method correctly returns Column::TYPE_STRING instead of the old Attribute::TYPE_STRING constant.

src/Migration/Resources/Database/Column.php (4)

8-19: LGTM: Class renamed and type constants updated consistently.

The class name change from Attribute to Column and 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 Collection to Table is correct, and the addition of $createdAt and $updatedAt parameters enhances the resource model with proper timestamp tracking.


58-74: LGTM: Serialization updated to use new terminology.

The jsonSerialize() method correctly uses table instead of collection and 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() to getTable() 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 Attributes to Columns and class inheritance update from Attribute to Column align perfectly with the terminology migration.


13-38: LGTM: Constructor properly updated for new terminology.

The constructor parameter type change from Collection to Table and the parent constructor call are correctly implemented.


82-82: LGTM: Type constant updated correctly.

The getType() method correctly returns Column::TYPE_ENUM instead of the old Attribute::TYPE_ENUM constant.

src/Migration/Resources/Database/Columns/Email.php (3)

3-6: LGTM: Namespace and import updates are consistent.

The namespace change from Attributes to Columns and the import statements using Column and Table align with the terminology migration.


10-31: LGTM: Constructor parameter type updated correctly.

The constructor parameter type change from Collection to Table and the parent constructor call are properly implemented.


35-35: LGTM: Type constant updated correctly.

The getType() method correctly returns Column::TYPE_EMAIL instead of the old Attribute::TYPE_EMAIL constant.

src/Migration/Resources/Database/Columns/Decimal.php (3)

3-8: LGTM: Namespace and class hierarchy updates are consistent.

The namespace change from Attributes to Columns and class inheritance update from Attribute to Column align with the terminology migration objectives.


10-39: LGTM: Constructor properly updated for new terminology.

The constructor parameter type change from Collection to Table and the parent constructor call are correctly implemented.


83-83: LGTM: Type constant updated correctly.

The getType() method correctly returns Column::TYPE_FLOAT instead of the old Attribute::TYPE_FLOAT constant.

src/Migration/Resources/Database/Columns/URL.php (3)

3-6: LGTM! Clean namespace and import updates.

The refactoring correctly moves the class from Attributes to Columns namespace and updates imports to use the new Column and Table classes.


10-22: LGTM! Constructor properly updated.

The constructor parameter type correctly changed from Collection to Table, maintaining consistency with the new terminology.


33-36: LGTM! Type constant correctly updated.

The getType() method properly returns Column::TYPE_URL instead of the old Attribute::TYPE_URL.

src/Migration/Resources/Database/Columns/Boolean.php (4)

3-8: LGTM! Namespace and import updates are correct.

The refactoring properly moves from Attributes to Columns namespace and updates imports consistently.


10-28: LGTM! Constructor correctly refactored.

The constructor parameter type properly changed from Collection to Table with correct parent constructor call.


54-55: LGTM! Static method correctly updated.

The fromArray method properly uses Table::fromArray() instead of the old Collection::fromArray().


64-67: LGTM! Type constant correctly updated.

The getType() method properly returns Column::TYPE_BOOLEAN instead 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 Collection to Table with proper parent constructor call.


31-34: LGTM! Type constant correctly updated.

The getType() method properly returns Column::TYPE_DATETIME instead 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 $type parameter 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 attribute
  • VAR_STRING: Appropriately sets encryption flag based on filters

This 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 Attributes to Columns namespace and updates imports to use the new terminology.


10-31: LGTM! Constructor properly updated.

The constructor parameter type correctly changed from Collection to Table, maintaining consistency with the new terminology.


33-36: LGTM! Type constant correctly updated.

The getType() method properly returns Column::TYPE_IP instead of the old Attribute::TYPE_IP.

src/Migration/Resources/Database/Columns/Integer.php (6)

3-6: LGTM: Namespace and import updates are consistent.

The namespace change from Attributes to Columns and the corresponding import updates properly reflect the terminology migration.


8-8: LGTM: Class inheritance updated correctly.

The class now extends Column instead of Attribute, aligning with the new terminology.


12-12: LGTM: Constructor parameter type updated correctly.

The parameter type change from Collection to Table is consistent with the terminology migration.


28-28: LGTM: Parent constructor call updated correctly.

The $table parameter 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 of Collection::fromArray() is consistent with the class renaming.


85-85: LGTM: Constant reference updated correctly.

The return value now uses Column::TYPE_INTEGER instead of Attribute::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 Document to Row aligns with the new terminology.


12-12: LGTM: Property type annotation updated correctly.

The PHPDoc annotation correctly reflects the type change from Collection to Table.


17-18: LGTM: Constructor parameter updated correctly.

The parameter type and property declaration have been consistently updated from Collection to Table.


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_ROW instead of Resource::TYPE_DOCUMENT, maintaining consistency with the terminology migration.


76-78: LGTM: Getter method renamed and updated correctly.

The method renaming from getCollection() to getTable() 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 Collection to Table aligns with the new relational database terminology.


14-14: LGTM: Property parameter renamed correctly.

The parameter name change from $documentSecurity to $rowSecurity is consistent with the terminology migration.


18-18: LGTM: New enabled property added.

The addition of the $enabled property with a default value of true appears to be a feature enhancement.


24-24: LGTM: Constructor property updated correctly.

The property declaration uses the new $rowSecurity naming consistently.


46-46: LGTM: Documentation updated for new property.

The PHPDoc correctly documents the new enabled property in the array structure.


55-55: LGTM: Backward compatibility maintained.

The fromArray method correctly maps the old 'documentSecurity' key to the new rowSecurity parameter, 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_TABLE instead of Resource::TYPE_COLLECTION, maintaining consistency with the terminology migration.


95-95: LGTM: Method renamed correctly.

The method name change from getCollectionName() to getTableName() is consistent with the class refactor.


100-102: LGTM: Security getter method updated correctly.

The method renaming from getDocumentSecurity() to getRowSecurity() 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 Collection to Table.


21-21: LGTM: Parameter annotation updated correctly.

The PHPDoc correctly reflects the parameter change from attributes to columns.


30-30: LGTM: Constructor parameter updated correctly.

The parameter type change from Collection to Table is consistent with the terminology migration.


32-32: LGTM: Constructor parameter updated correctly.

The parameter name and type change from $attributes to $columns is consistent with the terminology migration.


68-68: LGTM: Static method call updated correctly.

The call to Table::fromArray() instead of Collection::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() to getTable() and the corresponding return statement are consistent with the refactor.


124-126: LGTM: Getter method renamed correctly.

The method renaming from getAttributes() to getColumns() 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, and Table classes instead of the old Attribute, Document, and Collection classes.


52-52: LGTM: Resource type constant updated correctly.

The supported resource type now uses Resource::TYPE_ROW instead of Resource::TYPE_DOCUMENT.


71-71: LGTM: Report resource type updated correctly.

The report array key now uses Resource::TYPE_ROW consistently.


87-88: LGTM: Method call updated correctly.

The condition check and method call have been updated to use Resource::TYPE_ROW and exportRows() respectively.


93-93: LGTM: Exception resource type updated correctly.

The exception now uses Resource::TYPE_ROW in the error context.


112-117: LGTM: Variable naming and object creation updated correctly.

The variable names have been updated from $attributes to $columns, and the object creation uses the new Table class consistently.


115-115: LGTM: Resource ID parsing updated correctly.

The parsing now correctly splits into $databaseId and $tableId instead of $collectionId.


125-125: LGTM: Database reader method updated correctly.

The method call now uses listColumns() instead of listAttributes(), consistent with the terminology migration.


145-145: LGTM: Column type constant updated correctly.

The comparison now uses Column::TYPE_RELATIONSHIP instead of Attribute::TYPE_RELATIONSHIP.


154-154: LGTM: Column type constant updated correctly.

The condition now uses Column::TYPE_RELATIONSHIP consistently.


201-203: LGTM: Type matching updated correctly.

The match expression now uses the new Column::TYPE_* constants instead of Attribute::TYPE_* constants.


208-214: LGTM: Row creation updated correctly.

The variable naming ($rowId) and object creation now use the Row class instead of Document, maintaining consistency with the terminology migration.


289-289: LGTM: Method parameter updated correctly.

The parameter name change from $attributeTypes to $columnTypes is 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 columns variable 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 exportTables method 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 mixed return type on the report method improves type safety.

src/Migration/Sources/NHost.php (1)

772-772: LGTM! Valid simplification of PDO parameter binding.

Removing the explicit PDO::PARAM_STR type hint is acceptable as bindValue() will automatically infer the correct parameter type from the value.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 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 as relatedTable.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5a5503f and 93cc21c.

📒 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 Attributes to Columns and the import updates from Attribute/Collection to Column/Table are consistent with the systematic terminology refactoring.


9-37: LGTM! Constructor properly updated for new terminology.

The class inheritance change from Attribute to Column and the constructor parameter updates from Collection $collection to Table $table and $relatedCollection to $relatedTable are consistent with the systematic refactoring. The options array correctly stores the relatedTable value.


83-83: LGTM! Type constant correctly updated.

The change from Attribute::TYPE_RELATIONSHIP to Column::TYPE_RELATIONSHIP is consistent with the systematic refactoring.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 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 $columnsResponse but should be $indexesResponse since this section handles index counting.

-        /* $columnsResponse = $this->tables->listIndexes(...); */
+        /* $indexesResponse = $this->tables->listIndexes(...); */
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93cc21c and 79d401e.

📒 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 Attributes to Columns and class inheritance change from Attribute to Column are 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 Collection to Table and 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 fromArray method correctly supports both table and collection keys 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 returns Column::TYPE_ENUM instead of the legacy Attribute::TYPE_ENUM constant.

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 Attributes to Columns namespace and now extends Column instead of Attribute.

Also applies to: 5-6, 8-8


12-12: LGTM! Constructor correctly updated for Table parameter.

The constructor parameter type change from Collection to Table and parent constructor call are implemented correctly.

Also applies to: 27-27


44-63: LGTM! Proper backward compatibility in fromArray.

The fromArray method maintains compatibility by accepting both table and collection keys, consistent with the gradual migration strategy.

Also applies to: 80-80


93-93: LGTM! Type constant updated appropriately.

Returns Column::TYPE_FLOAT which 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 Columns and inheritance from Column follow the established refactoring pattern.

Also applies to: 6-7, 9-9


12-13: LGTM! Constructor parameter correctly updated.

The Table parameter 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_STRING which 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 Document to Row and constructor parameter change from Collection to Table are consistent with the systematic terminology refactor.

Also applies to: 12-12, 18-18


29-48: LGTM! fromArray maintains backward compatibility.

The fromArray method correctly supports both table and collection keys 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, fromArray is 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 returns Resource::TYPE_ROW and the getter method is correctly renamed from getCollection() to getTable().

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 Attributes to Columns namespace and inheritance from Column instead of Attribute follow the established refactoring pattern.

Also applies to: 5-6, 8-8


12-12: LGTM! Constructor parameter type updated correctly.

The Table parameter type and parent constructor call properly implement the terminology swap from Collection to Table.

Also applies to: 21-21


33-52: LGTM! Backward compatibility maintained in fromArray.

The fromArray method correctly supports both table and collection keys with proper fallback, maintaining compatibility during the gradual migration.

Also applies to: 65-65


76-76: LGTM! Type constant updated correctly.

Returns Column::TYPE_BOOLEAN which 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 Attributes to Columns, class inheritance from Column, and constructor parameter type change from Collection to Table are all consistent with the broader terminology migration. The backward compatibility in fromArray method (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, extending Column instead of Attribute, and updating constructor to accept Table instead of Collection. The fromArray method 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 Collection to Table with comprehensive updates:

  • Property documentSecurityrowSecurity
  • 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 CollectionTable
  • Property/method attributescolumns
  • 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) and getRelatedTable() 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 Table class 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/attribute to columns/column to align with the new terminology, while the underlying Query methods remain unchanged for compatibility.

@abnegate abnegate enabled auto-merge July 17, 2025 12:18
@abnegate abnegate merged commit 973a4da into main Jul 17, 2025
3 of 4 checks passed
@abnegate abnegate deleted the swap-terminology branch July 17, 2025 12:20
@coderabbitai coderabbitai bot mentioned this pull request Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants