mirror of
https://github.com/Cacti/cacti.git
synced 2026-10-27 07:13:15 +09:00
Add PHPCS standards file for test purposes
This commit is contained in:
1 parent
df63b0109d
commit
4e381cf485
2 files changed
+70
-2
No files matched your search
@@ -37,7 +37,7 @@ function render_external_links($style = 'FRONT') {
|
||||
|
||||
if (cacti_sizeof($consoles)) {
|
||||
foreach($consoles as $page) {
|
||||
if (is_realm_allowed($page['id']+10000)) {
|
||||
if (is_realm_allowed($page['id'] + 10000)) {
|
||||
if (preg_match('/^((((ht|f)tp(s?))\:\/\/){1}\S+)/i', $page['contentfile'])) {
|
||||
print '<iframe class="content" src="' . $page['contentfile'] . '" frameborder="0"></iframe>';
|
||||
} else {
|
||||
@@ -79,7 +79,7 @@ if (read_config_option('hide_console') != 'on') {
|
||||
</tr>
|
||||
<?php if ($config['poller_id'] > 1) {?>
|
||||
<tr class='tableRow'><td colspan='2'><hr></td></tr>
|
||||
<tr class='tableRow'><td colspan='2'><strong><?php print __('Remote Data Collector Status:');?></strong> <?php print '<i>' . ($config['connection'] == 'online' ? __('Online'):($config['connection'] == 'recovery' ? __('Recovery'):__('Offline'))) . '</i>';?></td></tr>
|
||||
<tr class='tableRow'><td colspan='2'><strong><?php print __('Remote Data Collector Status:');?></strong> <?php print '<i>' . ($config['connection'] == 'online' ? __('Online') : ($config['connection'] == 'recovery' ? __('Recovery') : __('Offline'))) . '</i>';?></td></tr>
|
||||
<?php if ($config['connection'] != 'online') {?>
|
||||
<tr class='tableRow'><td colspan='2'><strong><?php print __('Number of Offline Records:');?></strong> <?php print '<i>' . number_format_i18n(db_fetch_cell('SELECT COUNT(*) FROM poller_output_boost', '', true, $local_db_cnn_id)) . '</i>';?></td></tr>
|
||||
<?php }?>
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="Cacti">
|
||||
<description>Cacti Development ruleset for CodeSniffer
|
||||
http://www.cacti.net
|
||||
</description>
|
||||
<rule ref="Generic.Classes.DuplicateClassName"/>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
|
||||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
|
||||
<rule ref="Generic.Commenting.Fixme"/>
|
||||
<rule ref="Generic.ControlStructures.InlineControlStructure">
|
||||
<properties>
|
||||
<property name="error" value="false"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Generic.Files.ByteOrderMark"/>
|
||||
<rule ref="Generic.Files.LineEndings"/>
|
||||
<rule ref="Generic.Files.LineLength"/>
|
||||
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
|
||||
<rule ref="Generic.Formatting.MultipleStatementAlignment"/>
|
||||
<rule ref="Generic.Formatting.SpaceAfterCast"/>
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
|
||||
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
|
||||
<rule ref="Generic.NamingConventions.ConstructorName"/>
|
||||
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
|
||||
<rule ref="Generic.PHP.DeprecatedFunctions"/>
|
||||
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
|
||||
<rule ref="Generic.PHP.ForbiddenFunctions">
|
||||
<properties>
|
||||
<property name="error" value="false"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="MySource.PHP.ReturnFunctionValue"/>
|
||||
<rule ref="PSR1.Classes.ClassDeclaration"/>
|
||||
<rule ref="PSR1.Files.SideEffects"/>
|
||||
<rule ref="PSR2.Classes.ClassDeclaration"/>
|
||||
<rule ref="PSR2.Classes.PropertyDeclaration"/>
|
||||
<rule ref="PSR2.ControlStructures.ControlStructureSpacing"/>
|
||||
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
|
||||
<rule ref="PSR2.Files.EndFileNewline"/>
|
||||
<rule ref="Squiz.PHP.DisallowMultipleAssignments"/>
|
||||
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
|
||||
<rule ref="Squiz.PHP.DiscouragedFunctions"/>
|
||||
<rule ref="Squiz.PHP.ForbiddenFunctions"/>
|
||||
<rule ref="Squiz.PHP.NonExecutableCode"/>
|
||||
<rule ref="Squiz.Scope.MemberVarScope"/>
|
||||
<rule ref="Squiz.Scope.MethodScope"/>
|
||||
<rule ref="Squiz.Scope.StaticThisUsage"/>
|
||||
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
|
||||
<properties>
|
||||
<property name="spacing" value="1"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.MemberVarSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.PropertyLabelSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace"/>
|
||||
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
|
||||
</ruleset>
|
||||
Reference in new issue
Block a user