├── .gitignore ├── fileTemplates ├── internal │ ├── PHP File.php │ ├── PHP Trait.php │ ├── PHP Class.php │ └── PHP Interface.php ├── includes │ ├── PHP Class Doc Comment.php │ └── PHP File Header.php └── code │ ├── PHP Getter Method.php │ ├── PHP Fluent Setter Method.php │ └── PHP Setter Method.php ├── templates ├── JavaScript.xml ├── PHP.xml └── WordPress.xml ├── readme.md ├── keymaps └── Laracast.xml ├── codestyles ├── WebsiteCodepress.xml └── PluginCodepress.xml └── inspection └── Codepress.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | .idea -------------------------------------------------------------------------------- /fileTemplates/internal/PHP File.php: -------------------------------------------------------------------------------- 1 | ${FIELD_NAME}; 7 | #end 8 | } -------------------------------------------------------------------------------- /fileTemplates/code/PHP Fluent Setter Method.php: -------------------------------------------------------------------------------- 1 | /** 2 | * @param ${TYPE_HINT} $${PARAM_NAME} 3 | * @return ${CLASS_NAME} 4 | */ 5 | public function set_${FIELD_NAME}(#if (${SCALAR_TYPE_HINT})${SCALAR_TYPE_HINT} #else#end$${PARAM_NAME})#if(${RETURN_TYPE}): ${CLASS_NAME}#else#end 6 | { 7 | $this->${FIELD_NAME} = $${PARAM_NAME}; 8 | return $this; 9 | } 10 | -------------------------------------------------------------------------------- /fileTemplates/code/PHP Setter Method.php: -------------------------------------------------------------------------------- 1 | /** 2 | * @param ${TYPE_HINT} $${PARAM_NAME} 3 | */ 4 | public ${STATIC} function set_${FIELD_NAME}(#if (${SCALAR_TYPE_HINT})${SCALAR_TYPE_HINT} #end$${PARAM_NAME})#if (${VOID_RETURN_TYPE}):void #end 5 | { 6 | #if (${STATIC} == "static") 7 | self::$${FIELD_NAME} = $${PARAM_NAME}; 8 | #else 9 | $this->${FIELD_NAME} = $${PARAM_NAME}; 10 | #end 11 | } 12 | -------------------------------------------------------------------------------- /templates/JavaScript.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # PHPStorm Settings 2 | 3 | 1. [Live Templates](#live-templates) 4 | 2. [Coding Styles](#coding-styles) 5 | 3. [Code Inspections](#code-inspections) 6 | 4. [Keymaps](#keymaps) 7 | 5. [File & Code Template](#file-and-code-templates) 8 | 9 | # Live Templates 10 | 11 | These are our custom WordPress live templates for PhpStorm. We have devided them in two groups: 12 | - PHP `templates/php.xml` 13 | - WordPress `templates/wordpress.xml` 14 | 15 | ## Usage 16 | 17 | * Download the files `php.xml` and `wordpress.xml` 18 | * Copy them to `~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/templates` directory. 19 | * Restart PhpStorm. 20 | * The two groups 'PHP' and WordPress' will be activated by default. Disable any group or live template from PHPStorm Preferences > Editor > Live Templates. 21 | * A list of available abbreviations that will trigger a live template can be found by selecting 'PHP' or WordPress' in PHPStorm Preferences > Editor > Live Templates. 22 | 23 | # Coding Styles 24 | 25 | This is our own WordPress coding styles for PhpStorm, forked from the WordPress.xml packaged with PhpStorm 26 | 27 | ## Usage 28 | 29 | * Download the `codestyles/CodepressWordPress.xml` file. 30 | * Copy it to `~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/codestyles` directory. 31 | * Activate the scheme by selecting it in PHPStorm Preferences > Editor > Code Style. 32 | 33 | # Code Inspections 34 | 35 | This is our own WordPress code inspections format for PhpStorm 36 | 37 | ## Usage 38 | 39 | * Download the `inspection/Codepress.xml` file. 40 | * Copy it to `~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/inspection` directory. 41 | * Activate the scheme by selecting 'Codepress' in PHPStorm Preferences > Editor > Inspections. 42 | 43 | # Keymaps 44 | 45 | This are our own PHP keymaps for PhpStorm taken from the Laracasts series 46 | 47 | ## Usage 48 | 49 | * Download the `keymaps/Laracasts.xml` file. 50 | * Copy it to `~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/keymaps` directory. 51 | * Activate the keymap by selecting 'Laracasts' in PHPStorm Preferences > Keymap. 52 | 53 | # File and Code Templates 54 | 55 | This are our own PHP File templates for PhpStorm. 56 | 57 | ## Usage 58 | 59 | * Download the content of the `fileTemplates` directory. 60 | * Copy it to `~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/fileTemplates` directory. 61 | * Restart PhpStorm. 62 | 63 | # Development 64 | 65 | * Clone the repo. 66 | * Symlink the file to the `~/Library/Application Support/JetBrains/PhpStorm20{x}.{x}/` directory: 67 | 68 | ``` 69 | $ cd ~/Library/Preferences/PhpStorm{xx}/ 70 | $ ln -s //.xml 71 | ``` 72 | 73 | * Restart PhpStorm. 74 | * Make changes, submit pull requests etc. -------------------------------------------------------------------------------- /keymaps/Laracast.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /templates/PHP.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 18 | 26 | 32 | 39 | 46 | 53 | 60 | 65 | 73 | 80 | 87 | 94 | 97 | 104 | 111 | 118 | 123 | 130 | 137 | -------------------------------------------------------------------------------- /templates/WordPress.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 17 | 25 | 31 | 40 | 47 | 54 | 60 | 89 | 112 | 122 |