include phpunit.snip snippet function abbr public function () {} ${1:public }function ${2:#:FunctionName}(${3}) { ${4:TARGET} } snippet pubf public function ${1:}(${2:}) { ${3:} } snippet prof protected function ${1:}(${2:}) { ${3:} } snippet prif private function ${1:}(${2:}) { ${3:} } snippet psf public static function ${1:}(${2:}) { ${3:} } snippet function_literal options word abbr function () {} function (${1})${2: use } { ${3:TARGET} } snippet php ${0} snippet echoh ${0} snippet pforeach }): ?> ${0:TARGET} snippet pifelse ${2:TARGET} ${0} snippet pif ${0:TARGET} snippet pelse snippet pthis ${0} ?> snippet pethis ${0} ?> snippet as ${0:ret} = count(${0:ret}) === 1 ? array_shift(${0:ret}) : ${0:ret}; snippet doc_class_var /** * ${3:#:undocumented class variable} * * @var ${4:#:string} **/ ${1:#:var} $${2};${0} snippet doc_constant /** * ${3:#:undocumented constant} **/ define(${1} ${2});${0} snippet doc_interface_function /** * ${4:#:undocumented function} * * @return ${5:void} * @author ${6} **/ ${1}function ${2}(${3});${0} snippet doc_function /** * ${4:#:undocumented function} * * @return ${5:void} * @author ${6} **/ ${1}function ${2}(${3}) { ${0:TARGET} } snippet doch /** * ${1} * * @author ${2} * @version ${3} * @copyright ${4} * @package ${5:default} **/ /** * Define DocBlock **/ snippet doci /** * ${2:#:undocumented class} * * @package ${3:default} * @author ${4} **/ interface ${1} { ${0:TARGET} } // END interface $1 snippet doc /** * */ snippet class options head class ${2:#:ClassName} { ${0:TARGET} } snippet def ${1}defined('${2}')${0} snippet ej \Log::channel('json')->info('${1:message}', ['data' => ${2:}]); snippet dowhile options head do { ${0:TARGET} } while (${1:#:condition}); snippet if? options head $${1:#:retVal} = (${2:#:condition}) ? ${3:#:a} : ${4:#:b}; snippet ifelse options head if (${1:#:condition}) { ${2:TARGET} } else { ${3:#:code...} } ${0} snippet if options head if (${1:#:condition}) { ${0:TARGET} } snippet ifi options head if (${1:#:condition}) ${2:#:code}; snippet var_dump options head var_dump(${0:TARGET}); snippet vd options head var_dump(${0:TARGET}); snippet ee options head var_dump(${0:TARGET});exit(); snippet pvd options head snippet pr options head print_r(${1}); snippet echo options head echo "${1:#:string}"; snippet loglist options head $fp = fopen("d:/log.txt", "a"); foreach (${1:} as $key => $data) { fwrite($fp, $key."---".$data."\n"); } fclose($fp); exit(); snippet logstr options head $fp = fopen("d:/log.txt", "a"); fwrite($fp, "--- ok\n"); fclose($fp); exit(); snippet println options head printf("${1:#:string}\n"${2:, }); snippet else else { ${0:TARGET} } snippet elseif elseif (${1:#:condition}) { ${0:TARGET} } snippet for options head for ($${1:i}=${2:0}; $$1 < ${3}; $$1++) { ${0:TARGET} } snippet fhash foreach ($${1:#:variable} as $${2:#:key}${3: =>} $${4:#:value}) { ${0:TARGET} } snippet flist abbr foreach(keyなし) options head foreach ($${1:#:variable} as $${2:#:x}) { ${0:TARGET} } snippet construct options head function __construct(${1}) { ${0:TARGET} } snippet here <<<${1:HTML} ${2:TARGET:#:content here} $1; snippet inc options head include '${1:#:file}';${0} snippet inco options head include_once '${1:#:file}';${0} snippet array $${1:#:arrayName} = array('${2}' => ${3} ${0}); snippet req options head require '${1:#:file}';${0} snippet reqo options head require_once '${1:#:file}';${0} snippet ret options head return${1};${0} snippet retf options head return false; snippet rett options head return true; snippet case options head case '${1:#:variable}': ${0:#:code...} break; snippet switch abbr sw options head switch (${1:#:variable}) { case '${2:#:value}': ${3:#:code...} break; ${0} default: ${4:#:code...} break; } snippet try options head try { ${1:TARGET} } catch (${2:#:Exception} $e) { ${3:#:code} } snippet tryf options head try { ${1:TARGET} } catch (${2:#:Exception} $e) { ${3:#:code} } finally { ${4:#:code} } snippet throw options head throw new ${1}Exception(${2:"${3:#:Error Processing Request}"}${4:}); ${0} snippet while abbr wh options head while (${1}) { ${0:TARGET} } snippet gloabals \$GLOBALS['${1:#:variable}']${2: = }${3:#:something}${4:;}${0} snippet cookie \$_COOKIE['${1:#:variable}'] snippet env \$_ENV['${1:#:variable}'] snippet files \$_FILES['${1:#:variable}'] snippet get \$_GET['${1:#:variable}'] snippet post \$_POST['${1:#:variable}'] snippet request \$_REQUEST['${1:#:variable}'] snippet server \$_SERVER['${1:#:variable}'] snippet session \$_SESSION['${1:#:variable}'] snippet var_export alias inspect var_export(${1}, true) snippet pq abbr INERT, UPDATEなどに使用 $this->db->paramQuery(${1:sql}, ${2:params}); snippet gall abbr データ全権取得 $this->db->getAll(${1:sql}, ${2:params}); snippet gone abbr データ全権取得 $this->db->getOne(${1:sql}, ${2:params}); snippet 18 abbr i18n i18n('${1:str}')