Skip to content

Commit

Permalink
Merge pull request #12 from leonhelmus/master
Browse files Browse the repository at this point in the history
Returned previous deleted templates.
  • Loading branch information
ashokadewit authored Sep 12, 2019
2 parents 1426d40 + cf2d66f commit f170c2f
Show file tree
Hide file tree
Showing 30 changed files with 396 additions and 202 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"email": "[email protected]"
}
],
"version": "2.0.0",
"version": "2.0.2",
"require": {
"php": "^7.1",
"composer-plugin-api": "^1.0"
Expand All @@ -32,7 +32,7 @@
}
},
"extra": {
"class": "Mediact\\CodingStandard\\PhpStorm\\Plugin"
"class": "Mediact\\CodingStandard\\PhpStorm\\InstallerPlugin"
},
"archive": {
"exclude": [
Expand Down
100 changes: 100 additions & 0 deletions files/codeStyleSettings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="RIGHT_MARGIN" value="80" />
<CssCodeStyleSettings>
<option name="HEX_COLOR_LOWER_CASE" value="true" />
</CssCodeStyleSettings>
<PHPCodeStyleSettings>
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
<option name="ALIGN_ASSIGNMENTS" value="true" />
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
<option name="PHPDOC_KEEP_BLANK_LINES" value="true" />
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
<option name="PHPDOC_THROWS_CALL_TREE_ANALYSIS_DEPTH" value="0" />
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
<option name="LOWER_CASE_NULL_CONST" value="true" />
<option name="VARIABLE_NAMING_STYLE" value="CAMEL_CASE" />
<option name="BLANK_LINE_BEFORE_RETURN_STATEMENT" value="true" />
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
<option name="FORCE_SHORT_DECLARATION_ARRAY_STYLE" value="true" />
</PHPCodeStyleSettings>
<XML>
<option name="XML_TEXT_WRAP" value="0" />
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<yaml>
<option name="INDENT_SEQUENCE_VALUE" value="true" />
</yaml>
<codeStyleSettings language="JSON">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<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">
<indentOptions>
<option name="INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="PHP">
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
<option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="SPACE_AFTER_TYPE_CAST" 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="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="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="XML">
<option name="RIGHT_MARGIN" value="800" />
</codeStyleSettings>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>
185 changes: 0 additions & 185 deletions files/codeStyles/Project.xml

This file was deleted.

5 changes: 0 additions & 5 deletions files/codeStyles/codeStyleConfig.xml

This file was deleted.

6 changes: 6 additions & 0 deletions files/fileTemplates/code/PHP Constructor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Constructor.
${PARAM_DOC}
${THROWS_DOC}
*/
public function __construct(${PARAM_LIST}) {${BODY}}
11 changes: 11 additions & 0 deletions files/fileTemplates/code/PHP Fluent Setter Method.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* @param ${TYPE_HINT} $${PARAM_NAME}
*
* @return ${CLASS_NAME}
*/
public function set${NAME}(#if (${SCALAR_TYPE_HINT})${SCALAR_TYPE_HINT} #else#end$${PARAM_NAME})#if(${RETURN_TYPE}): ${CLASS_NAME}#else#end
{
$this->${FIELD_NAME} = $${PARAM_NAME};
return $this;
}

12 changes: 12 additions & 0 deletions files/fileTemplates/code/PHP Getter Method.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @return ${TYPE_HINT}
*/
public ${STATIC} function ${GET_OR_IS}${NAME}()#if(${RETURN_TYPE}): ${RETURN_TYPE}#else#end
{
#if (${STATIC} == "static")
return self::$${FIELD_NAME};
#else
return $this->${FIELD_NAME};
#end
}

Empty file.
1 change: 1 addition & 0 deletions files/fileTemplates/code/PHP Overridden Method Body.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
${RETURN} parent::${NAME}(${PARAM_LIST});
13 changes: 13 additions & 0 deletions files/fileTemplates/code/PHP Setter Method.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @param ${TYPE_HINT} $${PARAM_NAME}
*
* @return void
*/
public ${STATIC} function set${NAME}(#if (${SCALAR_TYPE_HINT})${SCALAR_TYPE_HINT} #else#end$${PARAM_NAME}): void
{
#if (${STATIC} == "static")
self::$${FIELD_NAME} = $${PARAM_NAME};
#else
$this->${FIELD_NAME} = $${PARAM_NAME};
#end
}
30 changes: 30 additions & 0 deletions files/fileTemplates/code/PHPUnit Test Method.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#if (${NAME} == "__construct")
#set ($METHOD_NAME = "Constructor")
#elseif (${NAME} == "__destruct")
#set ($METHOD_NAME = "Destructor")
#elseif (${NAME} == "__toString")
#set ($METHOD_NAME = "toString")
#elseif (${NAME} == "__clone")
#set ($METHOD_NAME = "Clone")
#elseif (${NAME} == "__invoke")
#set ($METHOD_NAME = "Invoke")
#else
#set ($METHOD_NAME = ${CAPITALIZED_NAME})
#end
/**
* @return void
*
* @covers ::${NAME}
*/
public function test$METHOD_NAME(): void
{
#if (${NAME} == "__construct")
$this->assertInstanceOf(
${TESTED_NAME}::class,
new ${TESTED_NAME}()
);
#else
$subject = new ${TESTED_NAME}();
$subject->${NAME}();
#end
}
3 changes: 3 additions & 0 deletions files/fileTemplates/includes/PHP Class Doc Comment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/**
*
*/
1 change: 1 addition & 0 deletions files/fileTemplates/includes/PHP Field Doc Comment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/** ${TYPE_TAG} ${TYPE_HINT} */
Loading

0 comments on commit f170c2f

Please sign in to comment.