Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Decoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ protected function __construct($source, $decodeType)
* - float
* - boolean
* - null
* - StdClass
* - stdClass
* - array
* - array of one or more of the above types
*
* By default, decoded objects will be returned as associative arrays; to
* return a StdClass object instead, pass {@link Zend_Json::TYPE_OBJECT} to
* return a stdClass object instead, pass {@link Zend_Json::TYPE_OBJECT} to
* the $objectDecodeType parameter.
*
* @static
Expand Down Expand Up @@ -174,7 +174,7 @@ protected function _decodeValue()
* a special attribute called __className which specifies a class
* name that should wrap the data contained within the encoded source.
*
* Decodes to either an array or StdClass object, based on the value of
* Decodes to either an array or stdClass object, based on the value of
* {@link $decodeType}. If invalid $decodeType present, returns as an
* array.
*
Expand Down Expand Up @@ -215,7 +215,7 @@ protected function _decodeObject()

switch ($this->decodeType) {
case Json::TYPE_OBJECT:
// Create new StdClass and populate with $members
// Create new stdClass and populate with $members
$result = new stdClass();
foreach ($members as $key => $value) {
if ($key === '') {
Expand Down
2 changes: 1 addition & 1 deletion src/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class Json
{
/**
* How objects should be encoded -- arrays or as StdClass. TYPE_ARRAY is 1
* How objects should be encoded -- arrays or as stdClass. TYPE_ARRAY is 1
* so that it is a boolean true value, allowing it to be used with
* ext/json's functions.
*/
Expand Down
2 changes: 1 addition & 1 deletion test/JsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function testObjectAsObject()
$encoded = Json\Encoder::encode($value);
$decoded = Json\Decoder::decode($encoded, Json\Json::TYPE_OBJECT);
$this->assertTrue(is_object($decoded), 'Not decoded as an object');
$this->assertTrue($decoded instanceof \StdClass, 'Not a StdClass object');
$this->assertTrue($decoded instanceof \stdClass, 'Not a stdClass object');
$this->assertTrue(isset($decoded->one), 'Expected property not set');
$this->assertEquals($value->one, $decoded->one, 'Unexpected value');
}
Expand Down

0 comments on commit 86491b5

Please sign in to comment.