Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git] / hphp / hack / test / typecheck / naming_ok_test10.php
blobac18c65866a2e3d6d4cce2cb8715612206a69356
1 <?hh // partial
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the BSD-style license found in the
7 * LICENSE file in the "hack" directory of this source tree. An additional grant
8 * of patent rights can be found in the PATENTS file in the same directory.
12 class BirthdayStoryPreparable extends Preparable {
13 private $userIDs, $viewerContext, $users = MUST_PREPARE;
15 public function __construct(ViewerContext $vc, $user_ids) {
16 $this->viewerContext = $vc;
17 $this->userIDs = IDAssert::allUid($user_ids);
20 public function getUsers() {
21 return must_prepare($this->users);
24 public function getCurrentPosts() {
25 $from = $this->viewerContext->getUserID();
26 $to_users = array_keys($this->users);
27 return DT('TickerBirthdayPost', $from)->getAll($to_users);
30 public function prepare($pass) {
31 switch ($pass) {
32 case 0:
33 $this->waitFor(
34 Ent::createEnforcingLoaderDynamic(
35 'EntPersonalUser',
36 $this->viewerContext,
37 $this->userIDs,
38 $this->users,
39 array(
40 Ent::load('BasicInfo'),
41 Ent::load('Birthday'),
42 Ent::load('ProfilePic', PicSizeConst::SQUARE),
47 return true;
48 case 1:
49 $from = $this->viewerContext->getUserID();
50 $to_users = array_keys($this->users);
51 DT('TickerBirthdayPost', $from)->addAll($to_users);
53 return false;