The function api_format_date() has an NPath complexity of 416. The configured NPath complexity threshold is 200. Open
function api_format_date($time, $format = null, $language = null)
{
if (empty($time)) {
return '';
}
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function api_get_local_time() has an NPath complexity of 400. The configured NPath complexity threshold is 200. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
Missing class import via use statement (line '246', column '24'). Open
return new DateTime(gmdate('Y-m-d H:i:s'), new DateTimeZone('UTC'));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '533', column '25'). Open
$language = new Westsworld\TimeAgo\Translations\En();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '492', column '27'). Open
$date_formatter = new IntlDateFormatter($language, $datetype, $timetype, date_default_timezone_get());
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '545', column '20'). Open
$now = new DateTime('now', $date->getTimezone());
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '264', column '21'). Open
$date = new DateTime($time, new DateTimezone($fromTimezone));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '257', column '44'). Open
return new DateTime($time, new DateTimeZone('UTC'));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '265', column '32'). Open
$date->setTimezone(new DateTimeZone('UTC'));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '339', column '21'). Open
$date = new DateTime($time, new DateTimezone($from_timezone));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '257', column '24'). Open
return new DateTime($time, new DateTimeZone('UTC'));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '339', column '41'). Open
$date = new DateTime($time, new DateTimezone($from_timezone));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '213', column '34'). Open
$newExtraField = new ExtraFieldValue('user');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '264', column '41'). Open
$date = new DateTime($time, new DateTimezone($fromTimezone));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '340', column '32'). Open
$date->setTimezone(new DateTimeZone($to_timezone));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '246', column '60'). Open
return new DateTime(gmdate('Y-m-d H:i:s'), new DateTimeZone('UTC'));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method api_get_human_date_time uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return $date->format('Y-m-d H:i:s');
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method api_get_utc_datetime uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return $date->format('Y-m-d H:i:s');
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method api_get_human_date_time uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if ($humanForm) {
return $date->format('j M Y');
} else {
return $date->format('Y-m-d');
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method date_to_str_ago uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$language = new Westsworld\TimeAgo\Translations\En();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method api_get_human_date_time uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return $date->format('Y-m-d');
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method api_get_person_name uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$valid[$format][$language] = _api_validate_person_name_format($format);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid unused parameters such as '$encoding'. Open
function api_substr_replace($string, $replacement, $start, $length = null, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$language'. Open
function api_strcmp($string1, $string2, $language = null, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_strnatcmp($string1, $string2, $language = null, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$timeZone'. Open
function date_to_str_ago($date, $timeZone = 'UTC', $returnDateDifference = false)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_str_split($string, $split_length = 1, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_strtolower($string, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_strtoupper(?string $string, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$check_utf8_validity'. Open
function api_to_system_encoding($string, $from_encoding = null, $check_utf8_validity = false)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_stripos($haystack, $needle, $offset = 0, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_strripos($haystack, $needle, $offset = 0, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_strrpos($haystack, $needle, $offset = 0, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$language'. Open
function api_natsort(&$array, $language = null, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_natsort(&$array, $language = null, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_natrsort(&$array, $language = null, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_stristr($haystack, $needle, $before_needle = false, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_strlen($string, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$language'. Open
function api_strnatcmp($string1, $string2, $language = null, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_strpos($haystack, $needle, $offset = 0, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
$encoding = null
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_ucfirst($string, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_strstr($haystack, $needle, $before_needle = false, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_strcmp($string1, $string2, $language = null, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_ucwords($string, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_preg_replace($pattern, $replacement, $subject, $limit = -1, $count = 0, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$before_needle'. Open
function api_strrchr($haystack, $needle, $before_needle = false, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$language'. Open
function api_natrsort(&$array, $language = null, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$unknown'. Open
function api_transliterate($string, $unknown = '?', $from_encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$from_encoding'. Open
function api_transliterate($string, $unknown = '?', $from_encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_str_ireplace($search, $replace, $subject, &$count = null, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_strrchr($haystack, $needle, $before_needle = false, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$encoding'. Open
function api_substr_count($haystack, $needle, $encoding = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
The parameter $before_needle is not named in camelCase. Open
function api_strrchr($haystack, $needle, $before_needle = false, $encoding = null)
{
return strrchr($haystack, $needle);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $split_length is not named in camelCase. Open
function api_str_split($string, $split_length = 1, $encoding = null)
{
return str_split($string, $split_length);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $from_timezone is not named in camelCase. Open
function api_convert_and_format_date($time = null, $format = null, $from_timezone = null)
{
// First, convert the datetime to the right timezone
$time = api_get_local_time($time, null, $from_timezone, true);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $from_encoding is not named in camelCase. Open
function api_transliterate($string, $unknown = '?', $from_encoding = null)
{
return URLify::transliterate($string);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $from_encoding is not named in camelCase. Open
function api_to_system_encoding($string, $from_encoding = null, $check_utf8_validity = false)
{
$system_encoding = api_get_system_encoding();
return api_convert_encoding($string, $system_encoding, $from_encoding);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $before_needle is not named in camelCase. Open
function api_strstr($haystack, $needle, $before_needle = false, $encoding = null)
{
return strstr($haystack, $needle, $before_needle);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $from_encoding is not named in camelCase. Open
function api_convert_encoding($string, $to_encoding, $from_encoding = 'UTF-8')
{
if (strtoupper($to_encoding) === strtoupper($from_encoding)) {
return $string;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $to_encoding is not named in camelCase. Open
function api_convert_encoding($string, $to_encoding, $from_encoding = 'UTF-8')
{
if (strtoupper($to_encoding) === strtoupper($from_encoding)) {
return $string;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $quote_style is not named in camelCase. Open
function api_htmlentities($string, $quote_style = ENT_COMPAT)
{
switch ($quote_style) {
case ENT_COMPAT:
$string = str_replace(['&', '"', '<', '>'], ['&', '"', '<', '>'], $string);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $to_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $first_name is not named in camelCase. Open
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $from_encoding is not named in camelCase. Open
function api_utf8_encode($string, $from_encoding = 'UTF-8')
{
return mb_convert_encoding($string, 'UTF-8', $from_encoding);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $from_encoding is not named in camelCase. Open
function api_xml_http_response_encode($string, $from_encoding = 'UTF8')
{
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && 'xmlhttprequest' == strtolower($_SERVER['HTTP_X_REQUESTED_WITH'])) {
if (empty($from_encoding)) {
$from_encoding = _api_mb_internal_encoding();
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $last_name is not named in camelCase. Open
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $before_needle is not named in camelCase. Open
function api_stristr($haystack, $needle, $before_needle = false, $encoding = null)
{
return stristr($haystack, $needle, $before_needle);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $from_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $check_utf8_validity is not named in camelCase. Open
function api_to_system_encoding($string, $from_encoding = null, $check_utf8_validity = false)
{
$system_encoding = api_get_system_encoding();
return api_convert_encoding($string, $system_encoding, $from_encoding);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $person_name is not named in camelCase. Open
function _api_clean_person_name($person_name)
{
return preg_replace(['/\s+/', '/, ,/', '/,+/', '/^[ ,]/', '/[ ,]$/'], [' ', ', ', ',', '', ''], $person_name);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Variable "from_timezone" is not in valid camel caps format Open
$from_timezone = null,
- Exclude checks
Variable "from_timezone" is not in valid camel caps format Open
$from_timezone = 'UTC';
- Exclude checks
Consider putting global function "api_get_months_short" in a static class Open
function api_get_months_short($language = null)
- Exclude checks
Variable "first_name" is not in valid camel caps format Open
$first_name,
- Exclude checks
Variable "null_option" is not in valid camel caps format Open
$null_option = ['' => ''];
- Exclude checks
Consider putting global function "api_get_timezone" in a static class Open
function api_get_timezone()
- Exclude checks
Variable "to_timezone" is not in valid camel caps format Open
$to_timezone = null,
- Exclude checks
Variable "system_encoding" is not in valid camel caps format Open
$system_encoding = api_get_system_encoding();
- Exclude checks
Consider putting global function "api_get_utc_datetime" in a static class Open
function api_get_utc_datetime($time = null, $returnNullIfInvalidDate = false, $returnObj = false)
- Exclude checks
Consider putting global function "api_strtotime" in a static class Open
function api_strtotime($time, $timezone = null)
- Exclude checks
Variable "formatted_date" is not in valid camel caps format Open
return $formatted_date;
- Exclude checks
Variable "last_name" is not in valid camel caps format Open
$last_name,
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
if (strtoupper($to_encoding) === strtoupper($from_encoding)) {
- Exclude checks
Consider putting global function "api_to_system_encoding" in a static class Open
function api_to_system_encoding($string, $from_encoding = null, $check_utf8_validity = false)
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
function api_to_system_encoding($string, $from_encoding = null, $check_utf8_validity = false)
- Exclude checks
Variable "to_timezone" is not in valid camel caps format Open
$to_timezone = api_get_timezone();
- Exclude checks
Variable "system_timezone" is not in valid camel caps format Open
$system_timezone = date_default_timezone_get();
- Exclude checks
Consider putting global function "api_is_western_name_order" in a static class Open
function api_is_western_name_order($format = null, $language = null)
- Exclude checks
Variable "timezone_identifiers" is not in valid camel caps format Open
sort($timezone_identifiers);
- Exclude checks
Consider putting global function "api_get_local_time" in a static class Open
function api_get_local_time(
- Exclude checks
Variable "from_timezone" is not in valid camel caps format Open
$from_timezone = 'UTC';
- Exclude checks
Variable "system_timezone" is not in valid camel caps format Open
date_default_timezone_set($system_timezone);
- Exclude checks
Consider putting global function "date_to_str_ago" in a static class Open
function date_to_str_ago($date, $timeZone = 'UTC', $returnDateDifference = false)
- Exclude checks
Variable "last_name" is not in valid camel caps format Open
$last_name,
- Exclude checks
Variable "check_utf8_validity" is not in valid camel caps format Open
function api_to_system_encoding($string, $from_encoding = null, $check_utf8_validity = false)
- Exclude checks
Variable "null_option" is not in valid camel caps format Open
return array_merge($null_option, $out);
- Exclude checks
Expected 59 spaces after parameter type; 1 found Open
* @param mixed $time Timestamp or datetime string
- Exclude checks
Expected 5 spaces after parameter name; 1 found Open
* @param mixed $time Timestamp or datetime string
- Exclude checks
Missing parameter name Open
* @param string|int Date format (see date formats in the Chamilo system:
- Exclude checks
Expected 58 spaces after parameter type; 1 found Open
* @param string $language (optional) Language id
- Exclude checks
Consider putting global function "api_format_date" in a static class Open
function api_format_date($time, $format = null, $language = null)
- Exclude checks
Variable "first_name" is not in valid camel caps format Open
api_strtoupper($first_name),
- Exclude checks
Variable "test_name" is not in valid camel caps format Open
$test_name = api_get_person_name('%f', '%l', '%t', $format, $language);
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
function api_convert_encoding($string, $to_encoding, $from_encoding = 'UTF-8')
- Exclude checks
Consider putting global function "api_utf8_encode" in a static class Open
function api_utf8_encode($string, $from_encoding = 'UTF-8')
- Exclude checks
Variable "timezone_identifiers" is not in valid camel caps format Open
$timezone_identifiers = DateTimeZone::listIdentifiers();
- Exclude checks
Variable "date_formatter" is not in valid camel caps format Open
$date_formatter = new IntlDateFormatter($language, $datetype, $timetype, date_default_timezone_get());
- Exclude checks
Missing parameter name Open
* @param string Timezone to be converted from. If null, UTC will be assumed.
- Exclude checks
Consider putting global function "api_convert_and_format_date" in a static class Open
function api_convert_and_format_date($time = null, $format = null, $from_timezone = null)
- Exclude checks
Variable "from_timezone" is not in valid camel caps format Open
$time = api_get_local_time($time, null, $from_timezone, true);
- Exclude checks
Variable "test_name" is not in valid camel caps format Open
$order[$format][$language] = stripos($test_name, '%f') <= stripos($test_name, '%l');
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
return mb_convert_encoding($string, 'UTF-8', $from_encoding);
- Exclude checks
Consider putting global function "get_lang" in a static class Open
function get_lang(string $variable, ?string $locale = null): string
- Exclude checks
Missing parameter name Open
* @param mixed Format to be used (TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG)
- Exclude checks
Consider putting global function "api_get_person_name" in a static class Open
function api_get_person_name(
- Exclude checks
Variable "last_name" is not in valid camel caps format Open
api_strtoupper($last_name),
- Exclude checks
Variable "person_name" is not in valid camel caps format Open
$person_name = str_replace($keywords, $values, $format);
- Exclude checks
Variable "person_name" is not in valid camel caps format Open
return _api_clean_person_name($person_name);
- Exclude checks
Consider putting global function "api_utf8_decode" in a static class Open
function api_utf8_decode($string, $toEncoding = null)
- Exclude checks
Consider putting global function "api_get_language_isocode" in a static class Open
function api_get_language_isocode()
- Exclude checks
Consider putting global function "api_get_text_direction" in a static class Open
function api_get_text_direction($iso = '')
- Exclude checks
Variable "from_timezone" is not in valid camel caps format Open
$from_timezone = 'UTC';
- Exclude checks
Variable "last_name" is not in valid camel caps format Open
$last_name,
- Exclude checks
Consider putting global function "api_get_platform_isocodes" in a static class Open
function api_get_platform_isocodes()
- Exclude checks
Variable "to_timezone" is not in valid camel caps format Open
if (is_null($to_timezone)) {
- Exclude checks
Variable "formatted_date" is not in valid camel caps format Open
$formatted_date = api_to_system_encoding($date_formatter->format($time), 'UTF-8');
- Exclude checks
Variable "from_timezone" is not in valid camel caps format Open
function api_convert_and_format_date($time = null, $format = null, $from_timezone = null)
- Exclude checks
Consider putting global function "api_convert_encoding" in a static class Open
function api_convert_encoding($string, $to_encoding, $from_encoding = 'UTF-8')
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
return mb_convert_encoding($string, $to_encoding, $from_encoding);
- Exclude checks
Consider putting global function "api_get_timezones" in a static class Open
function api_get_timezones()
- Exclude checks
Variable "to_timezone" is not in valid camel caps format Open
$date->setTimezone(new DateTimeZone($to_timezone));
- Exclude checks
Variable "test_name" is not in valid camel caps format Open
$order[$format][$language] = stripos($test_name, '%f') <= stripos($test_name, '%l');
- Exclude checks
Variable "sort_by_first_name" is not in valid camel caps format Open
if (!isset($sort_by_first_name[$language])) {
- Exclude checks
Variable "from_timezone" is not in valid camel caps format Open
$date = new DateTime($time, new DateTimezone($from_timezone));
- Exclude checks
Variable "date_formatter" is not in valid camel caps format Open
$formatted_date = api_to_system_encoding($date_formatter->format($time), 'UTF-8');
- Exclude checks
Consider putting global function "api_get_months_long" in a static class Open
function api_get_months_long($language = null)
- Exclude checks
Variable "first_name" is not in valid camel caps format Open
$first_name,
- Exclude checks
Variable "to_encoding" is not in valid camel caps format Open
return mb_convert_encoding($string, $to_encoding, $from_encoding);
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
function api_utf8_encode($string, $from_encoding = 'UTF-8')
- Exclude checks
Variable "system_timezone" is not in valid camel caps format Open
$system_timezone = date_default_timezone_get();
- Exclude checks
Variable "sort_by_first_name" is not in valid camel caps format Open
return $sort_by_first_name[$language];
- Exclude checks
Variable "to_encoding" is not in valid camel caps format Open
if (strtoupper($to_encoding) === strtoupper($from_encoding)) {
- Exclude checks
Variable "from_timezone" is not in valid camel caps format Open
if (is_null($from_timezone)) {
- Exclude checks
Variable "system_timezone" is not in valid camel caps format Open
date_default_timezone_set($system_timezone);
- Exclude checks
Missing parameter name Open
* @param mixed The time to be converted
- Exclude checks
Consider putting global function "api_get_week_days_long" in a static class Open
function api_get_week_days_long($language = null)
- Exclude checks
Consider putting global function "api_sort_by_first_name" in a static class Open
function api_sort_by_first_name($language = null)
- Exclude checks
Variable "sort_by_first_name" is not in valid camel caps format Open
static $sort_by_first_name = [];
- Exclude checks
Variable "sort_by_first_name" is not in valid camel caps format Open
$sort_by_first_name[$language] = _api_get_person_name_convention($language, 'sort_by');
- Exclude checks
Variable "to_encoding" is not in valid camel caps format Open
function api_convert_encoding($string, $to_encoding, $from_encoding = 'UTF-8')
- Exclude checks
Variable "timezone_identifiers" is not in valid camel caps format Open
foreach ($timezone_identifiers as $tz) {
- Exclude checks
Variable "from_timezone" is not in valid camel caps format Open
$from_timezone = 'UTC';
- Exclude checks
Consider putting global function "api_get_week_days_short" in a static class Open
function api_get_week_days_short($language = null)
- Exclude checks
Variable "first_name" is not in valid camel caps format Open
$first_name,
- Exclude checks
Consider putting global function "api_strpos" in a static class Open
function api_strpos($haystack, $needle, $offset = 0, $encoding = null)
- Exclude checks
Variable "before_needle" is not in valid camel caps format Open
return strstr($haystack, $needle, $before_needle);
- Exclude checks
Consider putting global function "get_plugin_lang" in a static class Open
function get_plugin_lang($variable, $pluginName)
- Exclude checks
Consider putting global function "_api_validate_person_name_format" in a static class Open
function _api_validate_person_name_format($format)
- Exclude checks
Doc comment for parameter $quote_style does not match actual variable name $quoteStyle Open
* @param int $quote_style (optional) The quote style - ENT_COMPAT (default), ENT_QUOTES, ENT_NOQUOTES
- Exclude checks
Consider putting global function "api_strrchr" in a static class Open
function api_strrchr($haystack, $needle, $before_needle = false, $encoding = null)
- Exclude checks
Consider putting global function "api_is_valid_utf8" in a static class Open
function api_is_valid_utf8($string)
- Exclude checks
Variable "quote_style" is not in valid camel caps format Open
switch ($quote_style) {
- Exclude checks
Consider putting global function "api_refine_encoding_id" in a static class Open
function api_refine_encoding_id($encoding)
- Exclude checks
Consider putting global function "api_detect_encoding" in a static class Open
function api_detect_encoding($string)
- Exclude checks
Consider putting global function "api_is_valid_ascii" in a static class Open
function api_is_valid_ascii(&$string)
- Exclude checks
Variable "week_day" is not in valid camel caps format Open
$week_day[$i].'Long',
- Exclude checks
Consider putting global function "_api_strnatrcmp" in a static class Open
function _api_strnatrcmp($string1, $string2)
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
return api_convert_encoding($string, $system_encoding, $from_encoding);
- Exclude checks
Consider putting global function "api_html_entity_decode" in a static class Open
function api_html_entity_decode($string, $quoteStyle = ENT_COMPAT, $encoding = 'UTF-8')
- Exclude checks
Consider putting global function "api_str_ireplace" in a static class Open
function api_str_ireplace($search, $replace, $subject, &$count = null, $encoding = null)
- Exclude checks
Consider putting global function "api_natrsort" in a static class Open
function api_natrsort(&$array, $language = null, $encoding = null)
- Exclude checks
Variable "split_length" is not in valid camel caps format Open
return str_split($string, $split_length);
- Exclude checks
Consider putting global function "api_strlen" in a static class Open
function api_strlen($string, $encoding = null)
- Exclude checks
Consider putting global function "api_strrpos" in a static class Open
function api_strrpos($haystack, $needle, $offset = 0, $encoding = null)
- Exclude checks
Doc comment for parameter &$matches does not match actual variable name $matches Open
* @param array &$matches (optional) Array of all matches in multi-dimensional array ordered according to $flags
- Exclude checks
Consider putting global function "api_preg_split" in a static class Open
function api_preg_split($pattern, $subject, $limit = -1, $flags = 0)
- Exclude checks
Consider putting global function "api_strnatcmp" in a static class Open
function api_strnatcmp($string1, $string2, $language = null, $encoding = null)
- Exclude checks
Variable "person_name" is not in valid camel caps format Open
function _api_clean_person_name($person_name)
- Exclude checks
Consider putting global function "api_xml_http_response_encode" in a static class Open
function api_xml_http_response_encode($string, $from_encoding = 'UTF8')
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
$from_encoding = _api_mb_internal_encoding();
- Exclude checks
Consider putting global function "api_transliterate" in a static class Open
function api_transliterate($string, $unknown = '?', $from_encoding = null)
- Exclude checks
Consider putting global function "api_strtoupper" in a static class Open
function api_strtoupper(?string $string, $encoding = null)
- Exclude checks
Consider putting global function "api_preg_match" in a static class Open
function api_preg_match(
- Exclude checks
Variable "week_day" is not in valid camel caps format Open
$week_day[$i].'Short',
- Exclude checks
Consider putting global function "_api_clean_person_name" in a static class Open
function _api_clean_person_name($person_name)
- Exclude checks
Variable "split_length" is not in valid camel caps format Open
function api_str_split($string, $split_length = 1, $encoding = null)
- Exclude checks
Variable "before_needle" is not in valid camel caps format Open
return stristr($haystack, $needle, $before_needle);
- Exclude checks
Consider putting global function "api_get_system_encoding" in a static class Open
function api_get_system_encoding()
- Exclude checks
Variable "date_parts" is not in valid camel caps format Open
$date_parts[$language]['days_long'][] = get_lang(
- Exclude checks
Variable "person_name" is not in valid camel caps format Open
return preg_replace(['/\s+/', '/, ,/', '/,+/', '/^[ ,]/', '/[ ,]$/'], [' ', ', ', ',', '', ''], $person_name);
- Exclude checks
Consider putting global function "_api_mb_internal_encoding" in a static class Open
function _api_mb_internal_encoding($encoding = 'UTF-8')
- Exclude checks
Consider putting global function "api_str_split" in a static class Open
function api_str_split($string, $split_length = 1, $encoding = null)
- Exclude checks
Variable "date_parts" is not in valid camel caps format Open
if (!isset($date_parts[$language])) {
- Exclude checks
Consider putting global function "api_strtolower" in a static class Open
function api_strtolower($string, $encoding = null)
- Exclude checks
Consider putting global function "api_preg_match_all" in a static class Open
function api_preg_match_all($pattern, $subject, &$matches, $flags = PREG_PATTERN_ORDER, $offset = 0, $encoding = null)
- Exclude checks
Variable "date_parts" is not in valid camel caps format Open
static $date_parts = [];
- Exclude checks
Variable "date_parts" is not in valid camel caps format Open
$date_parts[$language]['days_short'][] = get_lang(
- Exclude checks
Consider putting global function "api_htmlentities" in a static class Open
function api_htmlentities($string, $quote_style = ENT_COMPAT)
- Exclude checks
Consider putting global function "api_natsort" in a static class Open
function api_natsort(&$array, $language = null, $encoding = null)
- Exclude checks
Variable "date_parts" is not in valid camel caps format Open
$date_parts[$language]['months_short'][] = get_lang(
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
if (empty($from_encoding)) {
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
function api_transliterate($string, $unknown = '?', $from_encoding = null)
- Exclude checks
Consider putting global function "api_stristr" in a static class Open
function api_stristr($haystack, $needle, $before_needle = false, $encoding = null)
- Exclude checks
Variable "before_needle" is not in valid camel caps format Open
function api_stristr($haystack, $needle, $before_needle = false, $encoding = null)
- Exclude checks
Consider putting global function "api_ucwords" in a static class Open
function api_ucwords($string, $encoding = null)
- Exclude checks
Consider putting global function "api_preg_replace" in a static class Open
function api_preg_replace($pattern, $replacement, $subject, $limit = -1, $count = 0, $encoding = null)
- Exclude checks
Variable "system_encoding" is not in valid camel caps format Open
return api_convert_encoding($string, $system_encoding, $from_encoding);
- Exclude checks
Variable "from_encoding" is not in valid camel caps format Open
function api_xml_http_response_encode($string, $from_encoding = 'UTF8')
- Exclude checks
Consider putting global function "api_strripos" in a static class Open
function api_strripos($haystack, $needle, $offset = 0, $encoding = null)
- Exclude checks
Doc comment for parameter &$matches does not match actual variable name $matches Open
* @param array &$matches (optional) If matches is provided,
- Exclude checks
Consider putting global function "api_strcasecmp" in a static class Open
function api_strcasecmp($string1, $string2, $language = null, $encoding = null)
- Exclude checks
Consider putting global function "api_strcmp" in a static class Open
function api_strcmp($string1, $string2, $language = null, $encoding = null)
- Exclude checks
Consider putting global function "api_is_valid_date" in a static class Open
function api_is_valid_date($date, $format = 'Y-m-d H:i:s')
- Exclude checks
Variable "date_parts" is not in valid camel caps format Open
$date_parts[$language]['months_long'][] = get_lang(
- Exclude checks
Variable "date_parts" is not in valid camel caps format Open
return $date_parts[$language];
- Exclude checks
Variable "before_needle" is not in valid camel caps format Open
function api_strstr($haystack, $needle, $before_needle = false, $encoding = null)
- Exclude checks
Variable "before_needle" is not in valid camel caps format Open
function api_strrchr($haystack, $needle, $before_needle = false, $encoding = null)
- Exclude checks
Consider putting global function "api_substr" in a static class Open
function api_substr($string, $start, $length = null, $encoding = null)
- Exclude checks
Consider putting global function "api_substr_replace" in a static class Open
function api_substr_replace($string, $replacement, $start, $length = null, $encoding = null)
- Exclude checks
Consider putting global function "api_ucfirst" in a static class Open
function api_ucfirst($string, $encoding = null)
- Exclude checks
Variable "week_day" is not in valid camel caps format Open
$week_day = [
- Exclude checks
Consider putting global function "api_get_human_date_time" in a static class Open
function api_get_human_date_time($date, $showTime = true, $humanForm = false)
- Exclude checks
Consider putting global function "api_ord" in a static class Open
function api_ord($character, $encoding = 'UTF-8')
- Exclude checks
Consider putting global function "api_stripos" in a static class Open
function api_stripos($haystack, $needle, $offset = 0, $encoding = null)
- Exclude checks
Consider putting global function "api_substr_count" in a static class Open
function api_substr_count($haystack, $needle, $encoding = null)
- Exclude checks
Variable "quote_style" is not in valid camel caps format Open
function api_htmlentities($string, $quote_style = ENT_COMPAT)
- Exclude checks
Consider putting global function "api_strstr" in a static class Open
function api_strstr($haystack, $needle, $before_needle = false, $encoding = null)
- Exclude checks
Doc comment for parameter &$count does not match actual variable name $count Open
* @param int &$count If specified, this variable will be filled with the number of replacements done
- Exclude checks
Superfluous parameter comment Open
* @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the
- Exclude checks
Consider putting global function "_api_get_day_month_names" in a static class Open
function &_api_get_day_month_names($language = null)
- Exclude checks
Consider putting global function "_api_get_person_name_convention" in a static class Open
function _api_get_person_name_convention($iso, $type)
- Exclude checks
The variable $test_name is not named in camelCase. Open
function api_is_western_name_order($format = null, $language = null)
{
static $order = [];
if (empty($format)) {
$format = PERSON_NAME_COMMON_CONVENTION;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $to_encoding is not named in camelCase. Open
function api_convert_encoding($string, $to_encoding, $from_encoding = 'UTF-8')
{
if (strtoupper($to_encoding) === strtoupper($from_encoding)) {
return $string;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_encoding is not named in camelCase. Open
function api_xml_http_response_encode($string, $from_encoding = 'UTF8')
{
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && 'xmlhttprequest' == strtolower($_SERVER['HTTP_X_REQUESTED_WITH'])) {
if (empty($from_encoding)) {
$from_encoding = _api_mb_internal_encoding();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $null_option is not named in camelCase. Open
function api_get_timezones()
{
$timezone_identifiers = DateTimeZone::listIdentifiers();
sort($timezone_identifiers);
$out = [];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $to_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $to_encoding is not named in camelCase. Open
function api_convert_encoding($string, $to_encoding, $from_encoding = 'UTF-8')
{
if (strtoupper($to_encoding) === strtoupper($from_encoding)) {
return $string;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_encoding is not named in camelCase. Open
function api_convert_encoding($string, $to_encoding, $from_encoding = 'UTF-8')
{
if (strtoupper($to_encoding) === strtoupper($from_encoding)) {
return $string;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $system_timezone is not named in camelCase. Open
function api_strtotime($time, $timezone = null)
{
$system_timezone = date_default_timezone_get();
if (!empty($timezone)) {
date_default_timezone_set($timezone);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $date_formatter is not named in camelCase. Open
function api_format_date($time, $format = null, $language = null)
{
if (empty($time)) {
return '';
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $last_name is not named in camelCase. Open
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $system_encoding is not named in camelCase. Open
function api_to_system_encoding($string, $from_encoding = null, $check_utf8_validity = false)
{
$system_encoding = api_get_system_encoding();
return api_convert_encoding($string, $system_encoding, $from_encoding);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_encoding is not named in camelCase. Open
function api_xml_http_response_encode($string, $from_encoding = 'UTF8')
{
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && 'xmlhttprequest' == strtolower($_SERVER['HTTP_X_REQUESTED_WITH'])) {
if (empty($from_encoding)) {
$from_encoding = _api_mb_internal_encoding();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $timezone_identifiers is not named in camelCase. Open
function api_get_timezones()
{
$timezone_identifiers = DateTimeZone::listIdentifiers();
sort($timezone_identifiers);
$out = [];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $person_name is not named in camelCase. Open
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $to_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $system_timezone is not named in camelCase. Open
function api_strtotime($time, $timezone = null)
{
$system_timezone = date_default_timezone_get();
if (!empty($timezone)) {
date_default_timezone_set($timezone);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $sort_by_first_name is not named in camelCase. Open
function api_sort_by_first_name($language = null)
{
static $sort_by_first_name = [];
if (empty($language)) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $week_day is not named in camelCase. Open
function &_api_get_day_month_names($language = null)
{
static $date_parts = [];
if (empty($language)) {
$language = api_get_language_isocode();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $first_name is not named in camelCase. Open
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $last_name is not named in camelCase. Open
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $system_encoding is not named in camelCase. Open
function api_to_system_encoding($string, $from_encoding = null, $check_utf8_validity = false)
{
$system_encoding = api_get_system_encoding();
return api_convert_encoding($string, $system_encoding, $from_encoding);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $date_parts is not named in camelCase. Open
function &_api_get_day_month_names($language = null)
{
static $date_parts = [];
if (empty($language)) {
$language = api_get_language_isocode();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $formatted_date is not named in camelCase. Open
function api_format_date($time, $format = null, $language = null)
{
if (empty($time)) {
return '';
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $first_name is not named in camelCase. Open
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $test_name is not named in camelCase. Open
function api_is_western_name_order($format = null, $language = null)
{
static $order = [];
if (empty($format)) {
$format = PERSON_NAME_COMMON_CONVENTION;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $before_needle is not named in camelCase. Open
function api_stristr($haystack, $needle, $before_needle = false, $encoding = null)
{
return stristr($haystack, $needle, $before_needle);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $before_needle is not named in camelCase. Open
function api_strstr($haystack, $needle, $before_needle = false, $encoding = null)
{
return strstr($haystack, $needle, $before_needle);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $date_parts is not named in camelCase. Open
function &_api_get_day_month_names($language = null)
{
static $date_parts = [];
if (empty($language)) {
$language = api_get_language_isocode();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $date_parts is not named in camelCase. Open
function &_api_get_day_month_names($language = null)
{
static $date_parts = [];
if (empty($language)) {
$language = api_get_language_isocode();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $split_length is not named in camelCase. Open
function api_str_split($string, $split_length = 1, $encoding = null)
{
return str_split($string, $split_length);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $date_parts is not named in camelCase. Open
function &_api_get_day_month_names($language = null)
{
static $date_parts = [];
if (empty($language)) {
$language = api_get_language_isocode();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $system_timezone is not named in camelCase. Open
function api_format_date($time, $format = null, $language = null)
{
if (empty($time)) {
return '';
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $sort_by_first_name is not named in camelCase. Open
function api_sort_by_first_name($language = null)
{
static $sort_by_first_name = [];
if (empty($language)) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_encoding is not named in camelCase. Open
function api_convert_encoding($string, $to_encoding, $from_encoding = 'UTF-8')
{
if (strtoupper($to_encoding) === strtoupper($from_encoding)) {
return $string;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_encoding is not named in camelCase. Open
function api_to_system_encoding($string, $from_encoding = null, $check_utf8_validity = false)
{
$system_encoding = api_get_system_encoding();
return api_convert_encoding($string, $system_encoding, $from_encoding);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $week_day is not named in camelCase. Open
function &_api_get_day_month_names($language = null)
{
static $date_parts = [];
if (empty($language)) {
$language = api_get_language_isocode();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $formatted_date is not named in camelCase. Open
function api_format_date($time, $format = null, $language = null)
{
if (empty($time)) {
return '';
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $test_name is not named in camelCase. Open
function api_is_western_name_order($format = null, $language = null)
{
static $order = [];
if (empty($format)) {
$format = PERSON_NAME_COMMON_CONVENTION;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $week_day is not named in camelCase. Open
function &_api_get_day_month_names($language = null)
{
static $date_parts = [];
if (empty($language)) {
$language = api_get_language_isocode();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $person_name is not named in camelCase. Open
function _api_clean_person_name($person_name)
{
return preg_replace(['/\s+/', '/, ,/', '/,+/', '/^[ ,]/', '/[ ,]$/'], [' ', ', ', ',', '', ''], $person_name);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $system_timezone is not named in camelCase. Open
function api_format_date($time, $format = null, $language = null)
{
if (empty($time)) {
return '';
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_timezone is not named in camelCase. Open
function api_convert_and_format_date($time = null, $format = null, $from_timezone = null)
{
// First, convert the datetime to the right timezone
$time = api_get_local_time($time, null, $from_timezone, true);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $last_name is not named in camelCase. Open
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $person_name is not named in camelCase. Open
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $sort_by_first_name is not named in camelCase. Open
function api_sort_by_first_name($language = null)
{
static $sort_by_first_name = [];
if (empty($language)) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_encoding is not named in camelCase. Open
function api_utf8_encode($string, $from_encoding = 'UTF-8')
{
return mb_convert_encoding($string, 'UTF-8', $from_encoding);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $date_parts is not named in camelCase. Open
function &_api_get_day_month_names($language = null)
{
static $date_parts = [];
if (empty($language)) {
$language = api_get_language_isocode();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $null_option is not named in camelCase. Open
function api_get_timezones()
{
$timezone_identifiers = DateTimeZone::listIdentifiers();
sort($timezone_identifiers);
$out = [];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $date_parts is not named in camelCase. Open
function &_api_get_day_month_names($language = null)
{
static $date_parts = [];
if (empty($language)) {
$language = api_get_language_isocode();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $timezone_identifiers is not named in camelCase. Open
function api_get_timezones()
{
$timezone_identifiers = DateTimeZone::listIdentifiers();
sort($timezone_identifiers);
$out = [];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $date_formatter is not named in camelCase. Open
function api_format_date($time, $format = null, $language = null)
{
if (empty($time)) {
return '';
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $quote_style is not named in camelCase. Open
function api_htmlentities($string, $quote_style = ENT_COMPAT)
{
switch ($quote_style) {
case ENT_COMPAT:
$string = str_replace(['&', '"', '<', '>'], ['&', '"', '<', '>'], $string);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $timezone_identifiers is not named in camelCase. Open
function api_get_timezones()
{
$timezone_identifiers = DateTimeZone::listIdentifiers();
sort($timezone_identifiers);
$out = [];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $from_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $to_timezone is not named in camelCase. Open
function api_get_local_time(
$time = null,
$to_timezone = null,
$from_timezone = null,
$returnNullIfInvalidDate = false,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $first_name is not named in camelCase. Open
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}