for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @TODO file_put_contents(), strftime(), mb_*()
This check looks TODO comments that have been left in the code.
TODO
``TODO``s show that something is left unfinished and should be attended to.
*/
class PHPCOMPAT
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* @param string $str
* @param int $flags
* @param string $encode
* @return string
public function htmlspecialchars($str = '', $flags = ENT_COMPAT, $encode = '')
global $modx;
if ($str == '') {
return '';
}
if ($encode == '') {
$encode = $modx->config['modx_charset'];
$ent_str = htmlspecialchars($str, $flags, $encode);
if (!empty($str) && empty($ent_str)) {
$detect_order = implode(',', mb_detect_order());
$ent_str = mb_convert_encoding($str, $encode, $detect_order);
return $ent_str;
This check looks
TODO
comments that have been left in the code.``TODO``s show that something is left unfinished and should be attended to.