Exemplo n.º 1
0
 /**
  * Prepare our code standard setup, PHP Code Sniffer performs this in:
  * PHP_CodeSniffer_AllTests and PHP_CodeSniffer_TestSuite
  *
  * @see AbstractSniffUnitTest::setUp()
  */
 protected function setUp()
 {
     $GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'] = ['showSources' => true, 'colors' => true, 'default_standard' => 'Hostnet', 'installed_paths' => __DIR__ . '/../../../src/'];
     $GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS'][get_class($this)] = __DIR__ . '/../..';
     $GLOBALS['PHP_CODESNIFFER_SNIFF_CODES'] = [];
     $GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES'] = [];
     parent::setUp();
 }
 protected function setUp()
 {
     parent::setUp();
     WordPress_Sniffs_Arrays_ArrayAssignmentRestrictionsSniff::$groups = array('posts_per_page' => array('type' => 'error', 'message' => 'Found assignment value of %s to be %s', 'keys' => array('foo', 'bar')));
 }
 protected function setUp()
 {
     parent::setUp();
     WordPress_Sniffs_Variables_VariableRestrictionsSniff::$groups = array('test' => array('type' => 'error', 'message' => 'Detected usage of %s', 'object_vars' => array('$foo->bar', 'FOO::var', 'FOO::reg*', 'FOO::$static'), 'array_members' => array('$foo[\'test\']'), 'variables' => array('$taz')));
 }