HomeDevCentral

UserExternalSource: cast user_id property as integer

Description

UserExternalSource: cast user_id property as integer

Summary:
Code using the UserExternalSource model expects user ID to be
an integer, and not a string:

$externalUser = UserExternalSource::find(1);
// Does something with $externalUser->user_id

Eloquent allows to specify attributes casting with a $casts array.

Test Plan:
Tested through D445 new unit test which provide:
$this->assertSame($externalUser->user_id, 1);

Reviewers: dereckson

Differential Revision: http://devcentral.nasqueron.org/D447

Details

Provenance
derecksonAuthored on Jul 2 2016, 08:59
Differential Revision
D447: UserExternalSource: cast user_id property as integer
Parents
rGROVEec60c84f634d: Fix whitespace issue
Branches
Unknown
Tags
Unknown