WordPress/Sniffs/WP/EnqueuedResourcesSniff.php
public function process_token( $stackPtr ) {
		$token = $this->tokens[ $stackPtr ];

		if ( preg_match( '# rel=\\\\?[\'"]?stylesheet\\\\?[\'"]?#', $token['content'] ) > 0 ) {
			$this->phpcsFile->addError(
				'Stylesheets must be registered/enqueued via wp_enqueue_style',
				$stackPtr,
				'NonEnqueuedStylesheet'
			);
		}

		if ( preg_match( '#<script[^>]*(?<=src=)#', $token['content'] ) > 0 ) {
			$this->phpcsFile->addError(
				'Scripts must be registered/enqueued via wp_enqueue_script',
				$stackPtr,
				'NonEnqueuedScript'
			);
		}
	}
public function process_token( $stackPtr ) {
		$token = $this->tokens[ $stackPtr ];

		if ( preg_match( '# rel=\\\\?[\'"]?stylesheet\\\\?[\'"]?#', $token['content'] ) > 0 ) {
			$this->phpcsFile->addError(
				'Stylesheets must be registered/enqueued via wp_enqueue_style',
				$stackPtr,
				'NonEnqueuedStylesheet'
			);
		}

		if ( preg_match( '#<script[^>]*(?<=src=)#', $token['content'] ) > 0 ) {
			$this->phpcsFile->addError(
				'Scripts must be registered/enqueued via wp_enqueue_script',
				$stackPtr,
				'NonEnqueuedScript'
			);
		}
	}
Processes this test, when one of its tokens is encountered.

@param int $stackPtr The position of the current token in the stack.

@return void