Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created February 21, 2013 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shigemk2/5004724 to your computer and use it in GitHub Desktop.
Save shigemk2/5004724 to your computer and use it in GitHub Desktop.
phpdocのthrowsの簡単な使い方
<?php
/**
* このメソッドは適当に作りました
*
* @param[in] $hoge
* @return 対応する配列
* @throws Exception 対応するデータがない場合
*/
public function hoge($hoge = '') {
if(! isset($array[$hoge])) {
throw new Exception('データがありません。');
}
return $array[$hoge];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment