Skip to content

Commit

Permalink
Merge pull request #11 from leonhelmus/master
Browse files Browse the repository at this point in the history
Changed version tag of composer and added extra line in README.md
  • Loading branch information
ksangers authored Aug 27, 2019
2 parents e8b4e98 + 082b1fc commit 1426d40
Show file tree
Hide file tree
Showing 34 changed files with 336 additions and 141 deletions.
15 changes: 15 additions & 0 deletions COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ This way Namespaces and vendor will be automatically filled in.

Available templates:
* **M2 class**: Default M2 php class.
* **M2 class - Backend Controller**: PHP class that extends AbstractAction.
* **M2 class - Block**: PHP class that extends Template class.
* **M2 class - Helper**: PHP class that extends AbstractHelper
* **M2 class - Observer**: PHP class that implements ObserverInterface
Expand Down Expand Up @@ -70,6 +71,13 @@ Available commands:
* **m2divirtual**: Create an virtual type
* **m2dipreference**: Create an preference(rewrite)

## M2 Events
Available templates:
* **M2 Events**: Create an events file.

Available commands:
* **m2eventobserver**: Create an observer

## M2 Extension Attribute
Available templates:
* **M2 Extension Attributes XML**: Create an extension attribute file with default structure.
Expand All @@ -78,6 +86,13 @@ Available templates:
Available templates:
* **M2 Layout XML**: Create an layout XML with default structure

## M2 Menu
Available templates:
* **M2 Menu XML**: Create an layout XML with default structure

Available commands:
* **m2menuadd**: Create an menu tag

## M2 Module
Available templates:
* **M2 Module XML**: Create an module XML file that has default structure
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ Use PHPStorm's `file > settings > language > PHP` menu to point to the installed

## Live Templates
You now get live templates that can be be found in `file > settings > Editor -> Live Templates` .
These can be enabled and disabled for if you want to use them or not.
These templates can be enabled/disabled.
At this moment there have been live templates created for:
* ACL
* DB Schema
* DI
* Events
* Menu
* Module
* Phtml (WIP)
* Registration
Expand All @@ -28,21 +30,25 @@ Check out [this link](COMMANDS.md) to see more info

## Templates
You now get live templates that can be be found in `file > settings > Editor -> File and Code Templates` .
These can be enabled and disabled for if you want to use them or not.
These can be enabled and disabled for if you want to use them or not. If no phpstorm templates are shown please restart PhpStorm.
At this moment there have been templates created for:
* ACL
* Class
* Class - Backend Controller
* Class - Block
* Class - Helper
* Class - Observer
* Class - ViewModel
* Config
* DB Schema
* DI
* Events
* Extension Attributes
* Layout
* Menu
* Module
* Registration
* Routes
* Sales
* System
* System Include
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"email": "[email protected]"
}
],
"version": "1.7.0",
"version": "2.0.0",
"require": {
"php": "^7.1",
"composer-plugin-api": "^1.0"
Expand Down
100 changes: 0 additions & 100 deletions files/codeStyleSettings.xml

This file was deleted.

185 changes: 185 additions & 0 deletions files/codeStyles/Project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="RIGHT_MARGIN" value="80" />
<CssCodeStyleSettings>
<option name="HEX_COLOR_LOWER_CASE" value="true" />
</CssCodeStyleSettings>
<HTMLCodeStyleSettings>
<option name="HTML_ATTRIBUTE_WRAP" value="4" />
<option name="HTML_TEXT_WRAP" value="0" />
<option name="HTML_KEEP_LINE_BREAKS" value="false" />
<option name="HTML_KEEP_LINE_BREAKS_IN_TEXT" value="false" />
<option name="HTML_KEEP_BLANK_LINES" value="0" />
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
<option name="HTML_ELEMENTS_TO_INSERT_NEW_LINE_BEFORE" value="body,div,form,h1,h2,h3" />
<option name="HTML_INLINE_ELEMENTS" value="abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var" />
<option name="HTML_DONT_ADD_BREAKS_IF_INLINE_CONTENT" value="title,h1,h2,h3,h4,h5,h6" />
<option name="HTML_ENFORCE_QUOTES" value="true" />
</HTMLCodeStyleSettings>
<PHPCodeStyleSettings>
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
<option name="ALIGN_PHPDOC_COMMENTS" value="true" />
<option name="ALIGN_ASSIGNMENTS" value="true" />
<option name="ALIGN_INLINE_COMMENTS" value="true" />
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
<option name="PHPDOC_KEEP_BLANK_LINES" value="false" />
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
<option name="LOWER_CASE_NULL_CONST" value="true" />
<option name="ELSE_IF_STYLE" value="COMBINE" />
<option name="VARIABLE_NAMING_STYLE" value="CAMEL_CASE" />
<option name="BLANK_LINE_BEFORE_RETURN_STATEMENT" value="true" />
<option name="BLANK_LINES_BEFORE_RETURN_STATEMENT" value="1" />
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
<option name="ALIGN_CLASS_CONSTANTS" value="true" />
<option name="KEEP_BLANK_LINES_AFTER_LBRACE" value="0" />
<option name="SPACE_AFTER_UNARY_NOT" value="true" />
<option name="FORCE_SHORT_DECLARATION_ARRAY_STYLE" value="true" />
</PHPCodeStyleSettings>
<XML>
<option name="XML_ATTRIBUTE_WRAP" value="4" />
<option name="XML_TEXT_WRAP" value="0" />
<option name="XML_KEEP_LINE_BREAKS" value="false" />
<option name="XML_KEEP_BLANK_LINES" value="1" />
<option name="XML_ALIGN_ATTRIBUTES" value="false" />
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="CSS">
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<arrangement>
<rules>
<section>
<rule>
<match>
<NAME>.*</NAME>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="DB2">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="Derby">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="H2">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="HSQLDB">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JSON">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="LINE_COMMENT_ADD_SPACE" value="false" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="SPECIAL_ELSE_IF_TREATMENT" value="false" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
</codeStyleSettings>
<codeStyleSettings language="LESS">
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<indentOptions>
<option name="INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="MySQL">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="Oracle">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="PHP">
<option name="RIGHT_MARGIN" value="120" />
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="0" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
<option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_FOR" value="false" />
<option name="SPACE_AFTER_TYPE_CAST" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="5" />
<option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="CALL_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
<option name="WRAP_ON_TYPING" value="0" />
</codeStyleSettings>
<codeStyleSettings language="PostgreSQL">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="SASS">
<indentOptions>
<option name="INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="SCSS">
<indentOptions>
<option name="INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="SQL">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="SQLite">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="Sybase">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="TSQL">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="XML">
<option name="RIGHT_MARGIN" value="800" />
</codeStyleSettings>
</code_scheme>
</component>
5 changes: 5 additions & 0 deletions files/codeStyles/codeStyleConfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
2 changes: 1 addition & 1 deletion files/fileTemplates/M2-Acl-XML.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
#parse("M2 XML File Header")
#parse("M2-XML-File-Header")
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
Expand Down
Loading

0 comments on commit 1426d40

Please sign in to comment.