src/php/endpoints.php
Showing 417 of 417 total issues
Function get_website_meta
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
Open
function get_website_meta() { if ( ! extension_loaded( 'dom' ) || ! extension_loaded( 'libxml' ) ) { wp_send_json_error( [], 501 ); exit; }
- Read upRead up
Method get_website_meta
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_website_meta() { if ( ! extension_loaded( 'dom' ) || ! extension_loaded( 'libxml' ) ) { wp_send_json_error( [], 501 ); exit; }
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 19 and the first side effect is on line 12. Open
Open
<?php
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! extension_loaded( 'dom' ) || ! extension_loaded( 'libxml' ) ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $authors as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $issued ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! isset( $_POST['url'] ) ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $authors as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( 'custom' === $current_style['kind'] ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $authors as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $article as $node ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $authors as $author ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $sailthru as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $opengraph as $node ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $opengraph as $node ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $authors as $author ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $opengraph as $node ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $article as $node ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $sailthru as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $issued ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $authors as $author ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $title ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $article as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( 'author' === $key ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
} elseif ( $issued->hasAttribute( 'content' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $title ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $abt as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $sailthru as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $issued->hasAttribute( 'datetime' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( strlen( $value ) > 50 ) {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $abt as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( 'author' === $key ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $author->nodeName === 'meta' ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $abt as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( is_null( $state ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! isset( $_POST['state'], $_POST['post_id'] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! $payload['title'] ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'og' => [],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Stray Meta "name" Tags.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$styles = get_citation_styles();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_send_json_error( [], 501 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_send_json_error( [], 400 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'sailthru' => [],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'family' => $a[1],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'article' => [],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$authors = $xpath->query( '//meta[ @name="author" ]' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $authors as $node ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
check_ajax_referer( 'abt-ajax' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['authors'][] = $a;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_send_json( $styles );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( ! isset( $_POST['url'] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['issued'] = sanitize_text_field( $issued->getAttribute( 'content' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$html = new \DOMDocument();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $issued ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$url = esc_url_raw( wp_unslash( $_POST['url'] ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'authors' => [],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$issued = $xpath->query( '//meta[ @name="pubdate" ]' )->item( 0 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( 'custom' === $current_style['kind'] ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( ! extension_loaded( 'dom' ) || ! extension_loaded( 'libxml' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$raw = wp_remote_retrieve_body( wp_safe_remote_get( $url ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'given' => $a[0],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$sailthru = $xpath->query( '//meta[ starts-with( @name, "sailthru" ) ]' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( strlen( $value ) > 50 ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$styles->styles[] = $current_style;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
exit;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $issued->hasAttribute( 'datetime' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$a = explode( ' ', sanitize_text_field( $node->getAttribute( 'content' ) ), 2 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$a = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $article as $node ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
continue;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$a = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
check_ajax_referer( 'abt-ajax' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$xpath = new \DOMXPath( $html );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['og'][ $key ] = $value;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'family' => $a[1],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['sailthru'][ $key ] = $value;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['article'][ $key ] = $value;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
continue;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Itemprop Tags.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$expl = explode( '.', $node->getAttribute( 'name' ), 2 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['authors'][] = $a;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$current_style = get_option( ABT_OPTIONS_KEY )['citation_style'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
libxml_use_internal_errors( true );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$html->loadHTML( $raw );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $opengraph as $node ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$article = $xpath->query( '//meta[ starts-with( @property, "article:" ) ]' );
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
Open
$authors = $xpath->query( '//*[ @itemprop="author" ][ not( ancestor::*[ @itemtype="http://schema.org/Comment" ] ) ]' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $issued ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['issued'] = esc_attr( $issued->getAttribute( 'content' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$a = explode( ' ', $value, 2 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $author->nodeName === 'meta' ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$key = sanitize_key( $expl[1] );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_send_json_error( 'state is null', 400 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$key = sanitize_key( $expl[1] );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['title'] = sanitize_text_field( $title->textContent );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Sailthru Tags.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$issued = $xpath->query( '//*[ @itemprop="datePublished" ]' )->item( 0 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$authors = $xpath->query( '//*[ @itemprop="author" ][ not( ancestor::*[ @itemtype="http://schema.org/Comment" ] ) ]' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $title ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['title'] = sanitize_text_field( $title->textContent );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$a = explode( '|', $value, 2 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$title = $xpath->query( '/html/head/title' )->item( 0 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Open Graph Tags.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['issued'] = esc_attr( $issued->getAttribute( 'datetime' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( is_null( $state ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$key = sanitize_key( str_replace( ':', '_', $expl[1] ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $sailthru as $node ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$key = sanitize_key( $expl[1] );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( 'author' === $key ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'given' => $a[0],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
} elseif ( $issued->hasAttribute( 'content' ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $authors as $author ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$a = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['authors'][] = $a;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$state = json_decode( wp_unslash( $_POST['state'] ) ); // phpcs:ignore
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$abt = $xpath->query( '//meta[ starts-with( @property, "abt:" ) ]' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Last ditch effort to get a title of the site.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$opengraph = $xpath->query( '//meta[ starts-with( @property, "og:" ) ]' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Article Tags.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $abt as $node ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( ! $payload['title'] ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_send_json( $payload );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$post_id = intval( $_POST['post_id'] );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'_abt_state',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_slash(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_json_encode( $state )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$title = $xpath->query( '//*[ @itemprop="headline" ]' )->item( 0 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'family' => $a[1],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
check_ajax_referer( 'abt-ajax' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$updated = update_post_meta(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'family' => $a[1],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( 'author' === $key ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'given' => $a[0],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $title ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( ! isset( $_POST['state'], $_POST['post_id'] ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_send_json_error( 'required fields not sent', 400 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_send_json_success( $state );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$post_id,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$a = explode( ' ', sanitize_text_field( $author->textContent ), 2 );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'given' => $a[0],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
continue;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$a = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$payload['authors'][] = $a;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* ABT Tags.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
);
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
defined( 'ABSPATH' ) || exit;
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'wp_ajax_get_style_json', __NAMESPACE__ . '\get_style_json' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! extension_loaded( 'dom' ) || ! extension_loaded( 'libxml' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! isset( $_POST['url'] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! isset( $_POST['url'] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$a = explode( ' ', sanitize_text_field( $node->getAttribute( 'content' ) ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$issued = $xpath->query( '//meta[ @name="pubdate" ]' )->item( 0 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$payload['issued'] = sanitize_text_field( $issued->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_send_json( $styles );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! extension_loaded( 'dom' ) || ! extension_loaded( 'libxml' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
check_ajax_referer( 'abt-ajax' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
libxml_use_internal_errors( true );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$html->loadHTML( $raw );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( 'custom' === $current_style['kind'] ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! extension_loaded( 'dom' ) || ! extension_loaded( 'libxml' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$xpath = new \DOMXPath( $html );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$payload['issued'] = sanitize_text_field( $issued->getAttribute( 'content' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
check_ajax_referer( 'abt-ajax' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! isset( $_POST['url'] ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$authors = $xpath->query( '//meta[ @name="author" ]' );
- Exclude checks
Opening brace should be on a new line Open
Open
function get_style_json() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$payload['issued'] = sanitize_text_field( $issued->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_send_json_error( [], 400 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$raw = wp_remote_retrieve_body( wp_safe_remote_get( $url ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$raw = wp_remote_retrieve_body( wp_safe_remote_get( $url ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$a = explode( ' ', sanitize_text_field( $node->getAttribute( 'content' ) ), 2 );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$current_style = get_option( ABT_OPTIONS_KEY )['citation_style'];
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! extension_loaded( 'dom' ) || ! extension_loaded( 'libxml' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$a = explode( ' ', sanitize_text_field( $node->getAttribute( 'content' ) ), 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
libxml_use_internal_errors( true );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$html->loadHTML( $raw );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $authors as $node ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$current_style = get_option( ABT_OPTIONS_KEY )['citation_style'];
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_send_json_error( [], 501 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_send_json_error( [], 501 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$a = explode( ' ', sanitize_text_field( $node->getAttribute( 'content' ) ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
check_ajax_referer( 'abt-ajax' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_send_json( $styles );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_send_json_error( [], 400 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$raw = wp_remote_retrieve_body( wp_safe_remote_get( $url ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$xpath = new \DOMXPath( $html );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$a = explode( ' ', sanitize_text_field( $node->getAttribute( 'content' ) ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$issued = $xpath->query( '//meta[ @name="pubdate" ]' )->item( 0 );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $issued ) {
- Exclude checks
Opening brace should be on a new line Open
Open
function get_website_meta() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$url = esc_url_raw( wp_unslash( $_POST['url'] ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$raw = wp_remote_retrieve_body( wp_safe_remote_get( $url ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$article = $xpath->query( '//meta[ starts-with( @property, "article:" ) ]' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$a = explode( ' ', $value, 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_action( 'wp_ajax_get_style_json', __NAMESPACE__ . '\get_style_json' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! extension_loaded( 'dom' ) || ! extension_loaded( 'libxml' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
check_ajax_referer( 'abt-ajax' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$a = explode( ' ', sanitize_text_field( $node->getAttribute( 'content' ) ), 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$key = sanitize_key( $expl[1] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
defined( 'ABSPATH' ) || exit;
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$url = esc_url_raw( wp_unslash( $_POST['url'] ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$authors = $xpath->query( '//meta[ @name="author" ]' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$issued = $xpath->query( '//meta[ @name="pubdate" ]' )->item( 0 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$expl = explode( '.', $node->getAttribute( 'name' ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
} elseif ( $issued->hasAttribute( 'content' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$authors = $xpath->query( '//*[ @itemprop="author" ][ not( ancestor::*[ @itemtype="http://schema.org/Comment" ] ) ]' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$issued = $xpath->query( '//meta[ @name="pubdate" ]' )->item( 0 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( 'author' === $key ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $issued->hasAttribute( 'datetime' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$authors = $xpath->query( '//*[ @itemprop="author" ][ not( ancestor::*[ @itemtype="http://schema.org/Comment" ] ) ]' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $opengraph as $node ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$url = esc_url_raw( wp_unslash( $_POST['url'] ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$key = sanitize_key( str_replace( ':', '_', $expl[1] ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$sailthru = $xpath->query( '//meta[ starts-with( @name, "sailthru" ) ]' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$payload['issued'] = esc_attr( $issued->getAttribute( 'content' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$key = sanitize_key( str_replace( ':', '_', $expl[1] ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$key = sanitize_key( $expl[1] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( strlen( $value ) > 50 ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$issued = $xpath->query( '//*[ @itemprop="datePublished" ]' )->item( 0 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $issued->hasAttribute( 'datetime' ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
} elseif ( $issued->hasAttribute( 'content' ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
} elseif ( $issued->hasAttribute( 'content' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$url = esc_url_raw( wp_unslash( $_POST['url'] ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$payload['issued'] = sanitize_text_field( $issued->getAttribute( 'content' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$expl = explode( '.', $node->getAttribute( 'name' ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$payload['issued'] = esc_attr( $issued->getAttribute( 'datetime' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$key = sanitize_key( str_replace( ':', '_', $expl[1] ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$key = sanitize_key( $expl[1] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$sailthru = $xpath->query( '//meta[ starts-with( @name, "sailthru" ) ]' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $sailthru as $node ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$expl = explode( '.', $node->getAttribute( 'name' ), 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( strlen( $value ) > 50 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$article = $xpath->query( '//meta[ starts-with( @property, "article:" ) ]' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$expl = explode( '.', $node->getAttribute( 'name' ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$key = sanitize_key( $expl[1] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$a = explode( ' ', $value, 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$payload['issued'] = esc_attr( $issued->getAttribute( 'content' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$a = explode( ' ', sanitize_text_field( $author->textContent ), 2 );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $title ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$payload['title'] = sanitize_text_field( $title->textContent );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( is_null( $state ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$key = sanitize_key( str_replace( ':', '_', $expl[1] ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$payload['issued'] = esc_attr( $issued->getAttribute( 'datetime' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$title = $xpath->query( '/html/head/title' )->item( 0 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'wp_ajax_update_abt_state', __NAMESPACE__ . '\update_abt_state' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( strlen( $value ) > 50 ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $issued ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$payload['issued'] = esc_attr( $issued->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$payload['issued'] = esc_attr( $issued->getAttribute( 'content' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$a = explode( '|', $value, 2 );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $title ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$state = json_decode( wp_unslash( $_POST['state'] ) ); // phpcs:ignore
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$issued = $xpath->query( '//*[ @itemprop="datePublished" ]' )->item( 0 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$payload['issued'] = esc_attr( $issued->getAttribute( 'datetime' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$a = explode( ' ', sanitize_text_field( $author->textContent ), 2 );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $abt as $node ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
check_ajax_referer( 'abt-ajax' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $authors as $author ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$a = explode( ' ', sanitize_text_field( $author->textContent ), 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$title = $xpath->query( '/html/head/title' )->item( 0 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
check_ajax_referer( 'abt-ajax' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_send_json_error( 'required fields not sent', 400 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$state = json_decode( wp_unslash( $_POST['state'] ) ); // phpcs:ignore
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_send_json_success( $state );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$opengraph = $xpath->query( '//meta[ starts-with( @property, "og:" ) ]' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( $issued->hasAttribute( 'datetime' ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_send_json_error( 'state is null', 400 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$title = $xpath->query( '/html/head/title' )->item( 0 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$payload['title'] = sanitize_text_field( $title->textContent );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_send_json_error( 'required fields not sent', 400 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_send_json_success( $state );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$opengraph = $xpath->query( '//meta[ starts-with( @property, "og:" ) ]' );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $article as $node ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$issued = $xpath->query( '//*[ @itemprop="datePublished" ]' )->item( 0 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$issued = $xpath->query( '//*[ @itemprop="datePublished" ]' )->item( 0 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$payload['issued'] = esc_attr( $issued->getAttribute( 'datetime' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$a = explode( ' ', sanitize_text_field( $author->textContent ), 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$payload['title'] = sanitize_text_field( $title->textContent );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$key = sanitize_key( $expl[1] );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! $payload['title'] ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_action( 'wp_ajax_update_abt_state', __NAMESPACE__ . '\update_abt_state' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$state = json_decode( wp_unslash( $_POST['state'] ) ); // phpcs:ignore
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$payload['title'] = sanitize_text_field( $title->textContent );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( ! isset( $_POST['state'], $_POST['post_id'] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$title = $xpath->query( '//*[ @itemprop="headline" ]' )->item( 0 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$value = sanitize_text_field( $node->getAttribute( 'content' ) );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$title = $xpath->query( '/html/head/title' )->item( 0 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( ! isset( $_POST['state'], $_POST['post_id'] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_json_encode( $state )
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$title = $xpath->query( '//*[ @itemprop="headline" ]' )->item( 0 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_send_json( $payload );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_action( 'wp_ajax_get_website_meta', __NAMESPACE__ . '\get_website_meta' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$post_id = intval( $_POST['post_id'] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$post_id = intval( $_POST['post_id'] );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$title = $xpath->query( '//*[ @itemprop="headline" ]' )->item( 0 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$title = $xpath->query( '//*[ @itemprop="headline" ]' )->item( 0 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$abt = $xpath->query( '//meta[ starts-with( @property, "abt:" ) ]' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$expl = explode( ':', $node->getAttribute( 'property' ), 2 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$key = sanitize_key( $expl[1] );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! isset( $_POST['state'], $_POST['post_id'] ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( is_null( $state ) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_send_json_error( 'state is null', 400 );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_json_encode( $state )
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $author->nodeName === 'meta' ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( 'author' === $key ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$a = explode( '|', $value, 2 );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( ! is_int( array_search( $a, $payload['authors'], true ) ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_action( 'wp_ajax_get_website_meta', __NAMESPACE__ . '\get_website_meta' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$abt = $xpath->query( '//meta[ starts-with( @property, "abt:" ) ]' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_send_json( $payload );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$state = json_decode( wp_unslash( $_POST['state'] ) ); // phpcs:ignore
- Exclude checks
Opening brace should be on a new line Open
Open
function update_abt_state() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( is_null( $state ) ) {
- Exclude checks