Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

types, better error message and fix for numerial key in find #7

Merged
merged 4 commits into from
Mar 28, 2024

Conversation

midahp
Copy link

@midahp midahp commented Mar 25, 2024

  • add correct types to some classes, so they match the interfaces they implement
  • better error message for missing referenced object in lib/Horde/Rdo/Base.php
  • fix Mapper::find with numerically indexed arrays

@midahp midahp requested a review from ralflang March 25, 2024 08:54
Copy link

@ralflang ralflang left a comment

Choose a reason for hiding this comment

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

Approved, with remarks

throw new Horde_Rdo_Exception('The referenced object with key ' . $this->{$rel['foreignKey']} . ' does not exist. Your data is inconsistent');
throw new Horde_Rdo_Exception(sprintf(
'The referenced object of %s instance with key %s = %s does not exist. Your data is inconsistent',
get_class($this),

Choose a reason for hiding this comment

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

I'd prefer using the ::class magic property over get_class but otherwise I like this.

src/RampageObject.php Outdated Show resolved Hide resolved
@ralflang ralflang merged commit 4d13d96 into maintaina-com:FRAMEWORK_6_0 Mar 28, 2024
0 of 3 checks passed
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.

2 participants