, * Pádraic Brady * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return [ 'meta' => [ 'title' => 'Function declarations in the global scope', // Default values. If not specified will be the one used 'prefix' => 'Humbug', 'whitelist' => [], 'whitelist-global-constants' => false, 'whitelist-global-classes' => false, 'whitelist-global-functions' => true, 'registered-classes' => [], 'registered-functions' => [], ], 'Simple function declaration' => [ 'registered-functions' => [ ['foo', 'Humbug\foo'], ], 'payload' => <<<'PHP' [ 'whitelist' => ['foo'], 'registered-functions' => [ ['foo', 'Humbug\foo'], ], 'payload' => <<<'PHP' [ 'whitelist-global-functions' => false, 'whitelist' => ['foo'], 'registered-functions' => [ ['foo', 'Humbug\foo'], ], 'payload' => <<<'PHP' [ 'whitelist' => ['X\Y', 'BAR_CONST'], 'registered-classes' => [ ['X\Y', 'Humbug\X\Y'], ], 'registered-functions' => [ ['foo', 'Humbug\foo'], ], 'payload' => <<<'PHP' [ 'whitelist-global-constants' => true, 'registered-functions' => [ ['foo', 'Humbug\foo'], ], 'payload' => <<<'PHP' [ 'whitelist' => ['X\Y'], 'registered-classes' => [ ['X\Y', 'Humbug\X\Y'], ], 'registered-functions' => [ ['foo', 'Humbug\foo'], ], 'payload' => <<<'PHP' [ 'whitelist' => ['X\Y'], 'registered-classes' => [ ['X\Y', 'Humbug\X\Y'], ], 'registered-functions' => [ ['foo', 'Humbug\foo'], ], 'payload' => <<<'PHP'