Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class Account extends Element {
protected $props = [
'homePage' => 'Locker\XApi\IRI',
'name' => 'Locker\XApi\String',
'name' => 'Locker\XApi\Str',
];
protected $required_props = ['homePage', 'name'];
}
2 changes: 1 addition & 1 deletion src/Agent.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Agent extends Element {
use TypedElement;

protected $props = [
'name' => 'Locker\XApi\String',
'name' => 'Locker\XApi\Str',
'mbox' => 'Locker\XApi\Mailto',
'mbox_sha1sum' => 'Locker\XApi\Sha1',
'openid' => 'Locker\XApi\IRI',
Expand Down
2 changes: 1 addition & 1 deletion src/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Attachment extends Element {
'description' => 'Locker\XApi\LanguageMap',
'contentType' => 'Locker\XApi\IMT',
'length' => 'Locker\XApi\Integer',
'sha2' => 'Locker\XApi\String',
'sha2' => 'Locker\XApi\Str',
'fileUrl' => 'Locker\XApi\IRI'
];
protected $required_props = ['usageType', 'display', 'contentType', 'length', 'sha2'];
Expand Down
4 changes: 2 additions & 2 deletions src/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ class Context extends Element {
'instructor' => 'Locker\XApi\Actor',
'team' => 'Locker\XApi\Group',
'contextActivities' => 'Locker\XApi\ContextActivities',
'revision' => 'Locker\XApi\String',
'platform' => 'Locker\XApi\String',
'revision' => 'Locker\XApi\Str',
'platform' => 'Locker\XApi\Str',
'language' => 'Locker\XApi\Language',
'statement' => 'Locker\XApi\StatementRef',
'extensions' => 'Locker\XApi\Extensions'
Expand Down
2 changes: 1 addition & 1 deletion src/InteractionComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class InteractionComponent extends Element {
protected $props = [
'id' => 'Locker\XApi\String',
'id' => 'Locker\XApi\Str',
'description' => 'Locker\XApi\LanguageMap'
];
}
2 changes: 1 addition & 1 deletion src/LanguageMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function validate() {
$errors = array_merge($errors, (new Language($set_prop))->validate());
$errors = array_merge($errors, array_map(function ($error) use ($set_prop) {
return $error->addTrace($set_prop);
}, (new String($this->value->{$set_prop}))->validate()));
}, (new Str($this->value->{$set_prop}))->validate()));
}
return array_merge($errors, parent::validate());
}
Expand Down
2 changes: 1 addition & 1 deletion src/ObjectDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class ObjectDefinition extends Definition {
protected $props = [
'interactionType' => 'Locker\XApi\InteractionType',
'correctResponsesPattern' => 'Locker\XApi\Strings',
'correctResponsesPattern' => 'Locker\XApi\Strs',
'choices' => 'Locker\XApi\InteractionComponents',
'scale' => 'Locker\XApi\InteractionComponents',
'source' => 'Locker\XApi\InteractionComponents',
Expand Down
2 changes: 1 addition & 1 deletion src/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Result extends Element {
'score' => 'Locker\XApi\Score',
'success' => 'Locker\XApi\Boolean',
'completion' => 'Locker\XApi\Boolean',
'response' => 'Locker\XApi\String',
'response' => 'Locker\XApi\Str',
'duration' => 'Locker\XApi\Duration',
'extensions' => 'Locker\XApi\Extensions',
];
Expand Down
2 changes: 1 addition & 1 deletion src/String.php → src/Str.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php namespace Locker\XApi;

class String extends TypedAtom {
class Str extends TypedAtom {
protected static $expected_types = ['string'];
}
2 changes: 1 addition & 1 deletion src/Strings.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php namespace Locker\XApi;

class Strings extends Collection {
protected $member_type = 'Locker\XApi\String';
protected $member_type = 'Locker\XApi\Str';
}