Skip to content

Commit

Permalink
Merge pull request parse-community#177 from phelipealves/master
Browse files Browse the repository at this point in the history
Argument PHPdoc missing
  • Loading branch information
gfosco committed Oct 28, 2015
2 parents f657e19 + 812c29d commit 1a8f5be
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Parse/ParseObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,8 @@ public static function saveAll($list, $useMasterKey = false)
/**
* Save object and unsaved children within.
*
* @param array $target
* @param bool $useMasterKey Whether to use the Master Key.
* @param ParseObject|array $target
* @param bool $useMasterKey Whether to use the Master Key.
*
* @throws Exception
* @throws ParseAggregateException
Expand Down
14 changes: 12 additions & 2 deletions src/Parse/ParseQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ public function equalTo($key, $value)

/**
* Helper for condition queries.
*
* @param string $key The key to where constraints
* @param string $condition The condition name
* @param mixed $value The condition value, can be a string or an array of strings
*
* @throws Exception
*/
private function addCondition($key, $condition, $value)
{
Expand Down Expand Up @@ -212,6 +218,10 @@ public function lessThanOrEqualTo($key, $value)
* Converts a string into a regex that matches it.
* Surrounding with \Q .. \E does this, we just need to escape \E's in
* the text separately.
*
* @param mixed $s The string or array being replaced.
*
* @return string Returns the string converted.
*/
private function quote($s)
{
Expand Down Expand Up @@ -450,13 +460,13 @@ public function addDescending($key)
if (is_array($key)) {
$key = array_map(
function ($element) {
return '-' . $element;
return '-'.$element;
},
$key
);
$this->orderBy = array_merge($this->orderBy, $key);
} else {
$this->orderBy[] = '-' . $key;
$this->orderBy[] = '-'.$key;
}

return $this;
Expand Down
6 changes: 4 additions & 2 deletions src/Parse/ParseUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public static function loginWithAnonymous()
$data = ['authData' => [
'anonymous' => [
'id' => '{$uuid_parts[0]}{$uuid_parts[1]}-{$uuid_parts[2]}-{$uuid_parts[3]}'
. '-{$uuid_parts[4]}-{$uuid_parts[5]}{$uuid_parts[6]}{$uuid_parts[7]}',
.'-{$uuid_parts[4]}-{$uuid_parts[5]}{$uuid_parts[6]}{$uuid_parts[7]}',
],
]];

Expand Down Expand Up @@ -249,7 +249,7 @@ public function linkWithFacebook($id, $access_token, $expiration_date = null, $u
]];
$result = ParseClient::_request(
'PUT',
'users/' . $this->getObjectId(),
'users/'.$this->getObjectId(),
$this->getSessionToken(),
json_encode($data),
$useMasterKey
Expand Down Expand Up @@ -393,6 +393,8 @@ public function isCurrent()
/**
* Save the current user object, unless it is not signed up.
*
* @param bool $useMasterKey Whether to use the Master Key
*
* @throws ParseException
*/
public function save($useMasterKey = false)
Expand Down
1 change: 1 addition & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
* Used by the PHPUnit Test Suite to load dependencies and configure the main
* application path.
Expand Down

0 comments on commit 1a8f5be

Please sign in to comment.