<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="imghaste-php">
	<description>Modern php coding standards by imghaste team.</description>

	<!-- display progress -->
	<arg value="p"/>
	<!-- use colors in output -->
	<arg name="colors"/>
	<rule ref="Generic.Classes.DuplicateClassName"/>
	<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
	<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
	<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
	<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
	<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
	<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
	<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
	<rule ref="Generic.Commenting.Todo"/>
	<rule ref="Generic.Commenting.Fixme"/>
	<rule ref="Generic.Files.LineEndings"/>
	<rule ref="Generic.Files.LineLength">
		<properties>
			<property name="lineLimit" value="120"/>
			<property name="absoluteLineLimit" value="150"/>
		</properties>
	</rule>
	<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
	<rule ref="Generic.Formatting.SpaceAfterCast"/>
	<rule ref="Generic.Functions.CallTimePassByReference"/>
	<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
	<rule ref="Generic.Metrics.CyclomaticComplexity">
		<properties>
			<property name="complexity" value="4"/>
			<property name="absoluteComplexity" value="10"/>
		</properties>
	</rule>
	<rule ref="Generic.Metrics.NestingLevel">
		<properties>
			<property name="nestingLevel" value="4"/>
		</properties>
	</rule>
	<rule ref="Generic.NamingConventions.ConstructorName"/>
	<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
	<rule ref="Generic.PHP.DeprecatedFunctions"/>
	<rule ref="Generic.PHP.DisallowShortOpenTag"/>
	<rule ref="Generic.PHP.LowerCaseConstant"/>
	<rule ref="Generic.PHP.NoSilencedErrors"/>
	<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
	<rule ref="Generic.WhiteSpace.ScopeIndent">
		<properties>
			<property name="exact" value="false"/>
		</properties>
	</rule>
	<rule ref="MySource.PHP.EvalObjectFactory"/>
	<rule ref="PEAR.Commenting.InlineComment"/>
	<rule ref="PEAR.Classes.ClassDeclaration"/>
	<rule ref="PEAR.ControlStructures.ControlSignature"/>
	<rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
	<rule ref="PEAR.WhiteSpace.ScopeIndent"/>
	<rule ref="PSR2.ControlStructures.ControlStructureSpacing"/>
	<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
	<rule ref="Squiz.PHP.CommentedOutCode">
		<properties>
			<property name="maxPercentage" value="10"/>
		</properties>
	</rule>
	<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
	<rule ref="Squiz.PHP.DiscouragedFunctions">
		<properties>
			<property name="error" value="true"/>
		</properties>
	</rule>
	<rule ref="Squiz.PHP.Eval"/>
	<rule ref="Squiz.PHP.GlobalKeyword"/>
	<rule ref="Squiz.PHP.InnerFunctions"/>
	<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
	<rule ref="Squiz.PHP.NonExecutableCode"/>
	<rule ref="Squiz.WhiteSpace.CastSpacing"/>
	<rule ref="Squiz.WhiteSpace.ControlStructureSpacing"/>
	<rule ref="Squiz.WhiteSpace.FunctionOpeningBraceSpace"/>
	<rule ref="Squiz.WhiteSpace.FunctionSpacing"/>
	<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
	<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
	<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing"/>
	<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
	<rule ref="Squiz.WhiteSpace.ScopeClosingBrace"/>
	<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
	<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
</ruleset>
