Fix bug. Add newline at EOF for stubs.

This commit is contained in:
CismonX 2018-09-06 11:46:53 +08:00
parent 9a8204cada
commit 1b1595a801
3 changed files with 4 additions and 2 deletions

View File

@ -2366,9 +2366,11 @@ PHP_METHOD(Collection, set)
zend_array* current = COLLECTION_FETCH_CURRENT();
if (Z_TYPE_P(key) == IS_STRING) {
SEPARATE_CURRENT_COLLECTION(current);
Z_TRY_ADDREF_P(value);
zend_hash_update(current, Z_STR_P(key), value);
} else if (Z_TYPE_P(key) == IS_LONG) {
SEPARATE_CURRENT_COLLECTION(current);
Z_TRY_ADDREF_P(value);
zend_hash_index_update(current, Z_LVAL_P(key), value);
} else {
ERR_BAD_KEY_TYPE();

View File

@ -895,4 +895,4 @@ class Collection implements ArrayAccess, Countable
* @return Collection
*/
function values() {}
}
}

View File

@ -26,4 +26,4 @@ class Pair
* @param mixed $second
*/
function __construct($first, $second) {}
}
}