![]() 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 possible usage of 'var' language construction. */ class VarSniff implements Sniff { /** * String representation of warning. * * @var string */ protected $warningMessage = 'Use of var class variables is discouraged.'; /** * Warning violation code. * * @var string */ protected $warningCode = 'FoundVar'; /** * @inheritdoc */ public function register() { return [T_VAR]; } /** * @inheritdoc */ public function process(File $phpcsFile, $stackPtr) { $phpcsFile->addWarning($this->warningMessage, $stackPtr, $this->warningCode); } }