Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: KaririCode-Framework/kariricode-data-structure
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.1
Choose a base ref
...
head repository: KaririCode-Framework/kariricode-data-structure
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 8 commits
  • 17 files changed
  • 4 contributors

Commits on Sep 27, 2024

  1. refactor(Tree): Move TreeMapNode to Tree directory and add TreeNode w…

    …ith tests
    
    - Moved TreeMapNode class to the Tree directory for better structure.
    - Created TreeNode.php with full implementation.
    - Added comprehensive tests for TreeNode, covering left and right child handling, parent removal, and node replacement.
    - Ensured 100% test coverage for TreeNode functionality.
    walmir-silva committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    8cc515e View commit details
    Browse the repository at this point in the history
  2. Merge pull request #13 from KaririCode-Framework/develop

    refactor(Tree): Move TreeMapNode to Tree directory and add TreeNode w…
    walmir-silva authored Sep 27, 2024
    Configuration menu
    Copy the full SHA
    9a49838 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. refactor(Collections): improve ArrayList and LinkedList implementations

    This commit enhances both ArrayList and LinkedList classes to provide
    better key handling, consistent exception throwing, and support for
    mixed key types. It improves type safety, performance, and API consistency.
    
    ArrayList changes:
    - Add isValidArrayKey method for key validation (int or string)
    - Update set method to throw exceptions for invalid keys and out-of-range indices
    - Modify hasKey method to use isValidArrayKey and array_key_exists
    - Update get method to use the new hasKey implementation
    - Add keyToString method for better error messages
    - Simplify contains method using in_array for better performance
    
    LinkedList changes:
    - Modify set and get methods to support mixed key types
    - Implement findNode method to locate nodes by index or value
    - Add compareValues method for flexible element comparison
    - Update exception messages to include key information
    - Ensure consistent behavior between numeric and non-numeric keys
    
    General:
    - Update method signatures to use mixed type consistently across both classes
    - Improve code comments and method descriptions
    walmir-silva committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    6f17c43 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #14 from KaririCode-Framework/develop

    refactor(Collections): improve ArrayList and LinkedList implementations
    walmir-silva authored Oct 10, 2024
    Configuration menu
    Copy the full SHA
    91c9e7e View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2024

  1. Configuration menu
    Copy the full SHA
    e12252b View commit details
    Browse the repository at this point in the history
  2. Merge pull request #15 from KaririCode-Framework/develop

    fix: remove check hasKey in set method
    walmir-silva authored Oct 30, 2024
    Configuration menu
    Copy the full SHA
    c966a11 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2025

  1. fix(style-code): Resolve static analysis errors and improve type safety

    This commit addresses a series of issues identified by PHPStan, enhancing the overall type safety and robustness of the data structures.
    
    - **BinaryHeap:** Corrected type inference by specifying the heap property as a `list`, which eliminates the need for explicit integer casting when removing elements.
    - **TreeMap/TreeMapNode:** Fixed a potential null pointer exception in `balanceAfterInsertion` by adding a safety check for the grandparent node.
    - **HashMap:** Refactored to use a consistent internal key handling mechanism, resolving type errors and adding proper support for object keys.
    - **ArrayList:** Fixed a `Cannot cast mixed to string` error by explicitly handling the `resource` type.
    - **phpstan.neon:** Cleaned up the configuration by removing obsolete ignored error patterns.
    walmir-silva committed Jul 31, 2025
    Configuration menu
    Copy the full SHA
    997d798 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #16 from KaririCode-Framework/develop

    fix(style-code): Resolve static analysis errors and improve type safety
    walmir-silva authored Jul 31, 2025
    Configuration menu
    Copy the full SHA
    1fc9068 View commit details
    Browse the repository at this point in the history
Loading