![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/vendor/magento/magento-coding-standard/Magento2/Sniffs/PHP/ |
<?php /** * Copyright 2018 Adobe * All Rights Reserved. */ namespace Magento2\Sniffs\PHP; use PHP_CodeSniffer\Sniffs\Sniff; use PHP_CodeSniffer\Files\File; /** * Detects use of GOTO. */ class GotoSniff implements Sniff { /** * String representation of warning. * * @var string */ protected $errorMessage = 'Use of goto is discouraged.'; /** * Warning violation code. * * @var string */ protected $errorCode = 'FoundGoto'; /** * @inheritdoc */ public function register() { return [T_GOTO]; } /** * @inheritdoc */ public function process(File $phpcsFile, $stackPtr) { $phpcsFile->addError($this->errorMessage, $stackPtr, $this->errorCode); } }