Skip to content

Commit

Permalink
fix(Statement Object): Avoids use of reserved "Object" keyword in PHP. (
Browse files Browse the repository at this point in the history
#18 - Thanks @davidpesce)
  • Loading branch information
davidpesce authored Feb 11, 2020
1 parent 61a6aa2 commit 92c8d9a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ vendor
composer.lock
composer.phar

.idea/

tests/assets/test.json
2 changes: 1 addition & 1 deletion src/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function setValue($new_value) {

/**
* Gets all of the properties set on an $object or ($this->value).
* @param Object
* @param StatementObject
* @return [string]
*/
protected function getSetProps($object = null) {
Expand Down
2 changes: 1 addition & 1 deletion src/StatementBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class StatementBase extends Element {
protected $props = [
'actor' => 'Locker\XApi\Actor',
'verb' => 'Locker\XApi\Verb',
'object' => 'Locker\XApi\Object',
'object' => 'Locker\XApi\StatementObject',
'result' => 'Locker\XApi\Result',
'context' => 'Locker\XApi\Context',
'timestamp' => 'Locker\XApi\Timestamp',
Expand Down
2 changes: 1 addition & 1 deletion src/Object.php → src/StatementObject.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace Locker\XApi;

class Object extends Blueprint {
class StatementObject extends Blueprint {
protected $default_type = 'Activity';
protected $accepted_types = [
'Activity',
Expand Down

0 comments on commit 92c8d9a

Please sign in to comment.