Created
April 3, 2018 15:23
-
-
Save masa795/ba3760e771766024297ef1a4e5955e01 to your computer and use it in GitHub Desktop.
PhpStorm で自由な位置でコードを折りたたむ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class TestClass | |
{ | |
// <editor-fold desc="旧コード"> | |
public function main(){ | |
$this->throwException(); | |
} | |
/** | |
* @throws Exception | |
*/ | |
private function throwException(){ | |
try { | |
} catch (Exception $e) { | |
throw new $e; | |
} | |
} | |
// </editor-fold> | |
// <editor-fold desc="定数"> | |
const TYPE_001 = 1; | |
const TYPE_002 = 1; | |
// </editor-fold> | |
// <editor-fold desc="グループ1"> | |
private function methodGroup001(){ | |
} | |
private function methodGroup002(){ | |
} | |
private function methodGroup003(){ | |
} | |
// </editor-fold> | |
// <editor-fold desc="グループ2"> | |
private function methodGroup101(){ | |
// <editor-fold desc="ロジック群1"> | |
for ($i = 0; $i < 10; ++$i){ | |
} | |
// </editor-fold> | |
// <editor-fold desc="ロジック群2"> | |
for ($i = 0; $i < 10; ++$i){ | |
} | |
// </editor-fold> | |
} | |
private function methodGroup102(){ | |
} | |
private function methodGroup103(){ | |
} | |
// </editor-fold> | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" xmlns=""> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<style> | |
/*<editor-fold desc="CSS折り畳み group1">*/ | |
.cssClass001 { | |
} | |
.cssClass002 { | |
} | |
/*</editor-fold>*/ | |
/*<editor-fold desc="CSS折り畳み group2">*/ | |
.cssClass101 { | |
} | |
.cssClass102 { | |
} | |
/*</editor-fold>*/ | |
</style> | |
</head> | |
<body> | |
<script> | |
// <editor-fold desc="JavaScript折り畳み group1"> | |
function methodGroup001(){ | |
} | |
function methodGroup002(){ | |
} | |
function methodGroup003(){ | |
} | |
// </editor-fold> | |
// <editor-fold desc="JavaScript折り畳み group2"> | |
function methodGroup101(){ | |
} | |
function methodGroup102(){ | |
} | |
function methodGroup103(){ | |
} | |
// </editor-fold> | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment