public static function getUserPhoto($userId, $size) { return new Image(['id' => $userId, 'type' => Image::TYPE_USERPIC, 'size' => $size, 'width' => rand(100, 200), 'height' => rand(100, 200)]); }
public function photo(User $user, $args) { return DataSource::getUserPhoto($user->id, $args['size']); }