4 * This file is part of resource-operations.
6 * (c) Sebastian Bergmann <sebastian@phpunit.de>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 $functions = require __DIR__
. '/arginfo.php';
13 $resourceFunctions = [];
15 foreach ($functions as $function => $arguments) {
16 foreach ($arguments as $argument) {
17 if ($argument == 'resource') {
18 $resourceFunctions[] = $function;
23 $resourceFunctions = array_unique($resourceFunctions);
24 sort($resourceFunctions);
29 * This file is part of resource-operations.
31 * (c) Sebastian Bergmann <sebastian@phpunit.de>
33 * For the full copyright and license information, please view the LICENSE
34 * file that was distributed with this source code.
37 namespace SebastianBergmann\ResourceOperations;
39 class ResourceOperations
44 public static function getFunctions()
50 foreach ($resourceFunctions as $function) {
51 $buffer .= sprintf(" '%s',\n", $function);
61 file_put_contents(__DIR__
. '/../src/ResourceOperations.php', $buffer);