style: auto-fix PHPCS violations via phpcbf
This commit is contained in:
@@ -67,7 +67,7 @@ class PR_Core_Schema_Sanitizers {
|
||||
return '';
|
||||
}
|
||||
// 3. Extract the maximal leading run of valid element tokens and separators.
|
||||
// A valid run must start with an element token ([A-Z][a-z]?\d*), not a separator.
|
||||
// A valid run must start with an element token ([A-Z][a-z]?\d*), not a separator.
|
||||
$pattern = '/^((?:' . self::FORMULA_TOKEN . '|' . self::FORMULA_SEP . ')+)/u';
|
||||
if ( preg_match( $pattern, $value, $m ) ) {
|
||||
return $m[1];
|
||||
@@ -132,7 +132,7 @@ class PR_Core_Schema_Sanitizers {
|
||||
return '[]';
|
||||
}
|
||||
|
||||
$clean = [];
|
||||
$clean = array();
|
||||
foreach ( $value as $item ) {
|
||||
if ( ! is_array( $item ) ) {
|
||||
continue;
|
||||
@@ -140,10 +140,10 @@ class PR_Core_Schema_Sanitizers {
|
||||
$question = sanitize_text_field( (string) ( $item['question'] ?? '' ) );
|
||||
$answer = sanitize_textarea_field( (string) ( $item['answer'] ?? '' ) );
|
||||
if ( '' !== $question && '' !== $answer ) {
|
||||
$clean[] = [
|
||||
$clean[] = array(
|
||||
'question' => $question,
|
||||
'answer' => $answer,
|
||||
];
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user