Upgrade framework

This commit is contained in:
2023-11-14 16:54:35 +01:00
parent 1648a5cd42
commit 4fcf6fffcc
10548 changed files with 693138 additions and 466698 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env php
<?php
<?php declare(strict_types=1);
/*
* This file is part of resource-operations.
*
@@ -9,13 +9,17 @@
* file that was distributed with this source code.
*/
$functions = require __DIR__ . '/arginfo.php';
$functions = require __DIR__ . '/FunctionSignatureMap.php';
$resourceFunctions = [];
foreach ($functions as $function => $arguments) {
foreach ($arguments as $argument) {
if ($argument == 'resource') {
$resourceFunctions[] = $function;
if (strpos($argument, '?') === 0) {
$argument = substr($argument, 1);
}
if ($argument === 'resource') {
$resourceFunctions[] = explode('\'', $function)[0];
}
}
}
@@ -24,7 +28,7 @@ $resourceFunctions = array_unique($resourceFunctions);
sort($resourceFunctions);
$buffer = <<<EOT
<?php
<?php declare(strict_types=1);
/*
* This file is part of resource-operations.
*
@@ -33,15 +37,14 @@ $buffer = <<<EOT
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace SebastianBergmann\ResourceOperations;
class ResourceOperations
final class ResourceOperations
{
/**
* @return string[]
*/
public static function getFunctions()
public static function getFunctions(): array
{
return [