Skip to content

Commit f170c2f

Browse files
authored
Merge pull request #12 from leonhelmus/master
Returned previous deleted templates.
2 parents 1426d40 + cf2d66f commit f170c2f

30 files changed

+396
-202
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"email": "[email protected]"
1010
}
1111
],
12-
"version": "2.0.0",
12+
"version": "2.0.2",
1313
"require": {
1414
"php": "^7.1",
1515
"composer-plugin-api": "^1.0"
@@ -32,7 +32,7 @@
3232
}
3333
},
3434
"extra": {
35-
"class": "Mediact\\CodingStandard\\PhpStorm\\Plugin"
35+
"class": "Mediact\\CodingStandard\\PhpStorm\\InstallerPlugin"
3636
},
3737
"archive": {
3838
"exclude": [

files/codeStyleSettings.xml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project version="4">
3+
<component name="ProjectCodeStyleSettingsManager">
4+
<option name="PER_PROJECT_SETTINGS">
5+
<value>
6+
<option name="RIGHT_MARGIN" value="80" />
7+
<CssCodeStyleSettings>
8+
<option name="HEX_COLOR_LOWER_CASE" value="true" />
9+
</CssCodeStyleSettings>
10+
<PHPCodeStyleSettings>
11+
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
12+
<option name="ALIGN_ASSIGNMENTS" value="true" />
13+
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
14+
<option name="PHPDOC_KEEP_BLANK_LINES" value="true" />
15+
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
16+
<option name="PHPDOC_THROWS_CALL_TREE_ANALYSIS_DEPTH" value="0" />
17+
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
18+
<option name="LOWER_CASE_NULL_CONST" value="true" />
19+
<option name="VARIABLE_NAMING_STYLE" value="CAMEL_CASE" />
20+
<option name="BLANK_LINE_BEFORE_RETURN_STATEMENT" value="true" />
21+
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
22+
<option name="FORCE_SHORT_DECLARATION_ARRAY_STYLE" value="true" />
23+
</PHPCodeStyleSettings>
24+
<XML>
25+
<option name="XML_TEXT_WRAP" value="0" />
26+
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
27+
</XML>
28+
<yaml>
29+
<option name="INDENT_SEQUENCE_VALUE" value="true" />
30+
</yaml>
31+
<codeStyleSettings language="JSON">
32+
<indentOptions>
33+
<option name="INDENT_SIZE" value="2" />
34+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
35+
</indentOptions>
36+
</codeStyleSettings>
37+
<codeStyleSettings language="JavaScript">
38+
<option name="LINE_COMMENT_ADD_SPACE" value="false" />
39+
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
40+
<option name="SPECIAL_ELSE_IF_TREATMENT" value="false" />
41+
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
42+
<option name="CALL_PARAMETERS_WRAP" value="1" />
43+
<option name="METHOD_PARAMETERS_WRAP" value="5" />
44+
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
45+
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
46+
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
47+
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
48+
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
49+
<option name="IF_BRACE_FORCE" value="3" />
50+
<option name="DOWHILE_BRACE_FORCE" value="3" />
51+
<option name="WHILE_BRACE_FORCE" value="3" />
52+
<option name="FOR_BRACE_FORCE" value="3" />
53+
</codeStyleSettings>
54+
<codeStyleSettings language="LESS">
55+
<indentOptions>
56+
<option name="INDENT_SIZE" value="4" />
57+
</indentOptions>
58+
</codeStyleSettings>
59+
<codeStyleSettings language="PHP">
60+
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
61+
<option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
62+
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
63+
<option name="SPACE_AFTER_TYPE_CAST" value="false" />
64+
<option name="CALL_PARAMETERS_WRAP" value="1" />
65+
<option name="METHOD_PARAMETERS_WRAP" value="5" />
66+
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
67+
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
68+
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
69+
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
70+
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
71+
<option name="IF_BRACE_FORCE" value="3" />
72+
<option name="DOWHILE_BRACE_FORCE" value="3" />
73+
<option name="WHILE_BRACE_FORCE" value="3" />
74+
<option name="FOR_BRACE_FORCE" value="3" />
75+
</codeStyleSettings>
76+
<codeStyleSettings language="SASS">
77+
<indentOptions>
78+
<option name="INDENT_SIZE" value="4" />
79+
</indentOptions>
80+
</codeStyleSettings>
81+
<codeStyleSettings language="SCSS">
82+
<indentOptions>
83+
<option name="INDENT_SIZE" value="4" />
84+
</indentOptions>
85+
</codeStyleSettings>
86+
<codeStyleSettings language="SQL">
87+
<indentOptions>
88+
<option name="INDENT_SIZE" value="4" />
89+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
90+
<option name="TAB_SIZE" value="4" />
91+
</indentOptions>
92+
</codeStyleSettings>
93+
<codeStyleSettings language="XML">
94+
<option name="RIGHT_MARGIN" value="800" />
95+
</codeStyleSettings>
96+
</value>
97+
</option>
98+
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
99+
</component>
100+
</project>

files/codeStyles/Project.xml

Lines changed: 0 additions & 185 deletions
This file was deleted.

files/codeStyles/codeStyleConfig.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Constructor.
3+
${PARAM_DOC}
4+
${THROWS_DOC}
5+
*/
6+
public function __construct(${PARAM_LIST}) {${BODY}}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @param ${TYPE_HINT} $${PARAM_NAME}
3+
*
4+
* @return ${CLASS_NAME}
5+
*/
6+
public function set${NAME}(#if (${SCALAR_TYPE_HINT})${SCALAR_TYPE_HINT} #else#end$${PARAM_NAME})#if(${RETURN_TYPE}): ${CLASS_NAME}#else#end
7+
{
8+
$this->${FIELD_NAME} = $${PARAM_NAME};
9+
return $this;
10+
}
11+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @return ${TYPE_HINT}
3+
*/
4+
public ${STATIC} function ${GET_OR_IS}${NAME}()#if(${RETURN_TYPE}): ${RETURN_TYPE}#else#end
5+
{
6+
#if (${STATIC} == "static")
7+
return self::$${FIELD_NAME};
8+
#else
9+
return $this->${FIELD_NAME};
10+
#end
11+
}
12+

files/fileTemplates/code/PHP Implemented Method Body.php

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
${RETURN} parent::${NAME}(${PARAM_LIST});
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @param ${TYPE_HINT} $${PARAM_NAME}
3+
*
4+
* @return void
5+
*/
6+
public ${STATIC} function set${NAME}(#if (${SCALAR_TYPE_HINT})${SCALAR_TYPE_HINT} #else#end$${PARAM_NAME}): void
7+
{
8+
#if (${STATIC} == "static")
9+
self::$${FIELD_NAME} = $${PARAM_NAME};
10+
#else
11+
$this->${FIELD_NAME} = $${PARAM_NAME};
12+
#end
13+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#if (${NAME} == "__construct")
2+
#set ($METHOD_NAME = "Constructor")
3+
#elseif (${NAME} == "__destruct")
4+
#set ($METHOD_NAME = "Destructor")
5+
#elseif (${NAME} == "__toString")
6+
#set ($METHOD_NAME = "toString")
7+
#elseif (${NAME} == "__clone")
8+
#set ($METHOD_NAME = "Clone")
9+
#elseif (${NAME} == "__invoke")
10+
#set ($METHOD_NAME = "Invoke")
11+
#else
12+
#set ($METHOD_NAME = ${CAPITALIZED_NAME})
13+
#end
14+
/**
15+
* @return void
16+
*
17+
* @covers ::${NAME}
18+
*/
19+
public function test$METHOD_NAME(): void
20+
{
21+
#if (${NAME} == "__construct")
22+
$this->assertInstanceOf(
23+
${TESTED_NAME}::class,
24+
new ${TESTED_NAME}()
25+
);
26+
#else
27+
$subject = new ${TESTED_NAME}();
28+
$subject->${NAME}();
29+
#end
30+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/**
2+
*
3+
*/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/** ${TYPE_TAG} ${TYPE_HINT} */

0 commit comments

Comments
 (0)