getTokens(); $token = $tokens[ $stackPtr ]; $content = trim( strtolower( $token['content'] ) ); // No need to check an empty string. if ( '' === $content ) { return; } foreach ( $this->generated_themes as $generated_theme ) { /* * The check can have false positives like artisteers but chances of that happening * in a valid theme is low. */ if ( false === strpos( $content, $generated_theme ) ) { continue; } $phpcsFile->addError( 'Auto generated themes are not allowed in the theme directory. Found: %s', $stackPtr, 'AutoGeneratedFound', [ $generated_theme ] ); } } }