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

dev/core#2079 [REF] clean up call to apiQuery #18664

Merged
merged 3 commits into from
Oct 6, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Oct 2, 2020

Overview

This fixes a few things

  1. fixes apiQuery to be called statically as it is a static function
  2. casts results directly to details
  3. removes unused variable

Before

Screen Shot 2020-10-03 at 9 09 42 AM

After

  1. fixes apiQuery to be called statically as it is a static function
  2. casts results directly to details
  3. removes unused variable

Technical Details

The query object that is instantiated is not used in the static function, which instantiates it's own

Comments

@civibot
Copy link

civibot bot commented Oct 2, 2020

(Standard links)

@civibot civibot bot added the master label Oct 2, 2020
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Oct 2, 2020
    This fixes
    1) fixes apiQuery to be called statically as it is a static function
    2) casts results directly to detail

This is the copy & paste source of civicrm#18664 I guess....
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Oct 3, 2020
    This fixes
    1) fixes apiQuery to be called statically as it is a static function
    2) casts results directly to detail

This is the copy & paste source of civicrm#18664 I guess....
@seamuslee001
Copy link
Contributor

@eileenmcnaughton I tried finding a unit test that covered this but couldn't

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 you are right - that class had no cover (& is only called from Member_label despite it's name). I've added a basic 'no error' test to at least ensure this code is passed through.

This fixes a few things
1) fixes apiQuery to be called statically as it is a static function
2) casts results directly to detail
3) removes unnused variable
@eileenmcnaughton
Copy link
Contributor Author

ug - some sort of caching in jenkins - added a couple of lines to try to find it.

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 ok - the test is passing now

@seamuslee001
Copy link
Contributor

changes seem fine now merging

@seamuslee001 seamuslee001 merged commit e7ac827 into civicrm:master Oct 6, 2020
@seamuslee001 seamuslee001 deleted the list branch October 6, 2020 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants