Skip to content

Commit 57b8b7d

Browse files
committed
Implement v-if and v-on
1 parent be18d51 commit 57b8b7d

24 files changed

+68635
-79
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66

77
# PHPUnit
88
/phpunit.xml
9+
.phpcs-cache

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
[![Build Status](https://travis-ci.org/Macavity/php-vue-to-twig.svg?branch=master)](https://travis-ci.org/Macavity/php-vue-to-twig)
44

55
Compile vue files to twig templates with PHP
6+

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"require": {
1313
"php": ">=7.1",
1414
"ext-dom": "*",
15-
"ext-libxml": "*"
15+
"ext-libxml": "*",
16+
"squizlabs/php_codesniffer": "^3.3"
1617
},
1718
"autoload": {
1819
"psr-4": {
@@ -32,5 +33,9 @@
3233
"require-dev": {
3334
"ext-simplexml": "*",
3435
"phpunit/phpunit": "^7"
36+
},
37+
"scripts": {
38+
"cs:fix": "phpcbf --standard=phpcs.xml",
39+
"cs:check": "phpcs --standard=phpcs.xml --colors -ps"
3540
}
3641
}

composer.lock

Lines changed: 54 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0"?>
2+
<ruleset>
3+
<rule ref="PSR2"/>
4+
5+
<rule ref="Generic.Files.LineLength.TooLong">
6+
<type>error</type>
7+
</rule>
8+
9+
<rule ref="Squiz.Strings.ConcatenationSpacing"/>
10+
11+
<rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/ruleset.xml">
12+
<exclude name="SlevomatCodingStandard.ControlStructures.RequireYodaComparison.RequiredYodaComparison"/>
13+
<exclude name="SlevomatCodingStandard.Files.TypeNameMatchesFileName.NoMatchBetweenTypeNameAndFileName"/>
14+
<exclude name="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses"/>
15+
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation.NonFullyQualifiedClassName"/>
16+
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions.NonFullyQualifiedException"/>
17+
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions.NonFullyQualified"/>
18+
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces.NonFullyQualified"/>
19+
<exclude name="SlevomatCodingStandard.Types.EmptyLinesAroundTypeBraces"/>
20+
<exclude name="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment.OneLinePropertyComment"/>
21+
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
22+
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix"/>
23+
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix"/>
24+
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPreDecrementOperator"/>
25+
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostDecrementOperator"/>
26+
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator.DisallowedShortTernaryOperator"/>
27+
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants.NonFullyQualified"/>
28+
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.UselessParentheses"/>
29+
<exclude name="SlevomatCodingStandard.PHP.UselessParentheses.UselessParentheses"/>
30+
<exclude name="SlevomatCodingStandard.Classes.TraitUseSpacing.IncorrectLinesCountBeforeFirstUse"/>
31+
<exclude name="SlevomatCodingStandard.Commenting.UselessInheritDocComment.UselessInheritDocComment"/>
32+
</rule>
33+
34+
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
35+
<exclude-pattern>./tests/*/*Test.php</exclude-pattern>
36+
37+
<properties>
38+
<property name="allAnnotationsAreUseful" type="boolean" value="true"/>
39+
</properties>
40+
</rule>
41+
42+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
43+
<properties>
44+
<property name="spacesCountAroundEqualsSign" value="0"/>
45+
</properties>
46+
</rule>
47+
48+
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
49+
<properties>
50+
<property name="searchAnnotations" value="true"/>
51+
</properties>
52+
</rule>
53+
54+
<rule ref="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces">
55+
<properties>
56+
<property name="allowUseFromRootNamespace" value="true"/>
57+
</properties>
58+
</rule>
59+
</ruleset>

phpcs.xml.dist

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0"?>
2+
<ruleset>
3+
<rule ref="PSR2"/>
4+
5+
<rule ref="Generic.Files.LineLength.TooLong">
6+
<type>error</type>
7+
</rule>
8+
9+
<rule ref="Squiz.Strings.ConcatenationSpacing"/>
10+
11+
<rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/ruleset.xml">
12+
<exclude name="SlevomatCodingStandard.ControlStructures.RequireYodaComparison.RequiredYodaComparison"/>
13+
<exclude name="SlevomatCodingStandard.Files.TypeNameMatchesFileName.NoMatchBetweenTypeNameAndFileName"/>
14+
<exclude name="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses"/>
15+
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation.NonFullyQualifiedClassName"/>
16+
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions.NonFullyQualifiedException"/>
17+
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions.NonFullyQualified"/>
18+
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces.NonFullyQualified"/>
19+
<exclude name="SlevomatCodingStandard.Types.EmptyLinesAroundTypeBraces"/>
20+
<exclude name="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment.OneLinePropertyComment"/>
21+
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
22+
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix"/>
23+
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix"/>
24+
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPreDecrementOperator"/>
25+
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostDecrementOperator"/>
26+
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator.DisallowedShortTernaryOperator"/>
27+
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants.NonFullyQualified"/>
28+
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.UselessParentheses"/>
29+
<exclude name="SlevomatCodingStandard.PHP.UselessParentheses.UselessParentheses"/>
30+
<exclude name="SlevomatCodingStandard.Classes.TraitUseSpacing.IncorrectLinesCountBeforeFirstUse"/>
31+
<exclude name="SlevomatCodingStandard.Commenting.UselessInheritDocComment.UselessInheritDocComment"/>
32+
</rule>
33+
34+
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
35+
<exclude-pattern>./tests/*/*Test.php</exclude-pattern>
36+
37+
<properties>
38+
<property name="allAnnotationsAreUseful" type="boolean" value="true"/>
39+
</properties>
40+
</rule>
41+
42+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
43+
<properties>
44+
<property name="spacesCountAroundEqualsSign" value="0"/>
45+
</properties>
46+
</rule>
47+
48+
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
49+
<properties>
50+
<property name="searchAnnotations" value="true"/>
51+
</properties>
52+
</rule>
53+
54+
<rule ref="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces">
55+
<properties>
56+
<property name="allowUseFromRootNamespace" value="true"/>
57+
</properties>
58+
</rule>
59+
</ruleset>

0 commit comments

Comments
 (0)