Rename to XaiCorp
This commit is contained in:
5
vendor/sebastian/resource-operations/.gitignore
vendored
Normal file
5
vendor/sebastian/resource-operations/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/.idea
|
||||
/.php_cs.cache
|
||||
/build/FunctionSignatureMap.php
|
||||
/composer.lock
|
||||
/vendor
|
||||
33
vendor/sebastian/resource-operations/LICENSE
vendored
Normal file
33
vendor/sebastian/resource-operations/LICENSE
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
Resource Operations
|
||||
|
||||
Copyright (c) 2015-2018, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of Sebastian Bergmann nor the names of his
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
14
vendor/sebastian/resource-operations/README.md
vendored
Normal file
14
vendor/sebastian/resource-operations/README.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# Resource Operations
|
||||
|
||||
Provides a list of PHP built-in functions that operate on resources.
|
||||
|
||||
## Installation
|
||||
|
||||
You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
|
||||
|
||||
composer require sebastian/resource-operations
|
||||
|
||||
If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
|
||||
|
||||
composer require --dev sebastian/resource-operations
|
||||
|
||||
38
vendor/sebastian/resource-operations/build.xml
vendored
Normal file
38
vendor/sebastian/resource-operations/build.xml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="resource-operations" default="setup">
|
||||
<target name="setup" depends="clean,composer,generate"/>
|
||||
|
||||
<target name="clean" description="Cleanup build artifacts">
|
||||
<delete dir="${basedir}/vendor"/>
|
||||
<delete file="${basedir}/composer.lock"/>
|
||||
</target>
|
||||
|
||||
<target name="composer" depends="clean" description="Install dependencies with Composer">
|
||||
<exec executable="composer" taskname="composer">
|
||||
<arg value="update"/>
|
||||
<arg value="--no-interaction"/>
|
||||
<arg value="--no-progress"/>
|
||||
<arg value="--no-ansi"/>
|
||||
<arg value="--no-suggest"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="generate" depends="-download-arginfo">
|
||||
<exec executable="${basedir}/build/generate.php" taskname="generate" />
|
||||
</target>
|
||||
|
||||
<target name="-download-arginfo">
|
||||
<tstamp>
|
||||
<format property="thirty.days.ago" pattern="MM/dd/yyyy hh:mm aa" offset="-30" unit="day"/>
|
||||
</tstamp>
|
||||
|
||||
<delete>
|
||||
<fileset dir="${basedir}/build">
|
||||
<include name="arginfo.php" />
|
||||
<date datetime="${thirty.days.ago}" when="before"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
|
||||
<get src="https://raw.githubusercontent.com/phan/phan/master/src/Phan/Language/Internal/FunctionSignatureMap.php" dest="${basedir}/build/FunctionSignatureMap.php" skipexisting="true"/>
|
||||
</target>
|
||||
</project>
|
||||
65
vendor/sebastian/resource-operations/build/generate.php
vendored
Normal file
65
vendor/sebastian/resource-operations/build/generate.php
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of resource-operations.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
$functions = require __DIR__ . '/FunctionSignatureMap.php';
|
||||
$resourceFunctions = [];
|
||||
|
||||
foreach ($functions as $function => $arguments) {
|
||||
foreach ($arguments as $argument) {
|
||||
if (strpos($argument, '?') === 0) {
|
||||
$argument = substr($argument, 1);
|
||||
}
|
||||
|
||||
if ($argument === 'resource') {
|
||||
$resourceFunctions[] = explode('\'', $function)[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$resourceFunctions = array_unique($resourceFunctions);
|
||||
sort($resourceFunctions);
|
||||
|
||||
$buffer = <<<EOT
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of resource-operations.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\ResourceOperations;
|
||||
|
||||
final class ResourceOperations
|
||||
{
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getFunctions(): array
|
||||
{
|
||||
return [
|
||||
|
||||
EOT;
|
||||
|
||||
foreach ($resourceFunctions as $function) {
|
||||
$buffer .= sprintf(" '%s',\n", $function);
|
||||
}
|
||||
|
||||
$buffer .= <<< EOT
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
EOT;
|
||||
|
||||
file_put_contents(__DIR__ . '/../src/ResourceOperations.php', $buffer);
|
||||
|
||||
33
vendor/sebastian/resource-operations/composer.json
vendored
Normal file
33
vendor/sebastian/resource-operations/composer.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "sebastian/resource-operations",
|
||||
"description": "Provides a list of PHP built-in functions that operate on resources",
|
||||
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.1"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.1.0"
|
||||
},
|
||||
"optimize-autoloader": true,
|
||||
"sort-packages": true
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2232
vendor/sebastian/resource-operations/src/ResourceOperations.php
vendored
Normal file
2232
vendor/sebastian/resource-operations/src/ResourceOperations.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user