代码改变世界

zendstudio 声明变量类型,让变量自动方法提示

2015-07-27 10:30  brookin  阅读(342)  评论(0编辑  收藏  举报

zendstudio 行内注释, 显式声明变量类型,让变量自动方法提示

      $out = [];
        /* @var $row \xxyy\SizeEntity */
      foreach ($rows[ 'list'] as $row) {
            $out[ 'list'][] = [
                'width'                 => $row->getWidth(),
                'height'                => $row->getHeight(),
            ];
      }


      $out = [];
      /* @var $invoice ChargeInvoice */
      foreach ($response->getChargeInvoice() as $invoice) {
            $tmp = [];
            $tmp[ 'amount'] = $invoice->getChargeAmountMicros();
            $tmp[ 'charge_id'] = $invoice->getChargeId();
            $tmp[ 'date'] = date( 'Y-m-d', $invoice->getChargeEndTimeUtc());
            $out[] = $tmp;
      }