Avoid empty style definition (PHP) | CAST Appmarq

Avoid empty style definition (PHP)

CRITICAL

Rule Definition
For maintainability reasons, empty style definitions should be avoided.

Remediation
Try to reduce the number of files containing an empty style definition.

Violation Code Sample
<?php echo "Title"; ?>

<html>
   <head>
   <title>...</title>
   <style type="text/css"/> <!-- violation -->
   </style>
   <style/> <!-- violation -->
   <style> 
   /*violation*/
   </style>
   </head>
<body>

</body>
</html>

Reference
Code Sniffer - http://pear.php.net/package/PHP_CodeSniffer/docs/1.5.2/PHP_CodeSniffer/Squiz_Sniffs_CSS_EmptyStyleDefinitionSniff.html

Related Technologies

Health Factor

  Total Quality Index


Technical Criterion
Complexity - Empty Code

About CAST Appmarq

CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.

Benchmark Statistics

Global Compliance

100.00%

Total Violations
0
Total Opportunities
179,380
Average Violations / App.
0.00
The compliance score represents 1 minus the ratio between the number of times a rule has been violated compared to the number of opportunities in a set of applications that the rule could have been violated.

Industry Insights

IT & Business Consulting

99.99%

Software ISV

99.99%

Select from drop-down

100.00%