-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Support object->exists() #453
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should more closely match the js version
src/Parse/ParseObject.php
Outdated
public function exists($useMasterKey = false) | ||
{ | ||
if (!$this->objectId) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return false here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should match the js sdk more closely?
src/Parse/ParseObject.php
Outdated
$query->get($this->objectId, $useMasterKey); | ||
return true; | ||
} catch (Exception $e) { | ||
if ($e->getMessage() === 'Object not found.') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this test the error code or number instead of the message string?
Codecov Report
@@ Coverage Diff @@
## master #453 +/- ##
============================================
- Coverage 98% 97.97% -0.03%
- Complexity 1058 1062 +4
============================================
Files 39 39
Lines 2950 2960 +10
============================================
+ Hits 2891 2900 +9
- Misses 59 60 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice.
No description provided.