diff --git a/README.md b/README.md index ce254d3f..e3b187ec 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ You’ll also need to ensure the following: # Testing -This repository includes [PHPStan](https://github.com/phpstan/phpstan) to statically analyze the codebase. +This repository includes [PHPStan](https://github.com/phpstan/phpstan) to statically analyze the codebase and [Safe PHP](https://github.com/thecodingmachine/safe) to replace old functions that don't throw exceptions. To run PHPStan, execute: diff --git a/composer.json b/composer.json index e7651088..daf908c2 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,13 @@ { "require-dev": { - "phpstan/phpstan": "^0.11.2" + "phpstan/phpstan": "^0.11.2", + "thecodingmachine/phpstan-safe-rule": "^0.1.3" }, "autoload": { "psr-4": {"": "lib/"}, "files": ["lib/Constants.php", "lib/CoreFunctions.php"] + }, + "require": { + "thecodingmachine/safe": "^0.1.14" } } diff --git a/composer.lock b/composer.lock index 8de44248..db09a7e4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,141 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "eed5e4de65902f3c2e1429d5b4068d9d", - "packages": [], + "content-hash": "aa70e67832f20ec3789ed9ccd25c3646", + "packages": [ + { + "name": "thecodingmachine/safe", + "version": "v0.1.14", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/safe.git", + "reference": "67b654c7effeda8db27c133e5f0cbb638e90d1e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/67b654c7effeda8db27c133e5f0cbb638e90d1e4", + "reference": "67b654c7effeda8db27c133e5f0cbb638e90d1e4", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "^0.10.3", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "autoload": { + "psr-4": { + "Safe\\": [ + "lib/", + "generated/" + ] + }, + "files": [ + "generated/apache.php", + "generated/apc.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/ingres-ii.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libevent.php", + "generated/libxml.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/msql.php", + "generated/mssql.php", + "generated/mysql.php", + "generated/mysqli.php", + "generated/mysqlndMs.php", + "generated/mysqlndQc.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/password.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pdf.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/simplexml.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stats.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php", + "lib/special_cases.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP core functions that throw exceptions instead of returning FALSE on error", + "time": "2019-03-07T11:09:21+00:00" + } + ], "packages-dev": [ { "name": "composer/xdebug-handler", @@ -1093,6 +1226,54 @@ "shim" ], "time": "2018-09-21T13:07:52+00:00" + }, + { + "name": "thecodingmachine/phpstan-safe-rule", + "version": "v0.1.3", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/phpstan-safe-rule.git", + "reference": "00f4845905feb5240ca62fb799e3c51ba85c9230" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/phpstan-safe-rule/zipball/00f4845905feb5240ca62fb799e3c51ba85c9230", + "reference": "00f4845905feb5240ca62fb799e3c51ba85c9230", + "shasum": "" + }, + "require": { + "php": "^7.1", + "phpstan/phpstan": "^0.10 | ^0.11", + "thecodingmachine/safe": "^0.1.11" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^7.5.2", + "squizlabs/php_codesniffer": "^3.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "autoload": { + "psr-4": { + "TheCodingMachine\\Safe\\PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com" + } + ], + "description": "A PHPStan rule to detect safety issues. Must be used in conjunction with thecodingmachine/safe", + "time": "2019-03-07T13:52:42+00:00" } ], "aliases": [], diff --git a/lib/Core.php b/lib/Core.php index ff4099d5..157d5569 100644 --- a/lib/Core.php +++ b/lib/Core.php @@ -1,11 +1,15 @@ $vendorDir . '/nette/utils/src/loader.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + '3f648889e687f31c52f949ba8a9d0873' => $vendorDir . '/thecodingmachine/safe/generated/apache.php', + 'eab5d259bc3aff0bc10e38f403600cce' => $vendorDir . '/thecodingmachine/safe/generated/apc.php', + 'eeb4581d958421a4244aaa4167c6a575' => $vendorDir . '/thecodingmachine/safe/generated/apcu.php', + '04cb0b3c1dac5b5ddb23c14e3d66dbe9' => $vendorDir . '/thecodingmachine/safe/generated/array.php', + '450b332a74a9a21e043c5e953485a791' => $vendorDir . '/thecodingmachine/safe/generated/bzip2.php', + '2c6d7e8bd2de9a272a9d4d43b0a4304a' => $vendorDir . '/thecodingmachine/safe/generated/classobj.php', + '0b8231c1ad0865447c988a4c16b4001f' => $vendorDir . '/thecodingmachine/safe/generated/com.php', + '7643a71fe1c3256058c8fee234cb86e5' => $vendorDir . '/thecodingmachine/safe/generated/cubrid.php', + '68e1365710575942efc1d55000032cee' => $vendorDir . '/thecodingmachine/safe/generated/curl.php', + '02fd26bca803106c5b942a7197c3ad8b' => $vendorDir . '/thecodingmachine/safe/generated/datetime.php', + 'f4817dcbd956cd221b1c31f6fbd5749c' => $vendorDir . '/thecodingmachine/safe/generated/dir.php', + '51c3f2d10ca61a70dbcea0e38d8e902d' => $vendorDir . '/thecodingmachine/safe/generated/eio.php', + '1d34f34327ca3e81535963016e3be2c3' => $vendorDir . '/thecodingmachine/safe/generated/errorfunc.php', + '4fd0ba2d3717b0424d474bebfdafa2b4' => $vendorDir . '/thecodingmachine/safe/generated/exec.php', + '98f4dae054bc7fb19c13be14935cbdd3' => $vendorDir . '/thecodingmachine/safe/generated/fileinfo.php', + '5530ae063ba88323eaf0a07904efdf85' => $vendorDir . '/thecodingmachine/safe/generated/filesystem.php', + '633f4f134975d70e97bddad83348e91a' => $vendorDir . '/thecodingmachine/safe/generated/filter.php', + 'fbd163fc68c5faf73d5ed4002ffd836d' => $vendorDir . '/thecodingmachine/safe/generated/fpm.php', + '21b511999d61411fab0692ff8795bbed' => $vendorDir . '/thecodingmachine/safe/generated/ftp.php', + '85fbd73fc92365cd90526b0ea03cae3a' => $vendorDir . '/thecodingmachine/safe/generated/funchand.php', + '51df9c146e0b7dcbdf358d8abd24dbdc' => $vendorDir . '/thecodingmachine/safe/generated/gmp.php', + '93bb7fe678d7dcfb1322f8e3475a48b0' => $vendorDir . '/thecodingmachine/safe/generated/gnupg.php', + 'c171ba99cf316379ff66468392bf4950' => $vendorDir . '/thecodingmachine/safe/generated/hash.php', + '5ab4aad4c28e468209fbfcceb2e5e6a5' => $vendorDir . '/thecodingmachine/safe/generated/ibase.php', + '4d57409c5e8e576b0c64c08d9d731cfb' => $vendorDir . '/thecodingmachine/safe/generated/ibmDb2.php', + 'eeb246d5403972a9d62106e4a4883496' => $vendorDir . '/thecodingmachine/safe/generated/iconv.php', + 'c28a05f498c01b810a714f7214b7a8da' => $vendorDir . '/thecodingmachine/safe/generated/image.php', + '8063cd92acdf00fd978b5599eb7cc142' => $vendorDir . '/thecodingmachine/safe/generated/imap.php', + '8bd26dbe768e9c9599edad7b198e5446' => $vendorDir . '/thecodingmachine/safe/generated/info.php', + '0c577fe603b029d4b65c84376b15dbd5' => $vendorDir . '/thecodingmachine/safe/generated/ingres-ii.php', + 'd4362910bde43c0f956b52527effd7d4' => $vendorDir . '/thecodingmachine/safe/generated/inotify.php', + '696ba49197d9b55f0428a12bb5a818e1' => $vendorDir . '/thecodingmachine/safe/generated/json.php', + '9818aaa99c8647c63f8ef62b7a368160' => $vendorDir . '/thecodingmachine/safe/generated/ldap.php', + '39d49c88877eb176a0be4e407f3cc95f' => $vendorDir . '/thecodingmachine/safe/generated/libevent.php', + 'bcf523ff2a195eb08e0fbb668ed784d0' => $vendorDir . '/thecodingmachine/safe/generated/libxml.php', + '68be68a9a8b95bb56cab6109ff03bc88' => $vendorDir . '/thecodingmachine/safe/generated/lzf.php', + 'bdca804bb0904ea9f53f328dfc0bb8a5' => $vendorDir . '/thecodingmachine/safe/generated/mailparse.php', + 'b0a3fcac3eaf55445796d6af26b89366' => $vendorDir . '/thecodingmachine/safe/generated/mbstring.php', + '98de16b8db03eb0cb4d318b4402215a6' => $vendorDir . '/thecodingmachine/safe/generated/misc.php', + 'c112440003b56e243b192c11fa9d836e' => $vendorDir . '/thecodingmachine/safe/generated/msql.php', + 'd12306fdf0bdb146582b277385a2ed7b' => $vendorDir . '/thecodingmachine/safe/generated/mssql.php', + '7cefd81607cd21b8b3a15656eb6465f5' => $vendorDir . '/thecodingmachine/safe/generated/mysql.php', + 'aaf438b080089c6d0686679cd34aa72e' => $vendorDir . '/thecodingmachine/safe/generated/mysqli.php', + 'df0ef890e9afbf95f3924feb1c7a89f3' => $vendorDir . '/thecodingmachine/safe/generated/mysqlndMs.php', + 'db595fee5972867e45c5327010d78735' => $vendorDir . '/thecodingmachine/safe/generated/mysqlndQc.php', + 'cbac956836b72483dcff1ac39d5c0a0f' => $vendorDir . '/thecodingmachine/safe/generated/network.php', + '6c8f89dfbdc117d7871f572269363f25' => $vendorDir . '/thecodingmachine/safe/generated/oci8.php', + '169a669966a45c06bf55ed029122729b' => $vendorDir . '/thecodingmachine/safe/generated/opcache.php', + 'def61bf4fecd4d4bca7354919cd69302' => $vendorDir . '/thecodingmachine/safe/generated/openssl.php', + '26bb010649a6d32d4120181458aa6ef2' => $vendorDir . '/thecodingmachine/safe/generated/outcontrol.php', + '1212c201fe43c7492a085b2c71505e0f' => $vendorDir . '/thecodingmachine/safe/generated/password.php', + '002ebcb842e2c0d5b7f67fe64cc93158' => $vendorDir . '/thecodingmachine/safe/generated/pcntl.php', + '86df38612982dade72c7085ce7eca81f' => $vendorDir . '/thecodingmachine/safe/generated/pcre.php', + '1cacc3e65f82a473fbd5507c7ce4385d' => $vendorDir . '/thecodingmachine/safe/generated/pdf.php', + '1fc22f445c69ea8706e82fce301c0831' => $vendorDir . '/thecodingmachine/safe/generated/pgsql.php', + 'c70b42561584f7144bff38cd63c4eef3' => $vendorDir . '/thecodingmachine/safe/generated/posix.php', + '9923214639c32ca5173db03a177d3b63' => $vendorDir . '/thecodingmachine/safe/generated/ps.php', + '7e9c3f8eae2b5bf42205c4f1295cb7a7' => $vendorDir . '/thecodingmachine/safe/generated/pspell.php', + '91aa91f6245c349c2e2e88bd0025f199' => $vendorDir . '/thecodingmachine/safe/generated/readline.php', + 'f053a3849e9e8383762b34b91db0320b' => $vendorDir . '/thecodingmachine/safe/generated/rrd.php', + '775b964f72f827a1bf87c65ab5b10800' => $vendorDir . '/thecodingmachine/safe/generated/sem.php', + '816428bd69c29ab5e1ed622af5dca0cd' => $vendorDir . '/thecodingmachine/safe/generated/session.php', + '5093e233bedbefaef0df262bfbab0a5c' => $vendorDir . '/thecodingmachine/safe/generated/shmop.php', + '01352920b0151f17e671266e44b52536' => $vendorDir . '/thecodingmachine/safe/generated/simplexml.php', + 'b080617b1d949683c2e37f8f01dc0e15' => $vendorDir . '/thecodingmachine/safe/generated/sockets.php', + '2708aa182ddcfe6ce27c96acaaa40f69' => $vendorDir . '/thecodingmachine/safe/generated/sodium.php', + 'f1b96cb260a5baeea9a7285cda82a1ec' => $vendorDir . '/thecodingmachine/safe/generated/solr.php', + '3fd8853757d0fe3557c179efb807afeb' => $vendorDir . '/thecodingmachine/safe/generated/spl.php', + '9312ce96a51c846913fcda5f186d58dd' => $vendorDir . '/thecodingmachine/safe/generated/sqlsrv.php', + 'd3eb383ad0b8b962b29dc4afd29d6715' => $vendorDir . '/thecodingmachine/safe/generated/ssdeep.php', + '42a09bc448f441a0b9f9367ea975c0bf' => $vendorDir . '/thecodingmachine/safe/generated/ssh2.php', + '5a2984190663db4a2f4f6bdcdf8b59ea' => $vendorDir . '/thecodingmachine/safe/generated/stats.php', + 'ef711077d356d1b33ca0b10b67b0be8f' => $vendorDir . '/thecodingmachine/safe/generated/stream.php', + '764b09f6df081cbb2807b97c6ace3866' => $vendorDir . '/thecodingmachine/safe/generated/strings.php', + 'ef241678769fee4a44aaa288f3b78aa1' => $vendorDir . '/thecodingmachine/safe/generated/swoole.php', + '0efc8f6778cba932b9e2a89e28de2452' => $vendorDir . '/thecodingmachine/safe/generated/uodbc.php', + 'd383d32907b98af53ee9208c62204fd0' => $vendorDir . '/thecodingmachine/safe/generated/uopz.php', + '2fd2e4060f7fe772660f002ce38f0b71' => $vendorDir . '/thecodingmachine/safe/generated/url.php', + '782249e03deebeaf57b9991ff5493aa0' => $vendorDir . '/thecodingmachine/safe/generated/var.php', + '344440cd1cd7200fdb4f12af0d3c587f' => $vendorDir . '/thecodingmachine/safe/generated/xdiff.php', + '3599f369219c658a5fb6c4fe66832f62' => $vendorDir . '/thecodingmachine/safe/generated/xml.php', + '7fcd313da9fae337051b091b3492c21b' => $vendorDir . '/thecodingmachine/safe/generated/xmlrpc.php', + 'd668c74cfa92d893b582356733d9a80e' => $vendorDir . '/thecodingmachine/safe/generated/yaml.php', + '4af1dca6db8c527c6eed27bff85ff0e5' => $vendorDir . '/thecodingmachine/safe/generated/yaz.php', + 'fe43ca06499ac37bc2dedd823af71eb5' => $vendorDir . '/thecodingmachine/safe/generated/zip.php', + '356736db98a6834f0a886b8d509b0ecd' => $vendorDir . '/thecodingmachine/safe/generated/zlib.php', + '72243e5536b63e298acb6476f01f1aff' => $vendorDir . '/thecodingmachine/safe/lib/special_cases.php', '782b605f6bb82f1cd229995fb6f0c6bf' => $baseDir . '/lib/Constants.php', '7f0f1b28d901698044d9d248797ab78a' => $baseDir . '/lib/CoreFunctions.php', ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 6650d065..c0b28348 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,10 +6,12 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'TheCodingMachine\\Safe\\PHPStan\\' => array($vendorDir . '/thecodingmachine/phpstan-safe-rule/src'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 'Symfony\\Contracts\\' => array($vendorDir . '/symfony/contracts'), 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), + 'Safe\\' => array($vendorDir . '/thecodingmachine/safe/lib', $vendorDir . '/thecodingmachine/safe/generated'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), 'PackageVersions\\' => array($vendorDir . '/ocramius/package-versions/src/PackageVersions'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 55b31a6c..f4b0ebf3 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -9,17 +9,109 @@ class ComposerStaticInit49e401a41abff8a9005dcbd044d35c5f public static $files = array ( 'a12da592622097d2b593a430e32e13fd' => __DIR__ . '/..' . '/nette/utils/src/loader.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + '3f648889e687f31c52f949ba8a9d0873' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/apache.php', + 'eab5d259bc3aff0bc10e38f403600cce' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/apc.php', + 'eeb4581d958421a4244aaa4167c6a575' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/apcu.php', + '04cb0b3c1dac5b5ddb23c14e3d66dbe9' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/array.php', + '450b332a74a9a21e043c5e953485a791' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/bzip2.php', + '2c6d7e8bd2de9a272a9d4d43b0a4304a' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/classobj.php', + '0b8231c1ad0865447c988a4c16b4001f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/com.php', + '7643a71fe1c3256058c8fee234cb86e5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/cubrid.php', + '68e1365710575942efc1d55000032cee' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/curl.php', + '02fd26bca803106c5b942a7197c3ad8b' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/datetime.php', + 'f4817dcbd956cd221b1c31f6fbd5749c' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/dir.php', + '51c3f2d10ca61a70dbcea0e38d8e902d' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/eio.php', + '1d34f34327ca3e81535963016e3be2c3' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/errorfunc.php', + '4fd0ba2d3717b0424d474bebfdafa2b4' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/exec.php', + '98f4dae054bc7fb19c13be14935cbdd3' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/fileinfo.php', + '5530ae063ba88323eaf0a07904efdf85' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/filesystem.php', + '633f4f134975d70e97bddad83348e91a' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/filter.php', + 'fbd163fc68c5faf73d5ed4002ffd836d' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/fpm.php', + '21b511999d61411fab0692ff8795bbed' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ftp.php', + '85fbd73fc92365cd90526b0ea03cae3a' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/funchand.php', + '51df9c146e0b7dcbdf358d8abd24dbdc' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/gmp.php', + '93bb7fe678d7dcfb1322f8e3475a48b0' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/gnupg.php', + 'c171ba99cf316379ff66468392bf4950' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/hash.php', + '5ab4aad4c28e468209fbfcceb2e5e6a5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ibase.php', + '4d57409c5e8e576b0c64c08d9d731cfb' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ibmDb2.php', + 'eeb246d5403972a9d62106e4a4883496' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/iconv.php', + 'c28a05f498c01b810a714f7214b7a8da' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/image.php', + '8063cd92acdf00fd978b5599eb7cc142' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/imap.php', + '8bd26dbe768e9c9599edad7b198e5446' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/info.php', + '0c577fe603b029d4b65c84376b15dbd5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ingres-ii.php', + 'd4362910bde43c0f956b52527effd7d4' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/inotify.php', + '696ba49197d9b55f0428a12bb5a818e1' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/json.php', + '9818aaa99c8647c63f8ef62b7a368160' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ldap.php', + '39d49c88877eb176a0be4e407f3cc95f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/libevent.php', + 'bcf523ff2a195eb08e0fbb668ed784d0' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/libxml.php', + '68be68a9a8b95bb56cab6109ff03bc88' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/lzf.php', + 'bdca804bb0904ea9f53f328dfc0bb8a5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mailparse.php', + 'b0a3fcac3eaf55445796d6af26b89366' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mbstring.php', + '98de16b8db03eb0cb4d318b4402215a6' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/misc.php', + 'c112440003b56e243b192c11fa9d836e' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/msql.php', + 'd12306fdf0bdb146582b277385a2ed7b' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mssql.php', + '7cefd81607cd21b8b3a15656eb6465f5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysql.php', + 'aaf438b080089c6d0686679cd34aa72e' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysqli.php', + 'df0ef890e9afbf95f3924feb1c7a89f3' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysqlndMs.php', + 'db595fee5972867e45c5327010d78735' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/mysqlndQc.php', + 'cbac956836b72483dcff1ac39d5c0a0f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/network.php', + '6c8f89dfbdc117d7871f572269363f25' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/oci8.php', + '169a669966a45c06bf55ed029122729b' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/opcache.php', + 'def61bf4fecd4d4bca7354919cd69302' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/openssl.php', + '26bb010649a6d32d4120181458aa6ef2' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/outcontrol.php', + '1212c201fe43c7492a085b2c71505e0f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/password.php', + '002ebcb842e2c0d5b7f67fe64cc93158' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pcntl.php', + '86df38612982dade72c7085ce7eca81f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pcre.php', + '1cacc3e65f82a473fbd5507c7ce4385d' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pdf.php', + '1fc22f445c69ea8706e82fce301c0831' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pgsql.php', + 'c70b42561584f7144bff38cd63c4eef3' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/posix.php', + '9923214639c32ca5173db03a177d3b63' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ps.php', + '7e9c3f8eae2b5bf42205c4f1295cb7a7' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/pspell.php', + '91aa91f6245c349c2e2e88bd0025f199' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/readline.php', + 'f053a3849e9e8383762b34b91db0320b' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/rrd.php', + '775b964f72f827a1bf87c65ab5b10800' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sem.php', + '816428bd69c29ab5e1ed622af5dca0cd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/session.php', + '5093e233bedbefaef0df262bfbab0a5c' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/shmop.php', + '01352920b0151f17e671266e44b52536' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/simplexml.php', + 'b080617b1d949683c2e37f8f01dc0e15' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sockets.php', + '2708aa182ddcfe6ce27c96acaaa40f69' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sodium.php', + 'f1b96cb260a5baeea9a7285cda82a1ec' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/solr.php', + '3fd8853757d0fe3557c179efb807afeb' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/spl.php', + '9312ce96a51c846913fcda5f186d58dd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/sqlsrv.php', + 'd3eb383ad0b8b962b29dc4afd29d6715' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ssdeep.php', + '42a09bc448f441a0b9f9367ea975c0bf' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/ssh2.php', + '5a2984190663db4a2f4f6bdcdf8b59ea' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/stats.php', + 'ef711077d356d1b33ca0b10b67b0be8f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/stream.php', + '764b09f6df081cbb2807b97c6ace3866' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/strings.php', + 'ef241678769fee4a44aaa288f3b78aa1' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/swoole.php', + '0efc8f6778cba932b9e2a89e28de2452' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/uodbc.php', + 'd383d32907b98af53ee9208c62204fd0' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/uopz.php', + '2fd2e4060f7fe772660f002ce38f0b71' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/url.php', + '782249e03deebeaf57b9991ff5493aa0' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/var.php', + '344440cd1cd7200fdb4f12af0d3c587f' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/xdiff.php', + '3599f369219c658a5fb6c4fe66832f62' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/xml.php', + '7fcd313da9fae337051b091b3492c21b' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/xmlrpc.php', + 'd668c74cfa92d893b582356733d9a80e' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/yaml.php', + '4af1dca6db8c527c6eed27bff85ff0e5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/yaz.php', + 'fe43ca06499ac37bc2dedd823af71eb5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zip.php', + '356736db98a6834f0a886b8d509b0ecd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zlib.php', + '72243e5536b63e298acb6476f01f1aff' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/special_cases.php', '782b605f6bb82f1cd229995fb6f0c6bf' => __DIR__ . '/../..' . '/lib/Constants.php', '7f0f1b28d901698044d9d248797ab78a' => __DIR__ . '/../..' . '/lib/CoreFunctions.php', ); public static $prefixLengthsPsr4 = array ( + 'T' => + array ( + 'TheCodingMachine\\Safe\\PHPStan\\' => 30, + ), 'S' => array ( 'Symfony\\Polyfill\\Mbstring\\' => 26, 'Symfony\\Contracts\\' => 18, 'Symfony\\Component\\Finder\\' => 25, 'Symfony\\Component\\Console\\' => 26, + 'Safe\\' => 5, ), 'P' => array ( @@ -40,6 +132,10 @@ class ComposerStaticInit49e401a41abff8a9005dcbd044d35c5f ); public static $prefixDirsPsr4 = array ( + 'TheCodingMachine\\Safe\\PHPStan\\' => + array ( + 0 => __DIR__ . '/..' . '/thecodingmachine/phpstan-safe-rule/src', + ), 'Symfony\\Polyfill\\Mbstring\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', @@ -56,6 +152,11 @@ class ComposerStaticInit49e401a41abff8a9005dcbd044d35c5f array ( 0 => __DIR__ . '/..' . '/symfony/console', ), + 'Safe\\' => + array ( + 0 => __DIR__ . '/..' . '/thecodingmachine/safe/lib', + 1 => __DIR__ . '/..' . '/thecodingmachine/safe/generated', + ), 'Psr\\Log\\' => array ( 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index e4ea5b86..b514155b 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1121,5 +1121,189 @@ "portable", "shim" ] + }, + { + "name": "thecodingmachine/phpstan-safe-rule", + "version": "v0.1.3", + "version_normalized": "0.1.3.0", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/phpstan-safe-rule.git", + "reference": "00f4845905feb5240ca62fb799e3c51ba85c9230" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/phpstan-safe-rule/zipball/00f4845905feb5240ca62fb799e3c51ba85c9230", + "reference": "00f4845905feb5240ca62fb799e3c51ba85c9230", + "shasum": "" + }, + "require": { + "php": "^7.1", + "phpstan/phpstan": "^0.10 | ^0.11", + "thecodingmachine/safe": "^0.1.11" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^7.5.2", + "squizlabs/php_codesniffer": "^3.4" + }, + "time": "2019-03-07T13:52:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "TheCodingMachine\\Safe\\PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com" + } + ], + "description": "A PHPStan rule to detect safety issues. Must be used in conjunction with thecodingmachine/safe" + }, + { + "name": "thecodingmachine/safe", + "version": "v0.1.14", + "version_normalized": "0.1.14.0", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/safe.git", + "reference": "67b654c7effeda8db27c133e5f0cbb638e90d1e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/67b654c7effeda8db27c133e5f0cbb638e90d1e4", + "reference": "67b654c7effeda8db27c133e5f0cbb638e90d1e4", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "^0.10.3", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" + }, + "time": "2019-03-07T11:09:21+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Safe\\": [ + "lib/", + "generated/" + ] + }, + "files": [ + "generated/apache.php", + "generated/apc.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/ingres-ii.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libevent.php", + "generated/libxml.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/msql.php", + "generated/mssql.php", + "generated/mysql.php", + "generated/mysqli.php", + "generated/mysqlndMs.php", + "generated/mysqlndQc.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/password.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pdf.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/simplexml.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stats.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php", + "lib/special_cases.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP core functions that throw exceptions instead of returning FALSE on error" } ] diff --git a/vendor/ocramius/package-versions/src/PackageVersions/Versions.php b/vendor/ocramius/package-versions/src/PackageVersions/Versions.php index f3d3af92..00a5219e 100644 --- a/vendor/ocramius/package-versions/src/PackageVersions/Versions.php +++ b/vendor/ocramius/package-versions/src/PackageVersions/Versions.php @@ -14,6 +14,7 @@ final class Versions { public const ROOT_PACKAGE_NAME = '__root__'; public const VERSIONS = array ( + 'thecodingmachine/safe' => 'v0.1.14@67b654c7effeda8db27c133e5f0cbb638e90d1e4', 'composer/xdebug-handler' => '1.3.2@d17708133b6c276d6e42ef887a877866b909d892', 'jean85/pretty-package-versions' => '1.2@75c7effcf3f77501d0e0caa75111aff4daa0dd48', 'nette/bootstrap' => 'v2.4.6@268816e3f1bb7426c3a4ceec2bd38a036b532543', @@ -32,7 +33,8 @@ final class Versions 'symfony/contracts' => 'v1.0.2@1aa7ab2429c3d594dd70689604b5cf7421254cdf', 'symfony/finder' => 'v4.2.3@ef71816cbb264988bb57fe6a73f610888b9aa70c', 'symfony/polyfill-mbstring' => 'v1.10.0@c79c051f5b3a46be09205c73b80b346e4153e494', - '__root__' => 'dev-master@e198c4db65320cce173bdde14ef08da5beb5d6d8', + 'thecodingmachine/phpstan-safe-rule' => 'v0.1.3@00f4845905feb5240ca62fb799e3c51ba85c9230', + '__root__' => 'dev-master@04a956886ab327ddbe5eec546b911b9e55a0e5ef', ); private function __construct() diff --git a/vendor/thecodingmachine/phpstan-safe-rule/.travis.yml b/vendor/thecodingmachine/phpstan-safe-rule/.travis.yml new file mode 100644 index 00000000..77f20caa --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/.travis.yml @@ -0,0 +1,32 @@ +language: php +sudo: false +php: + - 7.1 + - 7.2 + - 7.3 +env: + global: + # We need to prefer source to get PHPStan test directory. Otherwise, it is removed from ZIP + - DEFAULT_COMPOSER_FLAGS="--no-interaction --no-progress --optimize-autoloader --prefer-source" + - TASK_TESTS=1 + - TASK_TESTS_COVERAGE=0 + - TASK_CS=1 + - TASK_SCA=0 + matrix: + - COMPOSER_FLAGS="--prefer-lowest" + - COMPOSER_FLAGS="" +cache: + directories: + - "$HOME/.composer/cache" +before_install: +- travis_retry composer global require $DEFAULT_COMPOSER_FLAGS hirak/prestissimo +install: +- travis_retry composer update $DEFAULT_COMPOSER_FLAGS $COMPOSER_FLAGS +- composer info -D | sort +- mkdir tmp +script: +- vendor/bin/phpunit --verbose; +- composer phpstan +- composer cs-check +after_success: +- vendor/bin/coveralls -v diff --git a/vendor/thecodingmachine/phpstan-safe-rule/README.md b/vendor/thecodingmachine/phpstan-safe-rule/README.md new file mode 100644 index 00000000..f6f90b50 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/README.md @@ -0,0 +1,16 @@ +[![Latest Stable Version](https://poser.pugx.org/thecodingmachine/phpstan-safe-rule/v/stable)](https://packagist.org/packages/thecodingmachine/phpstan-safe-rule) +[![Total Downloads](https://poser.pugx.org/thecodingmachine/phpstan-safe-rule/downloads)](https://packagist.org/packages/thecodingmachine/phpstan-safe-rule) +[![Latest Unstable Version](https://poser.pugx.org/thecodingmachine/phpstan-safe-rule/v/unstable)](https://packagist.org/packages/thecodingmachine/phpstan-safe-rule) +[![License](https://poser.pugx.org/thecodingmachine/phpstan-safe-rule/license)](https://packagist.org/packages/thecodingmachine/phpstan-safe-rule) +[![Build Status](https://travis-ci.org/thecodingmachine/phpstan-safe-rule.svg?branch=master)](https://travis-ci.org/thecodingmachine/phpstan-safe-rule) +[![Coverage Status](https://coveralls.io/repos/thecodingmachine/phpstan-safe-rule/badge.svg?branch=master&service=github)](https://coveralls.io/github/thecodingmachine/phpstan-safe-rule?branch=master) + + +PHPStan rules for thecodingmachine/safe +======================================= + +The [thecodingmachine/safe](https://github.com/thecodingmachine/safe) package provides a set of core PHP functions rewritten to throw exceptions instead of returning `false` when an error is encountered. + +This PHPStan rule will help you detect unsafe function call and will propose you to use the `thecodingmachine/safe` variant instead. + +Please read [thecodingmachine/safe documentation](https://github.com/thecodingmachine/safe) for details about installation and usage. diff --git a/vendor/thecodingmachine/phpstan-safe-rule/composer.json b/vendor/thecodingmachine/phpstan-safe-rule/composer.json new file mode 100644 index 00000000..03525971 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/composer.json @@ -0,0 +1,44 @@ +{ + "name": "thecodingmachine/phpstan-safe-rule", + "description": "A PHPStan rule to detect safety issues. Must be used in conjunction with thecodingmachine/safe", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com" + } + ], + "require": { + "php": "^7.1", + "phpstan/phpstan": "^0.10 | ^0.11", + "thecodingmachine/safe": "^0.1.11" + }, + "require-dev": { + "phpunit/phpunit": "^7.5.2", + "php-coveralls/php-coveralls": "^2.1", + "squizlabs/php_codesniffer": "^3.4" + }, + "autoload": { + "psr-4": { + "TheCodingMachine\\Safe\\PHPStan\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "TheCodingMachine\\Safe\\PHPStan\\": "tests/" + } + }, + "scripts": { + "phpstan": "phpstan analyse src -c phpstan.neon --level=7 --no-progress -vvv", + "cs-fix": "phpcbf", + "cs-check": "phpcs" + }, + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/vendor/thecodingmachine/phpstan-safe-rule/phpcs.xml.dist b/vendor/thecodingmachine/phpstan-safe-rule/phpcs.xml.dist new file mode 100644 index 00000000..480486b4 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/phpcs.xml.dist @@ -0,0 +1,21 @@ + + + Expressive Skeleton coding standard + + + + + + + + + + src + + + + + + + + \ No newline at end of file diff --git a/vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon b/vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon new file mode 100644 index 00000000..34b03468 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon @@ -0,0 +1,9 @@ +services: + - + class: TheCodingMachine\Safe\PHPStan\Rules\UseSafeFunctionsRule + tags: + - phpstan.rules.rule + - + class: TheCodingMachine\Safe\PHPStan\Type\Php\ReplaceSafeFunctionsDynamicReturnTypeExtension + tags: + - phpstan.broker.dynamicFunctionReturnTypeExtension diff --git a/vendor/thecodingmachine/phpstan-safe-rule/phpstan.neon b/vendor/thecodingmachine/phpstan-safe-rule/phpstan.neon new file mode 100644 index 00000000..3a54d928 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/phpstan.neon @@ -0,0 +1,4 @@ +parameters: + ignoreErrors: +includes: + - phpstan-safe-rule.neon diff --git a/vendor/thecodingmachine/phpstan-safe-rule/phpunit.xml.dist b/vendor/thecodingmachine/phpstan-safe-rule/phpunit.xml.dist new file mode 100644 index 00000000..245ec378 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/phpunit.xml.dist @@ -0,0 +1,36 @@ + + + + ./tests/ + + + + + ./src + + + + + + + + diff --git a/vendor/thecodingmachine/phpstan-safe-rule/src/Rules/UseSafeFunctionsRule.php b/vendor/thecodingmachine/phpstan-safe-rule/src/Rules/UseSafeFunctionsRule.php new file mode 100644 index 00000000..00317e01 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/src/Rules/UseSafeFunctionsRule.php @@ -0,0 +1,43 @@ +name instanceof Node\Name) { + return []; + } + $functionName = $node->name->toString(); + $unsafeFunctions = FunctionListLoader::getFunctionList(); + + if (isset($unsafeFunctions[$functionName])) { + return ["Function $functionName is unsafe to use. It can return FALSE instead of throwing an exception. Please add 'use function Safe\\$functionName;' at the beginning of the file to use the variant provided by the 'thecodingmachine/safe' library."]; + } + + return []; + } +} diff --git a/vendor/thecodingmachine/phpstan-safe-rule/src/Type/Php/ReplaceSafeFunctionsDynamicReturnTypeExtension.php b/vendor/thecodingmachine/phpstan-safe-rule/src/Type/Php/ReplaceSafeFunctionsDynamicReturnTypeExtension.php new file mode 100644 index 00000000..529b1570 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/src/Type/Php/ReplaceSafeFunctionsDynamicReturnTypeExtension.php @@ -0,0 +1,79 @@ + */ + private $functions = [ + 'Safe\preg_replace' => 2, + ]; + + public function isFunctionSupported(FunctionReflection $functionReflection): bool + { + return array_key_exists($functionReflection->getName(), $this->functions); + } + + public function getTypeFromFunctionCall( + FunctionReflection $functionReflection, + FuncCall $functionCall, + Scope $scope + ): Type { + $type = $this->getPreliminarilyResolvedTypeFromFunctionCall($functionReflection, $functionCall, $scope); + + $possibleTypes = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType(); + + if (TypeCombinator::containsNull($possibleTypes)) { + $type = TypeCombinator::addNull($type); + } + + return $type; + } + + private function getPreliminarilyResolvedTypeFromFunctionCall( + FunctionReflection $functionReflection, + FuncCall $functionCall, + Scope $scope + ): Type { + $argumentPosition = $this->functions[$functionReflection->getName()]; + if (count($functionCall->args) <= $argumentPosition) { + return ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType(); + } + + $subjectArgumentType = $scope->getType($functionCall->args[$argumentPosition]->value); + $defaultReturnType = ParametersAcceptorSelector::selectSingle($functionReflection->getVariants())->getReturnType(); + if ($subjectArgumentType instanceof MixedType) { + return TypeUtils::toBenevolentUnion($defaultReturnType); + } + $stringType = new StringType(); + $arrayType = new ArrayType(new MixedType(), new MixedType()); + + $isStringSuperType = $stringType->isSuperTypeOf($subjectArgumentType); + $isArraySuperType = $arrayType->isSuperTypeOf($subjectArgumentType); + $compareSuperTypes = $isStringSuperType->compareTo($isArraySuperType); + if ($compareSuperTypes === $isStringSuperType) { + return $stringType; + } elseif ($compareSuperTypes === $isArraySuperType) { + if ($subjectArgumentType instanceof ArrayType) { + return $subjectArgumentType->generalizeValues(); + } + return $subjectArgumentType; + } + + return $defaultReturnType; + } +} diff --git a/vendor/thecodingmachine/phpstan-safe-rule/src/Utils/FunctionListLoader.php b/vendor/thecodingmachine/phpstan-safe-rule/src/Utils/FunctionListLoader.php new file mode 100644 index 00000000..a9c6a41e --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/src/Utils/FunctionListLoader.php @@ -0,0 +1,32 @@ +createBroker(); + $ruleLevelHelper = new RuleLevelHelper($broker, true, true, true); + return new CallMethodsRule( + $broker, + new FunctionCallParametersCheck($ruleLevelHelper, true, true), + $ruleLevelHelper, + true, + true + ); + } + + public function testSafePregReplace() + { + // FIXME: this rule actually runs code but will always return no error because the rule executed is not the correct one. + // This provides code coverage but assert is not ok. + $this->analyse([__DIR__ . '/data/safe_pregreplace.php'], []); + } + + + /** + * @return \PHPStan\Type\DynamicFunctionReturnTypeExtension[] + */ + public function getDynamicFunctionReturnTypeExtensions(): array + { + return [new ReplaceSafeFunctionsDynamicReturnTypeExtension()]; + } +} diff --git a/vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/UseSafeFunctionsRuleTest.php b/vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/UseSafeFunctionsRuleTest.php new file mode 100644 index 00000000..4353dfa5 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/UseSafeFunctionsRuleTest.php @@ -0,0 +1,34 @@ +analyse([__DIR__ . '/data/fopen.php'], [ + [ + "Function fopen is unsafe to use. It can return FALSE instead of throwing an exception. Please add 'use function Safe\\fopen;' at the beginning of the file to use the variant provided by the 'thecodingmachine/safe' library.", + 4, + ], + ]); + } + + public function testNoCatchSafe() + { + $this->analyse([__DIR__ . '/data/safe_fopen.php'], []); + } + + public function testExprCall() + { + $this->analyse([__DIR__ . '/data/undirect_call.php'], []); + } +} diff --git a/vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/fopen.php b/vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/fopen.php new file mode 100644 index 00000000..fcf5e8fd --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/tests/Rules/data/fopen.php @@ -0,0 +1,5 @@ +assertArrayHasKey('fopen', $functions); + } +} diff --git a/vendor/thecodingmachine/phpstan-safe-rule/tests/bootstrap.php b/vendor/thecodingmachine/phpstan-safe-rule/tests/bootstrap.php new file mode 100644 index 00000000..ea602221 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/tests/bootstrap.php @@ -0,0 +1,33 @@ +defaultExtensions = []; +$configurator->setDebugMode(true); +$configurator->setTempDirectory($tmpDir); +$configurator->addConfig($confDir . '/config.neon'); +$configurator->addConfig($confDir . '/config.level5.neon'); +$configurator->addParameters([ + 'rootDir' => $rootDir, + 'tmpDir' => $tmpDir, + 'currentWorkingDirectory' => $rootDir, + 'cliArgumentsVariablesRegistered' => false, +]); +$container = $configurator->createContainer(); + +PHPStan\Testing\TestCase::setContainer($container); +PHPStan\Type\TypeCombinator::setUnionTypesEnabled(true); +require_once __DIR__ . '/phpstan-bootstrap.php'; +*/ diff --git a/vendor/thecodingmachine/phpstan-safe-rule/tests/phpstan-bootstrap.php b/vendor/thecodingmachine/phpstan-safe-rule/tests/phpstan-bootstrap.php new file mode 100644 index 00000000..c39b13a0 --- /dev/null +++ b/vendor/thecodingmachine/phpstan-safe-rule/tests/phpstan-bootstrap.php @@ -0,0 +1,4 @@ + Yeah... but I must explicitly think about importing the "safe" variant of the function, for each and every file of my application. +> I'm sure I will forget some "use function" statements! + +Fear not! thecodingmachine/safe comes with a PHPStan rule. + +Never heard of [PHPStan](https://github.com/phpstan/phpstan) before? +Check it out, it's an amazing code analyzer for PHP. + +Simply install the Safe rule in your PHPStan setup (explained in the "Installation" section) and PHPStan will let you know each time you are using an "unsafe" function. + +The code below will trigger this warning: + +```php +$content = file_get_contents('foobar.json'); +``` + +> Function file_get_contents is unsafe to use. It can return FALSE instead of throwing an exception. Please add 'use function Safe\\file_get_contents;' at the beginning of the file to use the variant provided by the 'thecodingmachine/safe' library. + +## Installation + +Use composer to install Safe-PHP: + +```bash +$ composer require thecodingmachine/safe +``` + +*Highly recommended*: install PHPStan and PHPStan extension: + +```bash +$ composer require --dev thecodingmachine/phpstan-safe-rule +``` + +Now, edit your `phpstan.neon` file and add these rules: + +```yml +includes: + - vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon +``` + +## Automated refactoring + +You have a large legacy codebase and want to use "Safe-PHP" functions throughout your project? PHPStan will help you +find these functions but changing the namespace of the functions one function at a time might be a tedious task. + +Fortunately, Safe comes bundled with a "Rector" configuration file. [Rector](https://github.com/rectorphp/rector) is a command-line +tool that performs instant refactoring of your application. + +First, you need to install Rector: + +```bash +$ composer require --dev rector/rector ^0.3 +``` + +Now, you simply need to run Rector with this command: + +```bash +vendor/bin/rector process src/ --config vendor/thecodingmachine/safe/rector-migrate.yml +``` + +*Note:* do not forget to replace "src/" with the path to your source directory. + +**Important:** the refactoring only performs a "dumb" replacement of functions. It will not modify the way +"false" return values are handled. So if your code was already performing error handling, you will have to deal +with it manually. + +Especially, you should look for error handling that was already performed, like: + +```php +if (!mkdir($dirPath)) { + // Do something on error +} +``` + +This code will be refactored by Rector to: + +```php +if (!\Safe\mkdir($dirPath)) { + // Do something on error +} +``` + +You should then (manually) refactor it to: + +```php +try { + \Safe\mkdir($dirPath)); +} catch (\Safe\FilesystemException $e) { + // Do something on error +} +``` + +## Performance impact + +Safe is loading 1000+ functions from ~85 files on each request. Yet, the performance impact of this loading is quite low. + +In case you worry, using Safe will "cost" you ~700µs on each request. The [performance section](performance/README.md) +contains more information regarding the way we tested the performance impact of Safe. + +## Work in progress + +There are a number of pending issues [before releasing 1.0](https://github.com/thecodingmachine/safe/milestone/1) + +## Learn more + +Read [the release article on TheCodingMachine's blog](https://thecodingmachine.io/introducing-safe-php) if you want to +learn more about what triggered the development of Safe-PHP. + +## Contributing + +The files that contain all the functions are auto-generated from the PHP doc. +Read the [CONTRIBUTING.md](CONTRIBUTING.md) file to learn how to regenerate these files and to contribute to this library. diff --git a/vendor/thecodingmachine/safe/composer.json b/vendor/thecodingmachine/safe/composer.json new file mode 100644 index 00000000..506a2583 --- /dev/null +++ b/vendor/thecodingmachine/safe/composer.json @@ -0,0 +1,120 @@ +{ + "name": "thecodingmachine/safe", + "description": "PHP core functions that throw exceptions instead of returning FALSE on error", + "license": "MIT", + "autoload": { + "psr-4": { + "Safe\\": [ + "lib/", + "generated/" + ] + }, + "files": [ + "generated/apache.php", + "generated/apc.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/ingres-ii.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libevent.php", + "generated/libxml.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/msql.php", + "generated/mssql.php", + "generated/mysql.php", + "generated/mysqli.php", + "generated/mysqlndMs.php", + "generated/mysqlndQc.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/password.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pdf.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/simplexml.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stats.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php", + "lib/special_cases.php" + ] + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "^0.10.3", + "thecodingmachine/phpstan-strict-rules": "^0.10.3", + "squizlabs/php_codesniffer": "^3.2" + }, + "scripts": { + "phpstan": "phpstan analyse lib -c phpstan.neon --level=7 --no-progress -vvv", + "cs-fix": "phpcbf", + "cs-check": "phpcs" + }, + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + } +} \ No newline at end of file diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/.gitkeep b/vendor/thecodingmachine/safe/generated/Exceptions/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/thecodingmachine/safe/generated/Exceptions/ApacheException.php b/vendor/thecodingmachine/safe/generated/Exceptions/ApacheException.php new file mode 100644 index 00000000..aedca197 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/Exceptions/ApacheException.php @@ -0,0 +1,6 @@ + + * + * + * + * The mode parameter consists of three octal + * number components specifying access restrictions for the owner, + * the user group in which the owner is in, and to everybody else in + * this order. One component can be computed by adding up the needed + * permissions for that target user base. Number 1 means that you + * grant execute rights, number 2 means that you make the file + * writeable, number 4 means that you make the file readable. Add + * up these numbers to specify needed rights. You can also read more + * about modes on Unix systems with 'man 1 chmod' + * and 'man 2 chmod'. + * + * + * + * + */ +function chmod(string $filename, int $mode): void +{ + error_clear_last(); + $result = \chmod($filename, $mode); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Attempts to change the owner of the file filename + * to user user. Only the superuser may change the + * owner of a file. + * + * @param string $filename Path to the file. + * @param string|int $user A user name or number. + * @throws FilesystemException + * + */ +function chown(string $filename, $user): void +{ + error_clear_last(); + $result = \chown($filename, $user); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Makes a copy of the file source to + * dest. + * + * If you wish to move a file, use the rename function. + * + * @param string $source Path to the source file. + * @param string $dest The destination path. If dest is a URL, the + * copy operation may fail if the wrapper does not support overwriting of + * existing files. + * + * If the destination file already exists, it will be overwritten. + * @param resource $context A valid context resource created with + * stream_context_create. + * @throws FilesystemException + * + */ +function copy(string $source, string $dest, $context = null): void +{ + error_clear_last(); + if ($context !== null) { + $result = \copy($source, $dest, $context); + } else { + $result = \copy($source, $dest); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Given a string containing a directory, this function will return the + * number of bytes available on the corresponding filesystem or disk + * partition. + * + * @param string $directory A directory of the filesystem or disk partition. + * + * Given a file name instead of a directory, the behaviour of the + * function is unspecified and may differ between operating systems and + * PHP versions. + * @return float Returns the number of available bytes as a float. + * @throws FilesystemException + * + */ +function disk_free_space(string $directory): float +{ + error_clear_last(); + $result = \disk_free_space($directory); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Given a string containing a directory, this function will return the total + * number of bytes on the corresponding filesystem or disk partition. + * + * @param string $directory A directory of the filesystem or disk partition. + * @return float Returns the total number of bytes as a float. + * @throws FilesystemException + * + */ +function disk_total_space(string $directory): float +{ + error_clear_last(); + $result = \disk_total_space($directory); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * The file pointed to by handle is closed. + * + * @param resource $handle The file pointer must be valid, and must point to a file successfully + * opened by fopen or fsockopen. + * @throws FilesystemException + * + */ +function fclose($handle): void +{ + error_clear_last(); + $result = \fclose($handle); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * This function forces a write of all buffered output to the resource + * pointed to by the file handle. + * + * @param resource $handle The file pointer must be valid, and must point to + * a file successfully opened by fopen or + * fsockopen (and not yet closed by + * fclose). + * @throws FilesystemException + * + */ +function fflush($handle): void +{ + error_clear_last(); + $result = \fflush($handle); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * This function is similar to file, except that + * file_get_contents returns the file in a + * string, starting at the specified offset + * up to maxlen bytes. On failure, + * file_get_contents will return FALSE. + * + * file_get_contents is the preferred way to read the + * contents of a file into a string. It will use memory mapping techniques if + * supported by your OS to enhance performance. + * + * @param string $filename Name of the file to read. + * @param bool $use_include_path As of PHP 5 the FILE_USE_INCLUDE_PATH constant can be used + * to trigger include path + * search. + * This is not possible if strict typing + * is enabled, since FILE_USE_INCLUDE_PATH is an + * int. Use TRUE instead. + * @param resource|null $context A valid context resource created with + * stream_context_create. If you don't need to use a + * custom context, you can skip this parameter by NULL. + * @param int $offset The offset where the reading starts on the original stream. + * Negative offsets count from the end of the stream. + * + * Seeking (offset) is not supported with remote files. + * Attempting to seek on non-local files may work with small offsets, but this + * is unpredictable because it works on the buffered stream. + * @param int $maxlen Maximum length of data read. The default is to read until end + * of file is reached. Note that this parameter is applied to the + * stream processed by the filters. + * @return string The function returns the read data. + * @throws FilesystemException + * + */ +function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, int $maxlen = null): string +{ + error_clear_last(); + if ($maxlen !== null) { + $result = \file_get_contents($filename, $use_include_path, $context, $offset, $maxlen); + } elseif ($offset !== 0) { + $result = \file_get_contents($filename, $use_include_path, $context, $offset); + } elseif ($context !== null) { + $result = \file_get_contents($filename, $use_include_path, $context); + } else { + $result = \file_get_contents($filename, $use_include_path); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * This function is identical to calling fopen, + * fwrite and fclose successively + * to write data to a file. + * + * If filename does not exist, the file is created. + * Otherwise, the existing file is overwritten, unless the + * FILE_APPEND flag is set. + * + * @param string $filename Path to the file where to write the data. + * @param mixed $data The data to write. Can be either a string, an + * array or a stream resource. + * + * If data is a stream resource, the + * remaining buffer of that stream will be copied to the specified file. + * This is similar with using stream_copy_to_stream. + * + * You can also specify the data parameter as a single + * dimension array. This is equivalent to + * file_put_contents($filename, implode('', $array)). + * @param int $flags The value of flags can be any combination of + * the following flags, joined with the binary OR (|) + * operator. + * + * + * Available flags + * + * + * + * Flag + * Description + * + * + * + * + * + * FILE_USE_INCLUDE_PATH + * + * + * Search for filename in the include directory. + * See include_path for more + * information. + * + * + * + * + * FILE_APPEND + * + * + * If file filename already exists, append + * the data to the file instead of overwriting it. + * + * + * + * + * LOCK_EX + * + * + * Acquire an exclusive lock on the file while proceeding to the + * writing. In other words, a flock call happens + * between the fopen call and the + * fwrite call. This is not identical to an + * fopen call with mode "x". + * + * + * + * + * + * @param resource $context A valid context resource created with + * stream_context_create. + * @return int This function returns the number of bytes that were written to the file. + * @throws FilesystemException + * + */ +function file_put_contents(string $filename, $data, int $flags = 0, $context = null): int +{ + error_clear_last(); + if ($context !== null) { + $result = \file_put_contents($filename, $data, $flags, $context); + } else { + $result = \file_put_contents($filename, $data, $flags); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * + * + * @param string $filename Path to the file. + * @return int Returns the time the file was last accessed. + * The time is returned as a Unix timestamp. + * @throws FilesystemException + * + */ +function fileatime(string $filename): int +{ + error_clear_last(); + $result = \fileatime($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the inode change time of a file. + * + * @param string $filename Path to the file. + * @return int Returns the time the file was last changed. + * The time is returned as a Unix timestamp. + * @throws FilesystemException + * + */ +function filectime(string $filename): int +{ + error_clear_last(); + $result = \filectime($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the file inode. + * + * @param string $filename Path to the file. + * @return int Returns the inode number of the file. + * @throws FilesystemException + * + */ +function fileinode(string $filename): int +{ + error_clear_last(); + $result = \fileinode($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * This function returns the time when the data blocks of a file were being + * written to, that is, the time when the content of the file was changed. + * + * @param string $filename Path to the file. + * @return int Returns the time the file was last modified. + * The time is returned as a Unix timestamp, which is + * suitable for the date function. + * @throws FilesystemException + * + */ +function filemtime(string $filename): int +{ + error_clear_last(); + $result = \filemtime($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the file owner. + * + * @param string $filename Path to the file. + * @return int Returns the user ID of the owner of the file. + * The user ID is returned in numerical format, use + * posix_getpwuid to resolve it to a username. + * @throws FilesystemException + * + */ +function fileowner(string $filename): int +{ + error_clear_last(); + $result = \fileowner($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the size for the given file. + * + * @param string $filename Path to the file. + * @return int Returns the size of the file in bytes, or FALSE (and generates an error + * of level E_WARNING) in case of an error. + * @throws FilesystemException + * + */ +function filesize(string $filename): int +{ + error_clear_last(); + $result = \filesize($filename); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * flock allows you to perform a simple reader/writer + * model which can be used on virtually every platform (including most Unix + * derivatives and even Windows). + * + * On versions of PHP before 5.3.2, the lock is released also by + * fclose (which is also called automatically when script + * finished). + * + * PHP supports a portable way of locking complete files in an advisory way + * (which means all accessing programs have to use the same way of locking + * or it will not work). By default, this function will block until the + * requested lock is acquired; this may be controlled with the LOCK_NB option documented below. + * + * @param resource $handle A file system pointer resource + * that is typically created using fopen. + * @param int $operation operation is one of the following: + * + * + * + * LOCK_SH to acquire a shared lock (reader). + * + * + * + * + * LOCK_EX to acquire an exclusive lock (writer). + * + * + * + * + * LOCK_UN to release a lock (shared or exclusive). + * + * + * + * + * It is also possible to add LOCK_NB as a bitmask to one + * of the above operations if you don't want flock to + * block while locking. + * @param int $wouldblock The optional third argument is set to 1 if the lock would block + * (EWOULDBLOCK errno condition). + * @throws FilesystemException + * + */ +function flock($handle, int $operation, ?int &$wouldblock = null): void +{ + error_clear_last(); + $result = \flock($handle, $operation, $wouldblock); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * fopen binds a named resource, specified by + * filename, to a stream. + * + * @param string $filename If filename is of the form "scheme://...", it + * is assumed to be a URL and PHP will search for a protocol handler + * (also known as a wrapper) for that scheme. If no wrappers for that + * protocol are registered, PHP will emit a notice to help you track + * potential problems in your script and then continue as though + * filename specifies a regular file. + * + * If PHP has decided that filename specifies + * a local file, then it will try to open a stream on that file. + * The file must be accessible to PHP, so you need to ensure that + * the file access permissions allow this access. + * If you have enabled safe mode + * or open_basedir further + * restrictions may apply. + * + * If PHP has decided that filename specifies + * a registered protocol, and that protocol is registered as a + * network URL, PHP will check to make sure that + * allow_url_fopen is + * enabled. If it is switched off, PHP will emit a warning and + * the fopen call will fail. + * + * The list of supported protocols can be found in . Some protocols (also referred to as + * wrappers) support context + * and/or php.ini options. Refer to the specific page for the + * protocol in use for a list of options which can be set. (e.g. + * php.ini value user_agent used by the + * http wrapper). + * + * On the Windows platform, be careful to escape any backslashes + * used in the path to the file, or use forward slashes. + * + * + * + * ]]> + * + * + * @param string $mode The mode parameter specifies the type of access + * you require to the stream. It may be any of the following: + * + * + * A list of possible modes for fopen + * using mode + * + * + * + * + * mode + * Description + * + * + * + * + * 'r' + * + * Open for reading only; place the file pointer at the + * beginning of the file. + * + * + * + * 'r+' + * + * Open for reading and writing; place the file pointer at + * the beginning of the file. + * + * + * + * 'w' + * + * Open for writing only; place the file pointer at the + * beginning of the file and truncate the file to zero length. + * If the file does not exist, attempt to create it. + * + * + * + * 'w+' + * + * Open for reading and writing; place the file pointer at + * the beginning of the file and truncate the file to zero + * length. If the file does not exist, attempt to create it. + * + * + * + * 'a' + * + * Open for writing only; place the file pointer at the end of + * the file. If the file does not exist, attempt to create it. + * In this mode, fseek has no effect, writes are always appended. + * + * + * + * 'a+' + * + * Open for reading and writing; place the file pointer at + * the end of the file. If the file does not exist, attempt to + * create it. In this mode, fseek only affects + * the reading position, writes are always appended. + * + * + * + * 'x' + * + * Create and open for writing only; place the file pointer at the + * beginning of the file. If the file already exists, the + * fopen call will fail by returning FALSE and + * generating an error of level E_WARNING. If + * the file does not exist, attempt to create it. This is equivalent + * to specifying O_EXCL|O_CREAT flags for the + * underlying open(2) system call. + * + * + * + * 'x+' + * + * Create and open for reading and writing; otherwise it has the + * same behavior as 'x'. + * + * + * + * 'c' + * + * Open the file for writing only. If the file does not exist, it is + * created. If it exists, it is neither truncated (as opposed to + * 'w'), nor the call to this function fails (as is + * the case with 'x'). The file pointer is + * positioned on the beginning of the file. This may be useful if it's + * desired to get an advisory lock (see flock) + * before attempting to modify the file, as using + * 'w' could truncate the file before the lock + * was obtained (if truncation is desired, + * ftruncate can be used after the lock is + * requested). + * + * + * + * 'c+' + * + * Open the file for reading and writing; otherwise it has the same + * behavior as 'c'. + * + * + * + * 'e' + * + * Set close-on-exec flag on the opened file descriptor. Only + * available in PHP compiled on POSIX.1-2008 conform systems. + * + * + * + * + * + * + * Different operating system families have different line-ending + * conventions. When you write a text file and want to insert a line + * break, you need to use the correct line-ending character(s) for your + * operating system. Unix based systems use \n as the + * line ending character, Windows based systems use \r\n + * as the line ending characters and Macintosh based systems use + * \r as the line ending character. + * + * If you use the wrong line ending characters when writing your files, you + * might find that other applications that open those files will "look + * funny". + * + * Windows offers a text-mode translation flag ('t') + * which will transparently translate \n to + * \r\n when working with the file. In contrast, you + * can also use 'b' to force binary mode, which will not + * translate your data. To use these flags, specify either + * 'b' or 't' as the last character + * of the mode parameter. + * + * The default translation mode depends on the SAPI and version of PHP that + * you are using, so you are encouraged to always specify the appropriate + * flag for portability reasons. You should use the 't' + * mode if you are working with plain-text files and you use + * \n to delimit your line endings in your script, but + * expect your files to be readable with applications such as notepad. You + * should use the 'b' in all other cases. + * + * If you do not specify the 'b' flag when working with binary files, you + * may experience strange problems with your data, including broken image + * files and strange problems with \r\n characters. + * + * For portability, it is strongly recommended that you always + * use the 'b' flag when opening files with fopen. + * + * Again, for portability, it is also strongly recommended that + * you re-write code that uses or relies upon the 't' + * mode so that it uses the correct line endings and + * 'b' mode instead. + * @param bool $use_include_path The optional third use_include_path parameter + * can be set to '1' or TRUE if you want to search for the file in the + * include_path, too. + * @param resource $context + * @return resource Returns a file pointer resource on success. + * @throws FilesystemException + * + */ +function fopen(string $filename, string $mode, bool $use_include_path = false, $context = null) +{ + error_clear_last(); + if ($context !== null) { + $result = \fopen($filename, $mode, $use_include_path, $context); + } else { + $result = \fopen($filename, $mode, $use_include_path); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * fputcsv formats a line (passed as a + * fields array) as CSV and write it (terminated by a + * newline) to the specified file handle. + * + * @param resource $handle The file pointer must be valid, and must point to + * a file successfully opened by fopen or + * fsockopen (and not yet closed by + * fclose). + * @param array $fields An array of strings. + * @param string $delimiter The optional delimiter parameter sets the field + * delimiter (one character only). + * @param string $enclosure The optional enclosure parameter sets the field + * enclosure (one character only). + * @param string $escape_char The optional escape_char parameter sets the + * escape character (at most one character). + * An empty string ("") disables the proprietary escape mechanism. + * @return int Returns the length of the written string. + * @throws FilesystemException + * + */ +function fputcsv($handle, array $fields, string $delimiter = ",", string $enclosure = '"', string $escape_char = "\\"): int +{ + error_clear_last(); + $result = \fputcsv($handle, $fields, $delimiter, $enclosure, $escape_char); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * fread reads up to + * length bytes from the file pointer + * referenced by handle. Reading stops as soon as one + * of the following conditions is met: + * + * + * + * length bytes have been read + * + * + * + * + * EOF (end of file) is reached + * + * + * + * + * a packet becomes available or the + * socket timeout occurs (for network streams) + * + * + * + * + * if the stream is read buffered and it does not represent a plain file, at + * most one read of up to a number of bytes equal to the chunk size (usually + * 8192) is made; depending on the previously buffered data, the size of the + * returned data may be larger than the chunk size. + * + * + * + * + * @param resource $handle A file system pointer resource + * that is typically created using fopen. + * @param int $length Up to length number of bytes read. + * @return string Returns the read string. + * @throws FilesystemException + * + */ +function fread($handle, int $length): string +{ + error_clear_last(); + $result = \fread($handle, $length); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Takes the filepointer, handle, and truncates the file to + * length, size. + * + * @param resource $handle The file pointer. + * + * The handle must be open for writing. + * @param int $size The size to truncate to. + * + * If size is larger than the file then the file + * is extended with null bytes. + * + * If size is smaller than the file then the file + * is truncated to that size. + * @throws FilesystemException + * + */ +function ftruncate($handle, int $size): void +{ + error_clear_last(); + $result = \ftruncate($handle, $size); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $handle A file system pointer resource + * that is typically created using fopen. + * @param string $string The string that is to be written. + * @param int $length If the length argument is given, writing will + * stop after length bytes have been written or + * the end of string is reached, whichever comes + * first. + * + * Note that if the length argument is given, + * then the magic_quotes_runtime + * configuration option will be ignored and no slashes will be + * stripped from string. + * @return int + * @throws FilesystemException + * + */ +function fwrite($handle, string $string, int $length = null): int +{ + error_clear_last(); + if ($length !== null) { + $result = \fwrite($handle, $string, $length); + } else { + $result = \fwrite($handle, $string); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * The glob function searches for all the pathnames + * matching pattern according to the rules used by + * the libc glob() function, which is similar to the rules used by common + * shells. + * + * @param string $pattern The pattern. No tilde expansion or parameter substitution is done. + * @param int $flags Valid flags: + * + * + * + * GLOB_MARK - Adds a slash to each directory returned + * + * + * + * + * GLOB_NOSORT - Return files as they appear in the + * directory (no sorting). When this flag is not used, the pathnames are + * sorted alphabetically + * + * + * + * + * GLOB_NOCHECK - Return the search pattern if no + * files matching it were found + * + * + * + * + * GLOB_NOESCAPE - Backslashes do not quote + * metacharacters + * + * + * + * + * GLOB_BRACE - Expands {a,b,c} to match 'a', 'b', + * or 'c' + * + * + * + * + * GLOB_ONLYDIR - Return only directory entries + * which match the pattern + * + * + * + * + * GLOB_ERR - Stop on read errors (like unreadable + * directories), by default errors are ignored. + * + * + * + * @return array Returns an array containing the matched files/directories, an empty array + * if no file matched. + * @throws FilesystemException + * + */ +function glob(string $pattern, int $flags = 0): array +{ + error_clear_last(); + $result = \glob($pattern, $flags); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Attempts to change the group of the symlink filename + * to group. + * + * Only the superuser may change the group of a symlink arbitrarily; other + * users may change the group of a symlink to any group of which that user is + * a member. + * + * @param string $filename Path to the symlink. + * @param string|int $group The group specified by name or number. + * @throws FilesystemException + * + */ +function lchgrp(string $filename, $group): void +{ + error_clear_last(); + $result = \lchgrp($filename, $group); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Attempts to change the owner of the symlink filename + * to user user. + * + * Only the superuser may change the owner of a symlink. + * + * @param string $filename Path to the file. + * @param string|int $user User name or number. + * @throws FilesystemException + * + */ +function lchown(string $filename, $user): void +{ + error_clear_last(); + $result = \lchown($filename, $user); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * link creates a hard link. + * + * @param string $target Target of the link. + * @param string $link The link name. + * @throws FilesystemException + * + */ +function link(string $target, string $link): void +{ + error_clear_last(); + $result = \link($target, $link); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Attempts to create the directory specified by pathname. + * + * @param string $pathname The directory path. + * @param int $mode The mode is 0777 by default, which means the widest possible + * access. For more information on modes, read the details + * on the chmod page. + * + * mode is ignored on Windows. + * + * Note that you probably want to specify the mode as an octal number, + * which means it should have a leading zero. The mode is also modified + * by the current umask, which you can change using + * umask. + * @param bool $recursive Allows the creation of nested directories specified in the + * pathname. + * @param resource $context + * @throws FilesystemException + * + */ +function mkdir(string $pathname, int $mode = 0777, bool $recursive = false, $context = null): void +{ + error_clear_last(); + if ($context !== null) { + $result = \mkdir($pathname, $mode, $recursive, $context); + } else { + $result = \mkdir($pathname, $mode, $recursive); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * parse_ini_file loads in the + * ini file specified in filename, + * and returns the settings in it in an associative array. + * + * The structure of the ini file is the same as the php.ini's. + * + * @param string $filename The filename of the ini file being parsed. + * @param bool $process_sections By setting the process_sections + * parameter to TRUE, you get a multidimensional array, with + * the section names and settings included. The default + * for process_sections is FALSE + * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or + * INI_SCANNER_RAW. If INI_SCANNER_RAW + * is supplied, then option values will not be parsed. + * + * + * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. + * In this mode boolean, null and integer types are preserved when possible. + * String values "true", "on" and "yes" + * are converted to TRUE. "false", "off", "no" + * and "none" are considered FALSE. "null" is converted to NULL + * in typed mode. Also, all numeric strings are converted to integer type if it is possible. + * @return array The settings are returned as an associative array on success. + * @throws FilesystemException + * + */ +function parse_ini_file(string $filename, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array +{ + error_clear_last(); + $result = \parse_ini_file($filename, $process_sections, $scanner_mode); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * parse_ini_string returns the settings in string + * ini in an associative array. + * + * The structure of the ini string is the same as the php.ini's. + * + * @param string $ini The contents of the ini file being parsed. + * @param bool $process_sections By setting the process_sections + * parameter to TRUE, you get a multidimensional array, with + * the section names and settings included. The default + * for process_sections is FALSE + * @param int $scanner_mode Can either be INI_SCANNER_NORMAL (default) or + * INI_SCANNER_RAW. If INI_SCANNER_RAW + * is supplied, then option values will not be parsed. + * + * + * As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. + * In this mode boolean, null and integer types are preserved when possible. + * String values "true", "on" and "yes" + * are converted to TRUE. "false", "off", "no" + * and "none" are considered FALSE. "null" is converted to NULL + * in typed mode. Also, all numeric strings are converted to integer type if it is possible. + * @return array The settings are returned as an associative array on success. + * @throws FilesystemException + * + */ +function parse_ini_string(string $ini, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array +{ + error_clear_last(); + $result = \parse_ini_string($ini, $process_sections, $scanner_mode); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * readlink does the same as the readlink C function. + * + * @param string $path The symbolic link path. + * @return string Returns the contents of the symbolic link path. + * @throws FilesystemException + * + */ +function readlink(string $path): string +{ + error_clear_last(); + $result = \readlink($path); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * realpath expands all symbolic links and + * resolves references to /./, /../ and extra / characters in + * the input path and returns the canonicalized + * absolute pathname. + * + * @param string $path The path being checked. + * + * + * Whilst a path must be supplied, the value can be an empty string. + * In this case, the value is interpreted as the current directory. + * + * + * + * Whilst a path must be supplied, the value can be an empty string. + * In this case, the value is interpreted as the current directory. + * @return string Returns the canonicalized absolute pathname on success. The resulting path + * will have no symbolic link, /./ or /../ components. Trailing delimiters, + * such as \ and /, are also removed. + * + * realpath returns FALSE on failure, e.g. if + * the file does not exist. + * @throws FilesystemException + * + */ +function realpath(string $path): string +{ + error_clear_last(); + $result = \realpath($path); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Attempts to rename oldname to + * newname, moving it between directories if necessary. + * If renaming a file and newname exists, + * it will be overwritten. If renaming a directory and + * newname exists, + * this function will emit a warning. + * + * @param string $oldname The old name. + * + * The wrapper used in oldname + * must match the wrapper used in + * newname. + * @param string $newname The new name. + * @param resource $context + * @throws FilesystemException + * + */ +function rename(string $oldname, string $newname, $context = null): void +{ + error_clear_last(); + if ($context !== null) { + $result = \rename($oldname, $newname, $context); + } else { + $result = \rename($oldname, $newname); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Sets the file position indicator for handle + * to the beginning of the file stream. + * + * @param resource $handle The file pointer must be valid, and must point to a file + * successfully opened by fopen. + * @throws FilesystemException + * + */ +function rewind($handle): void +{ + error_clear_last(); + $result = \rewind($handle); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Attempts to remove the directory named by dirname. + * The directory must be empty, and the relevant permissions must permit this. + * A E_WARNING level error will be generated on failure. + * + * @param string $dirname Path to the directory. + * @param resource $context + * @throws FilesystemException + * + */ +function rmdir(string $dirname, $context = null): void +{ + error_clear_last(); + if ($context !== null) { + $result = \rmdir($dirname, $context); + } else { + $result = \rmdir($dirname); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * symlink creates a symbolic link to the existing + * target with the specified name + * link. + * + * @param string $target Target of the link. + * @param string $link The link name. + * @throws FilesystemException + * + */ +function symlink(string $target, string $link): void +{ + error_clear_last(); + $result = \symlink($target, $link); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Creates a file with a unique filename, with access permission set to 0600, in the specified directory. + * If the directory does not exist or is not writable, tempnam may + * generate a file in the system's temporary directory, and return + * the full path to that file, including its name. + * + * @param string $dir The directory where the temporary filename will be created. + * @param string $prefix The prefix of the generated temporary filename. + * @return string Returns the new temporary filename (with path). + * @throws FilesystemException + * + */ +function tempnam(string $dir, string $prefix): string +{ + error_clear_last(); + $result = \tempnam($dir, $prefix); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Creates a temporary file with a unique name in read-write (w+) mode and + * returns a file handle . + * + * The file is automatically removed when closed (for example, by calling + * fclose, or when there are no remaining references to + * the file handle returned by tmpfile), or when the + * script ends. + * + * @return resource Returns a file handle, similar to the one returned by + * fopen, for the new file. + * @throws FilesystemException + * + */ +function tmpfile() +{ + error_clear_last(); + $result = \tmpfile(); + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } + return $result; +} + + +/** + * Attempts to set the access and modification times of the file named in the + * filename parameter to the value given in + * time. + * Note that the access time is always modified, regardless of the number + * of parameters. + * + * If the file does not exist, it will be created. + * + * @param string $filename The name of the file being touched. + * @param int $time The touch time. If time is not supplied, + * the current system time is used. + * @param int $atime If present, the access time of the given filename is set to + * the value of atime. Otherwise, it is set to + * the value passed to the time parameter. + * If neither are present, the current system time is used. + * @throws FilesystemException + * + */ +function touch(string $filename, int $time = null, int $atime = null): void +{ + error_clear_last(); + if ($atime !== null) { + $result = \touch($filename, $time, $atime); + } elseif ($time !== null) { + $result = \touch($filename, $time); + } else { + $result = \touch($filename); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} + + +/** + * Deletes filename. Similar to the Unix C unlink() + * function. An E_WARNING level error will be generated on + * failure. + * + * @param string $filename Path to the file. + * @param resource $context + * @throws FilesystemException + * + */ +function unlink(string $filename, $context = null): void +{ + error_clear_last(); + if ($context !== null) { + $result = \unlink($filename, $context); + } else { + $result = \unlink($filename); + } + if ($result === false) { + throw FilesystemException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/filter.php b/vendor/thecodingmachine/safe/generated/filter.php new file mode 100644 index 00000000..297a8aa1 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/filter.php @@ -0,0 +1,113 @@ + + * + * + * Note that open_basedir does + * not apply to fontfile. + * @param string $text The string to be measured. + * @return array imagettfbbox returns an array with 8 + * elements representing four points making the bounding box of the + * text on success and FALSE on error. + * + * + * + * + * key + * contents + * + * + * + * + * 0 + * lower left corner, X position + * + * + * 1 + * lower left corner, Y position + * + * + * 2 + * lower right corner, X position + * + * + * 3 + * lower right corner, Y position + * + * + * 4 + * upper right corner, X position + * + * + * 5 + * upper right corner, Y position + * + * + * 6 + * upper left corner, X position + * + * + * 7 + * upper left corner, Y position + * + * + * + * + * + * The points are relative to the text regardless of the + * angle, so "upper left" means in the top left-hand + * corner seeing the text horizontally. + * @throws ImageException + * + */ +function imagettfbbox(float $size, float $angle, string $fontfile, string $text): array +{ + error_clear_last(); + $result = \imagettfbbox($size, $angle, $fontfile, $text); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Writes the given text into the image using TrueType + * fonts. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param float $size The font size in points. + * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. + * Higher values represent a counter-clockwise rotation. For example, a + * value of 90 would result in bottom-to-top reading text. + * @param int $x The coordinates given by x and + * y will define the basepoint of the first + * character (roughly the lower-left corner of the character). This + * is different from the imagestring, where + * x and y define the + * upper-left corner of the first character. For example, "top left" + * is 0, 0. + * @param int $y The y-ordinate. This sets the position of the fonts baseline, not the + * very bottom of the character. + * @param int $color The color index. Using the negative of a color index has the effect of + * turning off antialiasing. See imagecolorallocate. + * @param string $fontfile The path to the TrueType font you wish to use. + * + * Depending on which version of the GD library PHP is using, when + * fontfile does not begin with a leading + * / then .ttf will be appended + * to the filename and the library will attempt to search for that + * filename along a library-defined font path. + * + * When using versions of the GD library lower than 2.0.18, a space character, + * rather than a semicolon, was used as the 'path separator' for different font files. + * Unintentional use of this feature will result in the warning message: + * Warning: Could not find/open font. For these affected versions, the + * only solution is moving the font to a path which does not contain spaces. + * + * In many cases where a font resides in the same directory as the script using it + * the following trick will alleviate any include problems. + * + * + * ]]> + * + * + * Note that open_basedir does + * not apply to fontfile. + * @param string $text The text string in UTF-8 encoding. + * + * May include decimal numeric character references (of the form: + * &#8364;) to access characters in a font beyond position 127. + * The hexadecimal format (like &#xA9;) is supported. + * Strings in UTF-8 encoding can be passed directly. + * + * Named entities, such as &copy;, are not supported. Consider using + * html_entity_decode + * to decode these named entities into UTF-8 strings. + * + * If a character is used in the string which is not supported by the + * font, a hollow rectangle will replace the character. + * @return array Returns an array with 8 elements representing four points making the + * bounding box of the text. The order of the points is lower left, lower + * right, upper right, upper left. The points are relative to the text + * regardless of the angle, so "upper left" means in the top left-hand + * corner when you see the text horizontally. + * Returns FALSE on error. + * @throws ImageException + * + */ +function imagettftext($image, float $size, float $angle, int $x, int $y, int $color, string $fontfile, string $text): array +{ + error_clear_last(); + $result = \imagettftext($image, $size, $angle, $x, $y, $color, $fontfile, $text); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * imagewbmp outputs or save a WBMP + * version of the given image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * @param int $foreground You can set the foreground color with this parameter by setting an + * identifier obtained from imagecolorallocate. + * The default foreground color is black. + * @throws ImageException + * + */ +function imagewbmp($image, $to = null, int $foreground = null): void +{ + error_clear_last(); + if ($foreground !== null) { + $result = \imagewbmp($image, $to, $foreground); + } else { + $result = \imagewbmp($image, $to); + } + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Outputs or saves a WebP version of the given image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * @param int $quality quality ranges from 0 (worst + * quality, smaller file) to 100 (best quality, biggest file). + * @throws ImageException + * + */ +function imagewebp($image, $to = null, int $quality = 80): void +{ + error_clear_last(); + $result = \imagewebp($image, $to, $quality); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Outputs or save an XBM version of the given + * image. + * + * @param resource $image An image resource, returned by one of the image creation functions, + * such as imagecreatetruecolor. + * @param string|null $filename The path to save the file to. If not set or NULL, the raw image stream will be outputted directly. + * + * The filename (without the .xbm extension) is also + * used for the C identifiers of the XBM, whereby non + * alphanumeric characters of the current locale are substituted by + * underscores. If filename is set to NULL, + * image is used to build the C identifiers. + * @param int $foreground You can set the foreground color with this parameter by setting an + * identifier obtained from imagecolorallocate. + * The default foreground color is black. All other colors are treated as + * background. + * @throws ImageException + * + */ +function imagexbm($image, ?string $filename = null, int $foreground = null): void +{ + error_clear_last(); + if ($foreground !== null) { + $result = \imagexbm($image, $filename, $foreground); + } else { + $result = \imagexbm($image, $filename); + } + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Embeds binary IPTC data into a JPEG image. + * + * @param string $iptcdata The data to be written. + * @param string $jpeg_file_name Path to the JPEG image. + * @param int $spool Spool flag. If the spool flag is less than 2 then the JPEG will be + * returned as a string. Otherwise the JPEG will be printed to STDOUT. + * @return array If spool is less than 2, the JPEG will be returned. Otherwise returns TRUE on success. + * @throws ImageException + * + */ +function iptcembed(string $iptcdata, string $jpeg_file_name, int $spool = 0) +{ + error_clear_last(); + $result = \iptcembed($iptcdata, $jpeg_file_name, $spool); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Parses an IPTC block into its single tags. + * + * @param string $iptcblock A binary IPTC block. + * @return array Returns an array using the tagmarker as an index and the value as the + * value. It returns FALSE on error or if no IPTC data was found. + * @throws ImageException + * + */ +function iptcparse(string $iptcblock): array +{ + error_clear_last(); + $result = \iptcparse($iptcblock); + if ($result === false) { + throw ImageException::createFromPhpError(); + } + return $result; +} + + +/** + * Converts a JPEG file into a WBMP file. + * + * @param string $jpegname Path to JPEG file. + * @param string $wbmpname Path to destination WBMP file. + * @param int $dest_height Destination image height. + * @param int $dest_width Destination image width. + * @param int $threshold Threshold value, between 0 and 8 (inclusive). + * @throws ImageException + * + */ +function jpeg2wbmp(string $jpegname, string $wbmpname, int $dest_height, int $dest_width, int $threshold): void +{ + error_clear_last(); + $result = \jpeg2wbmp($jpegname, $wbmpname, $dest_height, $dest_width, $threshold); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} + + +/** + * Converts a PNG file into a WBMP file. + * + * @param string $pngname Path to PNG file. + * @param string $wbmpname Path to destination WBMP file. + * @param int $dest_height Destination image height. + * @param int $dest_width Destination image width. + * @param int $threshold Threshold value, between 0 and 8 (inclusive). + * @throws ImageException + * + */ +function png2wbmp(string $pngname, string $wbmpname, int $dest_height, int $dest_width, int $threshold): void +{ + error_clear_last(); + $result = \png2wbmp($pngname, $wbmpname, $dest_height, $dest_width, $threshold); + if ($result === false) { + throw ImageException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/imap.php b/vendor/thecodingmachine/safe/generated/imap.php new file mode 100644 index 00000000..e8c4df75 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/imap.php @@ -0,0 +1,1138 @@ + + * + * + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_add($link_identifier, string $dn, array $entry, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_add($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Does the same thing as ldap_bind but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $bind_rdn + * @param string $bind_password + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_bind_ext($link_identifier, ?string $bind_rdn = null, ?string $bind_password = null) +{ + error_clear_last(); + $result = \ldap_bind_ext($link_identifier, $bind_rdn, $bind_password); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Binds to the LDAP directory with specified RDN and password. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $bind_rdn + * @param string $bind_password + * @throws LdapException + * + */ +function ldap_bind($link_identifier, ?string $bind_rdn = null, ?string $bind_password = null): void +{ + error_clear_last(); + $result = \ldap_bind($link_identifier, $bind_rdn, $bind_password); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Retrieve the pagination information send by the server. + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param resource $result + * @param string $cookie An opaque structure sent by the server. + * @param int $estimated The estimated number of entries to retrieve. + * @throws LdapException + * + */ +function ldap_control_paged_result_response($link, $result, ?string &$cookie = null, ?int &$estimated = null): void +{ + error_clear_last(); + $result = \ldap_control_paged_result_response($link, $result, $cookie, $estimated); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Enable LDAP pagination by sending the pagination control (page size, cookie...). + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param int $pagesize The number of entries by page. + * @param bool $iscritical Indicates whether the pagination is critical or not. + * If true and if the server doesn't support pagination, the search + * will return no result. + * @param string $cookie An opaque structure sent by the server + * (ldap_control_paged_result_response). + * @throws LdapException + * + */ +function ldap_control_paged_result($link, int $pagesize, bool $iscritical = false, string $cookie = ""): void +{ + error_clear_last(); + $result = \ldap_control_paged_result($link, $pagesize, $iscritical, $cookie); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Returns the number of entries stored in the result of previous search + * operations. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_identifier The internal LDAP result. + * @return int Returns number of entries in the result. + * @throws LdapException + * + */ +function ldap_count_entries($link_identifier, $result_identifier): int +{ + error_clear_last(); + $result = \ldap_count_entries($link_identifier, $result_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Does the same thing as ldap_delete but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_delete_ext($link_identifier, string $dn, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_delete_ext($link_identifier, $dn, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Deletes a particular entry in LDAP directory. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_delete($link_identifier, string $dn, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_delete($link_identifier, $dn, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Performs a PASSWD extended operation. + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param string $user dn of the user to change the password of. + * @param string $oldpw The old password of this user. May be ommited depending of server configuration. + * @param string $newpw The new password for this user. May be omitted or empty to have a generated password. + * @param array $serverctrls If provided, a password policy request control is send with the request and this is + * filled with an array of LDAP Controls + * returned with the request. + * @return mixed Returns the generated password if newpw is empty or omitted. + * Otherwise returns TRUE on success. + * @throws LdapException + * + */ +function ldap_exop_passwd($link, string $user = "", string $oldpw = "", string $newpw = "", array &$serverctrls = null) +{ + error_clear_last(); + $result = \ldap_exop_passwd($link, $user, $oldpw, $newpw, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Performs a WHOAMI extended operation and returns the data. + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @return string The data returned by the server. + * @throws LdapException + * + */ +function ldap_exop_whoami($link): string +{ + error_clear_last(); + $result = \ldap_exop_whoami($link); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Performs an extended operation on the specified link with + * reqoid the OID of the operation and + * reqdata the data. + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param string $reqoid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send. + * @param string $reqdata The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded. + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @param string $retdata Will be filled with the extended operation response data if provided. + * If not provided you may use ldap_parse_exop on the result object + * later to get this data. + * @param string $retoid Will be filled with the response OID if provided, usually equal to the request OID. + * @return mixed When used with retdata, returns TRUE on success. + * When used without retdata, returns a result identifier. + * @throws LdapException + * + */ +function ldap_exop($link, string $reqoid, string $reqdata = null, ?array $serverctrls = null, string &$retdata = null, string &$retoid = null) +{ + error_clear_last(); + $result = \ldap_exop($link, $reqoid, $reqdata, $serverctrls, $retdata, $retoid); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Splits the DN returned by ldap_get_dn and breaks it + * up into its component parts. Each part is known as Relative Distinguished + * Name, or RDN. + * + * @param string $dn The distinguished name of an LDAP entity. + * @param int $with_attrib Used to request if the RDNs are returned with only values or their + * attributes as well. To get RDNs with the attributes (i.e. in + * attribute=value format) set with_attrib to 0 + * and to get only values set it to 1. + * @return array Returns an array of all DN components. + * The first element in the array has count key and + * represents the number of returned values, next elements are numerically + * indexed DN components. + * @throws LdapException + * + */ +function ldap_explode_dn(string $dn, int $with_attrib): array +{ + error_clear_last(); + $result = \ldap_explode_dn($dn, $with_attrib); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Gets the first attribute in the given entry. Remaining attributes are + * retrieved by calling ldap_next_attribute successively. + * + * Similar to reading entries, attributes are also read one by one from a + * particular entry. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @return string Returns the first attribute in the entry on success and FALSE on + * error. + * @throws LdapException + * + */ +function ldap_first_attribute($link_identifier, $result_entry_identifier): string +{ + error_clear_last(); + $result = \ldap_first_attribute($link_identifier, $result_entry_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the entry identifier for first entry in the result. This entry + * identifier is then supplied to ldap_next_entry + * routine to get successive entries from the result. + * + * Entries in the LDAP result are read sequentially using the + * ldap_first_entry and + * ldap_next_entry functions. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_identifier + * @return resource Returns the result entry identifier for the first entry on success and + * FALSE on error. + * @throws LdapException + * + */ +function ldap_first_entry($link_identifier, $result_identifier) +{ + error_clear_last(); + $result = \ldap_first_entry($link_identifier, $result_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Frees up the memory allocated internally to store the result. All result + * memory will be automatically freed when the script terminates. + * + * Typically all the memory allocated for the LDAP result gets freed at the + * end of the script. In case the script is making successive searches which + * return large result sets, ldap_free_result could be + * called to keep the runtime memory usage by the script low. + * + * @param resource $result_identifier + * @throws LdapException + * + */ +function ldap_free_result($result_identifier): void +{ + error_clear_last(); + $result = \ldap_free_result($result_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Reads attributes and values from an entry in the search result. + * + * Having located a specific entry in the directory, you can find out what + * information is held for that entry by using this call. You would use this + * call for an application which "browses" directory entries and/or where you + * do not know the structure of the directory entries. In many applications + * you will be searching for a specific attribute such as an email address or + * a surname, and won't care what other data is held. + * + * + * + * + * + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @return array Returns a complete entry information in a multi-dimensional array + * on success and FALSE on error. + * @throws LdapException + * + */ +function ldap_get_attributes($link_identifier, $result_entry_identifier): array +{ + error_clear_last(); + $result = \ldap_get_attributes($link_identifier, $result_entry_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Finds out the DN of an entry in the result. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @return string Returns the DN of the result entry and FALSE on error. + * @throws LdapException + * + */ +function ldap_get_dn($link_identifier, $result_entry_identifier): string +{ + error_clear_last(); + $result = \ldap_get_dn($link_identifier, $result_entry_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Reads multiple entries from the given result, and then reading the + * attributes and multiple values. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_identifier + * @return array Returns a complete result information in a multi-dimensional array on + * success and FALSE on error. + * + * The structure of the array is as follows. + * The attribute index is converted to lowercase. (Attributes are + * case-insensitive for directory servers, but not when used as + * array indices.) + * + * + * + * + * + * @throws LdapException + * + */ +function ldap_get_entries($link_identifier, $result_identifier): array +{ + error_clear_last(); + $result = \ldap_get_entries($link_identifier, $result_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets retval to the value of the specified option. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param int $option The parameter option can be one of: + * + * + * + * + * Option + * Type + * since + * + * + * + * + * LDAP_OPT_DEREF + * integer + * + * + * + * LDAP_OPT_SIZELIMIT + * integer + * + * + * + * LDAP_OPT_TIMELIMIT + * integer + * + * + * + * LDAP_OPT_NETWORK_TIMEOUT + * integer + * + * + * + * LDAP_OPT_PROTOCOL_VERSION + * integer + * + * + * + * LDAP_OPT_ERROR_NUMBER + * integer + * + * + * + * LDAP_OPT_DIAGNOSTIC_MESSAGE + * integer + * + * + * + * LDAP_OPT_REFERRALS + * bool + * + * + * + * LDAP_OPT_RESTART + * bool + * + * + * + * LDAP_OPT_HOST_NAME + * string + * + * + * + * LDAP_OPT_ERROR_STRING + * string + * + * + * + * LDAP_OPT_MATCHED_DN + * string + * + * + * + * LDAP_OPT_SERVER_CONTROLS + * array + * + * + * + * LDAP_OPT_CLIENT_CONTROLS + * array + * + * + * + * LDAP_OPT_X_KEEPALIVE_IDLE + * int + * 7.1 + * + * + * LDAP_OPT_X_KEEPALIVE_PROBES + * int + * 7.1 + * + * + * LDAP_OPT_X_KEEPALIVE_INTERVAL + * int + * 7.1 + * + * + * LDAP_OPT_X_TLS_CACERTDIR + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_CACERTFILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_CERTFILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_CIPHER_SUITE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_CRLCHECK + * integer + * 7.1 + * + * + * LDAP_OPT_X_TLS_CRL_NONE + * integer + * 7.1 + * + * + * LDAP_OPT_X_TLS_CRL_PEER + * integer + * 7.1 + * + * + * LDAP_OPT_X_TLS_CRL_ALL + * integer + * 7.1 + * + * + * LDAP_OPT_X_TLS_CRLFILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_DHFILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_KEYILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_PACKAGE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_PROTOCOL_MIN + * integer + * 7.1 + * + * + * LDAP_OPT_X_TLS_RANDOM_FILE + * string + * 7.1 + * + * + * LDAP_OPT_X_TLS_REQUIRE_CERT + * integer + * + * + * + * + * + * @param mixed $retval This will be set to the option value. + * @throws LdapException + * + */ +function ldap_get_option($link_identifier, int $option, &$retval): void +{ + error_clear_last(); + $result = \ldap_get_option($link_identifier, $option, $retval); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Reads all the values of the attribute in the entry in the result. + * + * This function is used exactly like ldap_get_values + * except that it handles binary data and not string data. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @param string $attribute + * @return array Returns an array of values for the attribute on success and FALSE on + * error. Individual values are accessed by integer index in the array. The + * first index is 0. The number of values can be found by indexing "count" + * in the resultant array. + * @throws LdapException + * + */ +function ldap_get_values_len($link_identifier, $result_entry_identifier, string $attribute): array +{ + error_clear_last(); + $result = \ldap_get_values_len($link_identifier, $result_entry_identifier, $attribute); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Reads all the values of the attribute in the entry in the result. + * + * This call needs a result_entry_identifier, + * so needs to be preceded by one of the ldap search calls and one + * of the calls to get an individual entry. + * + * You application will either be hard coded to look for certain + * attributes (such as "surname" or "mail") or you will have to use + * the ldap_get_attributes call to work out + * what attributes exist for a given entry. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @param string $attribute + * @return array Returns an array of values for the attribute on success and FALSE on + * error. The number of values can be found by indexing "count" in the + * resultant array. Individual values are accessed by integer index in the + * array. The first index is 0. + * + * LDAP allows more than one entry for an attribute, so it can, for example, + * store a number of email addresses for one person's directory entry all + * labeled with the attribute "mail" + * + * + * return_value["count"] = number of values for attribute + * return_value[0] = first value of attribute + * return_value[i] = ith value of attribute + * + * + * @throws LdapException + * + */ +function ldap_get_values($link_identifier, $result_entry_identifier, string $attribute): array +{ + error_clear_last(); + $result = \ldap_get_values($link_identifier, $result_entry_identifier, $attribute); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Performs the search for a specified filter on the + * directory with the scope LDAP_SCOPE_ONELEVEL. + * + * LDAP_SCOPE_ONELEVEL means that the search should only + * return information that is at the level immediately below the + * base_dn given in the call. + * (Equivalent to typing "ls" and getting a list of files and folders in the + * current working directory.) + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $base_dn The base DN for the directory. + * @param string $filter + * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn"). + * Note that the "dn" is always returned irrespective of which attributes + * types are requested. + * + * Using this parameter is much more efficient than the default action + * (which is to return all attributes and their associated values). + * The use of this parameter should therefore be considered good + * practice. + * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0 + * both attributes types and attribute values are fetched which is the + * default behaviour. + * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0 + * means no limit. + * + * This parameter can NOT override server-side preset sizelimit. You can + * set it lower though. + * + * Some directory server hosts will be configured to return no more than + * a preset number of entries. If this occurs, the server will indicate + * that it has only returned a partial results set. This also occurs if + * you use this parameter to limit the count of fetched entries. + * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting + * this to 0 means no limit. + * + * This parameter can NOT override server-side preset timelimit. You can + * set it lower though. + * @param int $deref Specifies how aliases should be handled during the search. It can be + * one of the following: + * + * + * + * LDAP_DEREF_NEVER - (default) aliases are never + * dereferenced. + * + * + * + * + * LDAP_DEREF_SEARCHING - aliases should be + * dereferenced during the search but not when locating the base object + * of the search. + * + * + * + * + * LDAP_DEREF_FINDING - aliases should be + * dereferenced when locating the base object but not during the search. + * + * + * + * + * LDAP_DEREF_ALWAYS - aliases should be dereferenced + * always. + * + * + * + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @return resource Returns a search result identifier. + * @throws LdapException + * + */ +function ldap_list($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $serverctrls = null) +{ + error_clear_last(); + if ($serverctrls !== null) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref, $serverctrls); + } elseif ($deref !== LDAP_DEREF_NEVER) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref); + } elseif ($timelimit !== -1) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit); + } elseif ($sizelimit !== -1) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit); + } elseif ($attrsonly !== 0) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly); + } elseif ($attributes !== null) { + $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes); + } else { + $result = \ldap_list($link_identifier, $base_dn, $filter); + } + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Does the same thing as ldap_mod_add but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param array $entry + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_mod_add_ext($link_identifier, string $dn, array $entry, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_mod_add_ext($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Adds one or more attribute values to the specified dn. + * To add a whole new object see ldap_add function. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $entry An associative array listing the attirbute values to add. If an attribute was not existing yet it will be added. If an attribute is existing you can only add values to it if it supports multiple values. + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_mod_add($link_identifier, string $dn, array $entry, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_mod_add($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Does the same thing as ldap_mod_del but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param array $entry + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_mod_del_ext($link_identifier, string $dn, array $entry, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_mod_del_ext($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Removes one or more attribute values from the specified dn. + * Object deletions are done by the + * ldap_delete function. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $entry + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_mod_del($link_identifier, string $dn, array $entry, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_mod_del($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Does the same thing as ldap_mod_replace but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param array $entry + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_mod_replace_ext($link_identifier, string $dn, array $entry, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_mod_replace_ext($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Replaces one or more attributes from the specified dn. + * It may also add or remove attributes. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $entry An associative array listing the attributes to replace. Sending an empty array as value will remove the attribute, while sending an attribute not existing yet on this entry will add it. + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_mod_replace($link_identifier, string $dn, array $entry, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_mod_replace($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Modifies an existing entry in the LDAP directory. Allows detailed + * specification of the modifications to perform. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param array $entry An array that specifies the modifications to make. Each entry in this + * array is an associative array with two or three keys: + * attrib maps to the name of the attribute to modify, + * modtype maps to the type of modification to perform, + * and (depending on the type of modification) values + * maps to an array of attribute values relevant to the modification. + * + * Possible values for modtype include: + * + * + * LDAP_MODIFY_BATCH_ADD + * + * + * Each value specified through values is added (as + * an additional value) to the attribute named by + * attrib. + * + * + * + * + * LDAP_MODIFY_BATCH_REMOVE + * + * + * Each value specified through values is removed + * from the attribute named by attrib. Any value of + * the attribute not contained in the values array + * will remain untouched. + * + * + * + * + * LDAP_MODIFY_BATCH_REMOVE_ALL + * + * + * All values are removed from the attribute named by + * attrib. A values entry must + * not be provided. + * + * + * + * + * LDAP_MODIFY_BATCH_REPLACE + * + * + * All current values of the attribute named by + * attrib are replaced with the values specified + * through values. + * + * + * + * + * + * Each value specified through values is added (as + * an additional value) to the attribute named by + * attrib. + * + * Each value specified through values is removed + * from the attribute named by attrib. Any value of + * the attribute not contained in the values array + * will remain untouched. + * + * All values are removed from the attribute named by + * attrib. A values entry must + * not be provided. + * + * All current values of the attribute named by + * attrib are replaced with the values specified + * through values. + * + * Note that any value for attrib must be a string, any + * value for values must be an array of strings, and + * any value for modtype must be one of the + * LDAP_MODIFY_BATCH_* constants listed above. + * @param array $serverctrls Each value specified through values is added (as + * an additional value) to the attribute named by + * attrib. + * @throws LdapException + * + */ +function ldap_modify_batch($link_identifier, string $dn, array $entry, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_modify_batch($link_identifier, $dn, $entry, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Retrieves the attributes in an entry. The first call to + * ldap_next_attribute is made with the + * result_entry_identifier returned from + * ldap_first_attribute. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param resource $result_entry_identifier + * @return string Returns the next attribute in an entry on success and FALSE on + * error. + * @throws LdapException + * + */ +function ldap_next_attribute($link_identifier, $result_entry_identifier): string +{ + error_clear_last(); + $result = \ldap_next_attribute($link_identifier, $result_entry_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Parse LDAP extended operation data from result object result + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param resource $result An LDAP result resource, returned by ldap_exop. + * @param string $retdata Will be filled by the response data. + * @param string $retoid Will be filled by the response OID. + * @throws LdapException + * + */ +function ldap_parse_exop($link, $result, string &$retdata = null, string &$retoid = null): void +{ + error_clear_last(); + $result = \ldap_parse_exop($link, $result, $retdata, $retoid); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Parses an LDAP search result. + * + * @param resource $link An LDAP link identifier, returned by ldap_connect. + * @param resource $result An LDAP result resource, returned by ldap_list or + * ldap_search. + * @param int $errcode A reference to a variable that will be set to the LDAP error code in + * the result, or 0 if no error occurred. + * @param string $matcheddn A reference to a variable that will be set to a matched DN if one was + * recognised within the request, otherwise it will be set to NULL. + * @param string $errmsg A reference to a variable that will be set to the LDAP error message in + * the result, or an empty string if no error occurred. + * @param array $referrals A reference to a variable that will be set to an array set + * to all of the referral strings in the result, or an empty array if no + * referrals were returned. + * @param array $serverctrls An array of LDAP Controls which have been sent with the response. + * @throws LdapException + * + */ +function ldap_parse_result($link, $result, int &$errcode, string &$matcheddn = null, string &$errmsg = null, array &$referrals = null, array &$serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_parse_result($link, $result, $errcode, $matcheddn, $errmsg, $referrals, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Performs the search for a specified filter on the + * directory with the scope LDAP_SCOPE_BASE. So it is + * equivalent to reading an entry from the directory. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $base_dn The base DN for the directory. + * @param string $filter An empty filter is not allowed. If you want to retrieve absolutely all + * information for this entry, use a filter of + * objectClass=*. If you know which entry types are + * used on the directory server, you might use an appropriate filter such + * as objectClass=inetOrgPerson. + * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn"). + * Note that the "dn" is always returned irrespective of which attributes + * types are requested. + * + * Using this parameter is much more efficient than the default action + * (which is to return all attributes and their associated values). + * The use of this parameter should therefore be considered good + * practice. + * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0 + * both attributes types and attribute values are fetched which is the + * default behaviour. + * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0 + * means no limit. + * + * This parameter can NOT override server-side preset sizelimit. You can + * set it lower though. + * + * Some directory server hosts will be configured to return no more than + * a preset number of entries. If this occurs, the server will indicate + * that it has only returned a partial results set. This also occurs if + * you use this parameter to limit the count of fetched entries. + * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting + * this to 0 means no limit. + * + * This parameter can NOT override server-side preset timelimit. You can + * set it lower though. + * @param int $deref Specifies how aliases should be handled during the search. It can be + * one of the following: + * + * + * + * LDAP_DEREF_NEVER - (default) aliases are never + * dereferenced. + * + * + * + * + * LDAP_DEREF_SEARCHING - aliases should be + * dereferenced during the search but not when locating the base object + * of the search. + * + * + * + * + * LDAP_DEREF_FINDING - aliases should be + * dereferenced when locating the base object but not during the search. + * + * + * + * + * LDAP_DEREF_ALWAYS - aliases should be dereferenced + * always. + * + * + * + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @return resource Returns a search result identifier. + * @throws LdapException + * + */ +function ldap_read($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $serverctrls = null) +{ + error_clear_last(); + if ($serverctrls !== null) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref, $serverctrls); + } elseif ($deref !== LDAP_DEREF_NEVER) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref); + } elseif ($timelimit !== -1) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit); + } elseif ($sizelimit !== -1) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit); + } elseif ($attrsonly !== 0) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly); + } elseif ($attributes !== null) { + $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes); + } else { + $result = \ldap_read($link_identifier, $base_dn, $filter); + } + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Does the same thing as ldap_rename but returns the LDAP result resource to be parsed with ldap_parse_result. + * + * @param resource $link_identifier + * @param string $dn + * @param string $newrdn + * @param string $newparent + * @param bool $deleteoldrdn + * @param array $serverctrls + * @return resource Returns an LDAP result identifier. + * @throws LdapException + * + */ +function ldap_rename_ext($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $serverctrls = null) +{ + error_clear_last(); + $result = \ldap_rename_ext($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * The entry specified by dn is renamed/moved. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $dn The distinguished name of an LDAP entity. + * @param string $newrdn The new RDN. + * @param string $newparent The new parent/superior entry. + * @param bool $deleteoldrdn If TRUE the old RDN value(s) is removed, else the old RDN value(s) + * is retained as non-distinguished values of the entry. + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @throws LdapException + * + */ +function ldap_rename($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $serverctrls = null): void +{ + error_clear_last(); + $result = \ldap_rename($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * + * + * @param resource $link + * @param string $binddn + * @param string $password + * @param string $sasl_mech + * @param string $sasl_realm + * @param string $sasl_authc_id + * @param string $sasl_authz_id + * @param string $props + * @throws LdapException + * + */ +function ldap_sasl_bind($link, string $binddn = null, string $password = null, string $sasl_mech = null, string $sasl_realm = null, string $sasl_authc_id = null, string $sasl_authz_id = null, string $props = null): void +{ + error_clear_last(); + $result = \ldap_sasl_bind($link, $binddn, $password, $sasl_mech, $sasl_realm, $sasl_authc_id, $sasl_authz_id, $props); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Performs the search for a specified filter on the directory with the scope + * of LDAP_SCOPE_SUBTREE. This is equivalent to searching + * the entire directory. + * + * From 4.0.5 on it's also possible to do parallel searches. To do this + * you use an array of link identifiers, rather than a single identifier, + * as the first argument. If you don't want the same base DN and the + * same filter for all the searches, you can also use an array of base DNs + * and/or an array of filters. Those arrays must be of the same size as + * the link identifier array since the first entries of the arrays are + * used for one search, the second entries are used for another, and so + * on. When doing parallel searches an array of search result + * identifiers is returned, except in case of error, then the entry + * corresponding to the search will be FALSE. This is very much like + * the value normally returned, except that a result identifier is always + * returned when a search was made. There are some rare cases where the + * normal search returns FALSE while the parallel search returns an + * identifier. + * + * @param resource|array $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param string $base_dn The base DN for the directory. + * @param string $filter The search filter can be simple or advanced, using boolean operators in + * the format described in the LDAP documentation (see the Netscape Directory SDK or + * RFC4515 for full + * information on filters). + * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn"). + * Note that the "dn" is always returned irrespective of which attributes + * types are requested. + * + * Using this parameter is much more efficient than the default action + * (which is to return all attributes and their associated values). + * The use of this parameter should therefore be considered good + * practice. + * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0 + * both attributes types and attribute values are fetched which is the + * default behaviour. + * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0 + * means no limit. + * + * This parameter can NOT override server-side preset sizelimit. You can + * set it lower though. + * + * Some directory server hosts will be configured to return no more than + * a preset number of entries. If this occurs, the server will indicate + * that it has only returned a partial results set. This also occurs if + * you use this parameter to limit the count of fetched entries. + * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting + * this to 0 means no limit. + * + * This parameter can NOT override server-side preset timelimit. You can + * set it lower though. + * @param int $deref Specifies how aliases should be handled during the search. It can be + * one of the following: + * + * + * + * LDAP_DEREF_NEVER - (default) aliases are never + * dereferenced. + * + * + * + * + * LDAP_DEREF_SEARCHING - aliases should be + * dereferenced during the search but not when locating the base object + * of the search. + * + * + * + * + * LDAP_DEREF_FINDING - aliases should be + * dereferenced when locating the base object but not during the search. + * + * + * + * + * LDAP_DEREF_ALWAYS - aliases should be dereferenced + * always. + * + * + * + * @param array $serverctrls Array of LDAP Controls to send with the request. + * @return resource Returns a search result identifier. + * @throws LdapException + * + */ +function ldap_search($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $serverctrls = null) +{ + error_clear_last(); + if ($serverctrls !== null) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref, $serverctrls); + } elseif ($deref !== LDAP_DEREF_NEVER) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref); + } elseif ($timelimit !== -1) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit); + } elseif ($sizelimit !== -1) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly, $sizelimit); + } elseif ($attrsonly !== 0) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly); + } elseif ($attributes !== null) { + $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes); + } else { + $result = \ldap_search($link_identifier, $base_dn, $filter); + } + if ($result === false) { + throw LdapException::createFromPhpError(); + } + return $result; +} + + +/** + * Sets the value of the specified option to be newval. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @param int $option The parameter option can be one of: + * + * + * + * + * Option + * Type + * Available since + * + * + * + * + * LDAP_OPT_DEREF + * integer + * + * + * + * LDAP_OPT_SIZELIMIT + * integer + * + * + * + * LDAP_OPT_TIMELIMIT + * integer + * + * + * + * LDAP_OPT_NETWORK_TIMEOUT + * integer + * PHP 5.3.0 + * + * + * LDAP_OPT_PROTOCOL_VERSION + * integer + * + * + * + * LDAP_OPT_ERROR_NUMBER + * integer + * + * + * + * LDAP_OPT_REFERRALS + * bool + * + * + * + * LDAP_OPT_RESTART + * bool + * + * + * + * LDAP_OPT_HOST_NAME + * string + * + * + * + * LDAP_OPT_ERROR_STRING + * string + * + * + * + * LDAP_OPT_DIAGNOSTIC_MESSAGE + * string + * + * + * + * LDAP_OPT_MATCHED_DN + * string + * + * + * + * LDAP_OPT_SERVER_CONTROLS + * array + * + * + * + * LDAP_OPT_CLIENT_CONTROLS + * array + * + * + * + * LDAP_OPT_X_KEEPALIVE_IDLE + * int + * PHP 7.1.0 + * + * + * LDAP_OPT_X_KEEPALIVE_PROBES + * int + * PHP 7.1.0 + * + * + * LDAP_OPT_X_KEEPALIVE_INTERVAL + * int + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CACERTDIR + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CACERTFILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CERTFILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CIPHER_SUITE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CRLCHECK + * integer + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_CRLFILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_DHFILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_KEYFILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_PROTOCOL_MIN + * integer + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_RANDOM_FILE + * string + * PHP 7.1.0 + * + * + * LDAP_OPT_X_TLS_REQUIRE_CERT + * integer + * PHP 7.0.5 + * + * + * + * + * + * LDAP_OPT_SERVER_CONTROLS and + * LDAP_OPT_CLIENT_CONTROLS require a list of + * controls, this means that the value must be an array of controls. A + * control consists of an oid identifying the control, + * an optional value, and an optional flag for + * criticality. In PHP a control is given by an + * array containing an element with the key oid + * and string value, and two optional elements. The optional + * elements are key value with string value + * and key iscritical with boolean value. + * iscritical defaults to FALSE + * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt + * for details. See also the second example below. + * @param mixed $newval The new value for the specified option. + * @throws LdapException + * + */ +function ldap_set_option($link_identifier, int $option, $newval): void +{ + error_clear_last(); + $result = \ldap_set_option($link_identifier, $option, $newval); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} + + +/** + * Unbinds from the LDAP directory. + * + * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. + * @throws LdapException + * + */ +function ldap_unbind($link_identifier): void +{ + error_clear_last(); + $result = \ldap_unbind($link_identifier); + if ($result === false) { + throw LdapException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/libevent.php b/vendor/thecodingmachine/safe/generated/libevent.php new file mode 100644 index 00000000..574f0a67 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/libevent.php @@ -0,0 +1,496 @@ + + * + * The above example will output: + * + * example: , this is a test + * example: , this is a test + * ]]> + * + * + * So, $out[0] contains array of strings that matched full pattern, + * and $out[1] contains array of strings enclosed by tags. + * + * + * + * + * If the pattern contains named subpatterns, $matches + * additionally contains entries for keys with the subpattern name. + * + * + * If the pattern contains duplicate named subpatterns, only the rightmost + * subpattern is stored in $matches[NAME]. + * + * + * + * ]]> + * + * The above example will output: + * + * + * [1] => bar + * ) + * ]]> + * + * + * + * + * + * + * PREG_SET_ORDER + * + * + * Orders results so that $matches[0] is an array of first set + * of matches, $matches[1] is an array of second set of matches, + * and so on. + * + * + * + * ]]> + * + * The above example will output: + * + * example: , example: + * this is a test, this is a test + * ]]> + * + * + * + * + * + * + * PREG_OFFSET_CAPTURE + * + * + * If this flag is passed, for every occurring match the appendant string + * offset will also be returned. Note that this changes the value of + * matches into an array of arrays where every element is an + * array consisting of the matched string at offset 0 + * and its string offset into subject at offset + * 1. + * + * + * + * ]]> + * + * The above example will output: + * + * Array + * ( + * [0] => Array + * ( + * [0] => foobarbaz + * [1] => 0 + * ) + * + * ) + * + * [1] => Array + * ( + * [0] => Array + * ( + * [0] => foo + * [1] => 0 + * ) + * + * ) + * + * [2] => Array + * ( + * [0] => Array + * ( + * [0] => bar + * [1] => 3 + * ) + * + * ) + * + * [3] => Array + * ( + * [0] => Array + * ( + * [0] => baz + * [1] => 6 + * ) + * + * ) + * + * ) + * ]]> + * + * + * + * + * + * + * PREG_UNMATCHED_AS_NULL + * + * + * If this flag is passed, unmatched subpatterns are reported as NULL; + * otherwise they are reported as an empty string. + * + * + * + * + * + * Orders results so that $matches[0] is an array of full + * pattern matches, $matches[1] is an array of strings matched by + * the first parenthesized subpattern, and so on. + * + * + * + * + * ]]> + * + * The above example will output: + * + * example: , this is a test + * example: , this is a test + * ]]> + * + * + * So, $out[0] contains array of strings that matched full pattern, + * and $out[1] contains array of strings enclosed by tags. + * + * + * + * The above example will output: + * + * So, $out[0] contains array of strings that matched full pattern, + * and $out[1] contains array of strings enclosed by tags. + * + * If the pattern contains named subpatterns, $matches + * additionally contains entries for keys with the subpattern name. + * + * If the pattern contains duplicate named subpatterns, only the rightmost + * subpattern is stored in $matches[NAME]. + * + * + * + * ]]> + * + * The above example will output: + * + * + * [1] => bar + * ) + * ]]> + * + * + * + * The above example will output: + * + * Orders results so that $matches[0] is an array of first set + * of matches, $matches[1] is an array of second set of matches, + * and so on. + * + * + * + * ]]> + * + * The above example will output: + * + * example: , example: + * this is a test, this is a test + * ]]> + * + * + * + * The above example will output: + * + * If this flag is passed, for every occurring match the appendant string + * offset will also be returned. Note that this changes the value of + * matches into an array of arrays where every element is an + * array consisting of the matched string at offset 0 + * and its string offset into subject at offset + * 1. + * + * + * + * ]]> + * + * The above example will output: + * + * Array + * ( + * [0] => Array + * ( + * [0] => foobarbaz + * [1] => 0 + * ) + * + * ) + * + * [1] => Array + * ( + * [0] => Array + * ( + * [0] => foo + * [1] => 0 + * ) + * + * ) + * + * [2] => Array + * ( + * [0] => Array + * ( + * [0] => bar + * [1] => 3 + * ) + * + * ) + * + * [3] => Array + * ( + * [0] => Array + * ( + * [0] => baz + * [1] => 6 + * ) + * + * ) + * + * ) + * ]]> + * + * + * + * The above example will output: + * + * If this flag is passed, unmatched subpatterns are reported as NULL; + * otherwise they are reported as an empty string. + * + * If no order flag is given, PREG_PATTERN_ORDER is + * assumed. + * @param int $offset Orders results so that $matches[0] is an array of full + * pattern matches, $matches[1] is an array of strings matched by + * the first parenthesized subpattern, and so on. + * + * + * + * + * ]]> + * + * The above example will output: + * + * example: , this is a test + * example: , this is a test + * ]]> + * + * + * So, $out[0] contains array of strings that matched full pattern, + * and $out[1] contains array of strings enclosed by tags. + * + * + * + * The above example will output: + * + * So, $out[0] contains array of strings that matched full pattern, + * and $out[1] contains array of strings enclosed by tags. + * + * If the pattern contains named subpatterns, $matches + * additionally contains entries for keys with the subpattern name. + * + * If the pattern contains duplicate named subpatterns, only the rightmost + * subpattern is stored in $matches[NAME]. + * + * + * + * ]]> + * + * The above example will output: + * + * + * [1] => bar + * ) + * ]]> + * + * + * + * The above example will output: + * @return int Returns the number of full pattern matches (which might be zero). + * @throws PcreException + * + */ +function preg_match_all(string $pattern, string $subject, array &$matches = null, int $flags = PREG_PATTERN_ORDER, int $offset = 0): int +{ + error_clear_last(); + $result = \preg_match_all($pattern, $subject, $matches, $flags, $offset); + if ($result === false) { + throw PcreException::createFromPhpError(); + } + return $result; +} + + +/** + * Searches subject for a match to the regular + * expression given in pattern. + * + * @param string $pattern The pattern to search for, as a string. + * @param string $subject The input string. + * @param array $matches If matches is provided, then it is filled with + * the results of search. $matches[0] will contain the + * text that matched the full pattern, $matches[1] + * will have the text that matched the first captured parenthesized + * subpattern, and so on. + * @param int $flags flags can be a combination of the following flags: + * + * + * PREG_OFFSET_CAPTURE + * + * + * If this flag is passed, for every occurring match the appendant string + * offset (in bytes) will also be returned. Note that this changes the value of + * matches into an array where every element is an + * array consisting of the matched string at offset 0 + * and its string offset into subject at offset + * 1. + * + * + * + * ]]> + * + * The above example will output: + * + * Array + * ( + * [0] => foobarbaz + * [1] => 0 + * ) + * + * [1] => Array + * ( + * [0] => foo + * [1] => 0 + * ) + * + * [2] => Array + * ( + * [0] => bar + * [1] => 3 + * ) + * + * [3] => Array + * ( + * [0] => baz + * [1] => 6 + * ) + * + * ) + * ]]> + * + * + * + * + * + * + * PREG_UNMATCHED_AS_NULL + * + * + * If this flag is passed, unmatched subpatterns are reported as NULL; + * otherwise they are reported as an empty string. + * + * + * + * ]]> + * + * The above example will output: + * + * + * string(2) "ac" + * [1]=> + * string(1) "a" + * [2]=> + * string(0) "" + * [3]=> + * string(1) "c" + * } + * array(4) { + * [0]=> + * string(2) "ac" + * [1]=> + * string(1) "a" + * [2]=> + * NULL + * [3]=> + * string(1) "c" + * } + * ]]> + * + * + * + * + * + * + * + * If this flag is passed, for every occurring match the appendant string + * offset (in bytes) will also be returned. Note that this changes the value of + * matches into an array where every element is an + * array consisting of the matched string at offset 0 + * and its string offset into subject at offset + * 1. + * + * + * + * ]]> + * + * The above example will output: + * + * Array + * ( + * [0] => foobarbaz + * [1] => 0 + * ) + * + * [1] => Array + * ( + * [0] => foo + * [1] => 0 + * ) + * + * [2] => Array + * ( + * [0] => bar + * [1] => 3 + * ) + * + * [3] => Array + * ( + * [0] => baz + * [1] => 6 + * ) + * + * ) + * ]]> + * + * + * + * The above example will output: + * + * If this flag is passed, unmatched subpatterns are reported as NULL; + * otherwise they are reported as an empty string. + * + * + * + * ]]> + * + * The above example will output: + * + * + * string(2) "ac" + * [1]=> + * string(1) "a" + * [2]=> + * string(0) "" + * [3]=> + * string(1) "c" + * } + * array(4) { + * [0]=> + * string(2) "ac" + * [1]=> + * string(1) "a" + * [2]=> + * NULL + * [3]=> + * string(1) "c" + * } + * ]]> + * + * + * + * The above example will output: + * @param int $offset If this flag is passed, for every occurring match the appendant string + * offset (in bytes) will also be returned. Note that this changes the value of + * matches into an array where every element is an + * array consisting of the matched string at offset 0 + * and its string offset into subject at offset + * 1. + * + * + * + * ]]> + * + * The above example will output: + * + * Array + * ( + * [0] => foobarbaz + * [1] => 0 + * ) + * + * [1] => Array + * ( + * [0] => foo + * [1] => 0 + * ) + * + * [2] => Array + * ( + * [0] => bar + * [1] => 3 + * ) + * + * [3] => Array + * ( + * [0] => baz + * [1] => 6 + * ) + * + * ) + * ]]> + * + * + * + * The above example will output: + * @return int preg_match returns 1 if the pattern + * matches given subject, 0 if it does not. + * @throws PcreException + * + */ +function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int +{ + error_clear_last(); + $result = \preg_match($pattern, $subject, $matches, $flags, $offset); + if ($result === false) { + throw PcreException::createFromPhpError(); + } + return $result; +} + + +/** + * Split the given string by a regular expression. + * + * @param string $pattern The pattern to search for, as a string. + * @param string $subject The input string. + * @param int|null $limit If specified, then only substrings up to limit + * are returned with the rest of the string being placed in the last + * substring. A limit of -1 or 0 means "no limit" + * and, as is standard across PHP, you can use NULL to skip to the + * flags parameter. + * @param int $flags flags can be any combination of the following + * flags (combined with the | bitwise operator): + * + * + * PREG_SPLIT_NO_EMPTY + * + * + * If this flag is set, only non-empty pieces will be returned by + * preg_split. + * + * + * + * + * PREG_SPLIT_DELIM_CAPTURE + * + * + * If this flag is set, parenthesized expression in the delimiter pattern + * will be captured and returned as well. + * + * + * + * + * PREG_SPLIT_OFFSET_CAPTURE + * + * + * If this flag is set, for every occurring match the appendant string + * offset will also be returned. Note that this changes the return + * value in an array where every element is an array consisting of the + * matched string at offset 0 and its string offset + * into subject at offset 1. + * + * + * + * + * + * If this flag is set, for every occurring match the appendant string + * offset will also be returned. Note that this changes the return + * value in an array where every element is an array consisting of the + * matched string at offset 0 and its string offset + * into subject at offset 1. + * @return array Returns an array containing substrings of subject + * split along boundaries matched by pattern. + * @throws PcreException + * + */ +function preg_split(string $pattern, string $subject, ?int $limit = -1, int $flags = 0): array +{ + error_clear_last(); + $result = \preg_split($pattern, $subject, $limit, $flags); + if ($result === false) { + throw PcreException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/pdf.php b/vendor/thecodingmachine/safe/generated/pdf.php new file mode 100644 index 00000000..d039b27a --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/pdf.php @@ -0,0 +1,1553 @@ + + * ]]> + * + * + * + * @param string $prompt The prompt message. + * @param callable $callback The callback function takes one parameter; the + * user input returned. + * @throws ReadlineException + * + */ +function readline_callback_handler_install(string $prompt, callable $callback): void +{ + error_clear_last(); + $result = \readline_callback_handler_install($prompt, $callback); + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} + + +/** + * This function clears the entire command line history. + * + * @throws ReadlineException + * + */ +function readline_clear_history(): void +{ + error_clear_last(); + $result = \readline_clear_history(); + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} + + +/** + * This function registers a completion function. This is the same kind of + * functionality you'd get if you hit your tab key while using Bash. + * + * @param callable $function You must supply the name of an existing function which accepts a + * partial command line and returns an array of possible matches. + * @throws ReadlineException + * + */ +function readline_completion_function(callable $function): void +{ + error_clear_last(); + $result = \readline_completion_function($function); + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} + + +/** + * This function reads a command history from a file. + * + * @param string $filename Path to the filename containing the command history. + * @throws ReadlineException + * + */ +function readline_read_history(string $filename = null): void +{ + error_clear_last(); + if ($filename !== null) { + $result = \readline_read_history($filename); + } else { + $result = \readline_read_history(); + } + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} + + +/** + * This function writes the command history to a file. + * + * @param string $filename Path to the saved file. + * @throws ReadlineException + * + */ +function readline_write_history(string $filename = null): void +{ + error_clear_last(); + if ($filename !== null) { + $result = \readline_write_history($filename); + } else { + $result = \readline_write_history(); + } + if ($result === false) { + throw ReadlineException::createFromPhpError(); + } +} diff --git a/vendor/thecodingmachine/safe/generated/rrd.php b/vendor/thecodingmachine/safe/generated/rrd.php new file mode 100644 index 00000000..9bb3b5c5 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/rrd.php @@ -0,0 +1,23 @@ + + * + * + * This will output "There are 5 monkeys in the tree". But + * imagine we are creating a format string in a separate file, + * commonly because we would like to internationalize it and we + * rewrite it as: + * + * Argument swapping + * + * + * ]]> + * + * + * We now have a problem. The order of the placeholders in the + * format string does not match the order of the arguments in the + * code. We would like to leave the code as is and simply indicate + * in the format string which arguments the placeholders refer to. + * We would write the format string like this instead: + * + * Argument swapping + * + * + * ]]> + * + * + * An added benefit here is that you can repeat the placeholders without + * adding more arguments in the code. For example: + * + * Argument swapping + * + * + * ]]> + * + * + * When using argument swapping, the n$ + * position specifier must come immediately + * after the percent sign (%), before any other + * specifiers, as shown in the example below. + * + * Specifying padding character + * + * + * ]]> + * + * The above example will output: + * + * + * + * + * + * Position specifier with other specifiers + * + * + * ]]> + * + * The above example will output: + * + * + * + * + * + * The above example will output: + * + * The above example will output: + * + * Attempting to use a position specifier greater than + * PHP_INT_MAX will result in + * sprintf generating warnings. + * + * The c type specifier ignores padding and width + * @param mixed $params + * @return string Returns a string produced according to the formatting string + * format. + * @throws StringsException + * + */ +function sprintf(string $format, ...$params): string +{ + error_clear_last(); + if ($params !== []) { + $result = \sprintf($format, ...$params); + } else { + $result = \sprintf($format); + } + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the portion of string specified by the + * start and length parameters. + * + * @param string $string The input string. Must be one character or longer. + * @param int $start If start is non-negative, the returned string + * will start at the start'th position in + * string, counting from zero. For instance, + * in the string 'abcdef', the character at + * position 0 is 'a', the + * character at position 2 is + * 'c', and so forth. + * + * If start is negative, the returned string + * will start at the start'th character + * from the end of string. + * + * If string is less than + * start characters long, FALSE will be returned. + * + * + * Using a negative start + * + * + * ]]> + * + * + * @param int $length If length is given and is positive, the string + * returned will contain at most length characters + * beginning from start (depending on the length of + * string). + * + * If length is given and is negative, then that many + * characters will be omitted from the end of string + * (after the start position has been calculated when a + * start is negative). If + * start denotes the position of this truncation or + * beyond, FALSE will be returned. + * + * If length is given and is 0, + * FALSE or NULL, an empty string will be returned. + * + * If length is omitted, the substring starting from + * start until the end of the string will be + * returned. + * @return string Returns the extracted part of string;, or + * an empty string. + * @throws StringsException + * + */ +function substr(string $string, int $start, int $length = null): string +{ + error_clear_last(); + if ($length !== null) { + $result = \substr($string, $start, $length); + } else { + $result = \substr($string, $start); + } + if ($result === false) { + throw StringsException::createFromPhpError(); + } + return $result; +} diff --git a/vendor/thecodingmachine/safe/generated/swoole.php b/vendor/thecodingmachine/safe/generated/swoole.php new file mode 100644 index 00000000..f9945b67 --- /dev/null +++ b/vendor/thecodingmachine/safe/generated/swoole.php @@ -0,0 +1,108 @@ +=7.1", + "ext-simplexml": "*", + "phpoffice/phpspreadsheet": "^1.4", + "ext-json": "^1.5", + "symfony/console": "^4.1.4", + "symfony/process": "^4.1", + "symfony/finder": "^4.1" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "phpstan/phpstan": "^0.10.3", + "thecodingmachine/phpstan-strict-rules": "^0.10.3", + "squizlabs/php_codesniffer": "^3.2", + "php-coveralls/php-coveralls": "^2.1" + }, + "scripts": { + "phpstan": "phpstan analyse src -c phpstan.neon --level=7 --no-progress -vvv", + "cs-fix": "phpcbf", + "cs-check": "phpcs" + }, + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + } +} diff --git a/vendor/thecodingmachine/safe/generator/composer.lock b/vendor/thecodingmachine/safe/generator/composer.lock new file mode 100644 index 00000000..a780b445 --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/composer.lock @@ -0,0 +1,3607 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "d01dc0158d9e2e1781ace6274eb92d29", + "packages": [ + { + "name": "markbaker/complex", + "version": "1.4.7", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "shasum": "" + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", + "phpcompatibility/php-compatibility": "^8.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "time": "2018-10-13T23:28:42+00:00" + }, + { + "name": "markbaker/matrix", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "6ea97472b5baf12119b4f31f802835b820dd6d64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/6ea97472b5baf12119b4f31f802835b820dd6d64", + "reference": "6ea97472b5baf12119b4f31f802835b820dd6d64", + "shasum": "" + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", + "phpcompatibility/php-compatibility": "^8.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "time": "2018-11-04T22:12:12+00:00" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "bf00f0cc5f55c354018f9a9ef15e6e3e1a229051" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/bf00f0cc5f55c354018f9a9ef15e6e3e1a229051", + "reference": "bf00f0cc5f55c354018f9a9ef15e6e3e1a229051", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "markbaker/complex": "^1.4", + "markbaker/matrix": "^1.1", + "php": "^5.6|^7.0", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "^1.0.0", + "dompdf/dompdf": "^0.8.0", + "friendsofphp/php-cs-fixer": "@stable", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^7.0.0", + "phpcompatibility/php-compatibility": "^8.0", + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.3", + "tecnickcom/tcpdf": "^6.2" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + }, + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "time": "2019-01-02T04:42:54+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "symfony/console", + "version": "v4.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522", + "reference": "b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2019-01-04T15:13:53+00:00" + }, + { + "name": "symfony/contracts", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/contracts.git", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "psr/cache": "^1.0", + "psr/container": "^1.0" + }, + "suggest": { + "psr/cache": "When using the Cache contracts", + "psr/container": "When using the Service contracts", + "symfony/cache-contracts-implementation": "", + "symfony/service-contracts-implementation": "", + "symfony/translation-contracts-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2018-12-05T08:06:11+00:00" + }, + { + "name": "symfony/finder", + "version": "v4.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "9094d69e8c6ee3fe186a0ec5a4f1401e506071ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/9094d69e8c6ee3fe186a0ec5a4f1401e506071ce", + "reference": "9094d69e8c6ee3fe186a0ec5a4f1401e506071ce", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2019-01-03T09:07:35+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + }, + { + "name": "symfony/process", + "version": "v4.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "ea043ab5d8ed13b467a9087d81cb876aee7f689a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/ea043ab5d8ed13b467a9087d81cb876aee7f689a", + "reference": "ea043ab5d8ed13b467a9087d81cb876aee7f689a", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2019-01-03T14:48:52+00:00" + } + ], + "packages-dev": [ + { + "name": "composer/xdebug-handler", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "d17708133b6c276d6e42ef887a877866b909d892" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/d17708133b6c276d6e42ef887a877866b909d892", + "reference": "d17708133b6c276d6e42ef887a877866b909d892", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "time": "2019-01-28T20:25:53+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2017-07-22T11:58:36+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22T15:46:56+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "9f83dded91781a01c63574e387eaa769be769115" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2018-12-04T20:46:45+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "1.2", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "75c7effcf3f77501d0e0caa75111aff4daa0dd48" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/75c7effcf3f77501d0e0caa75111aff4daa0dd48", + "reference": "75c7effcf3f77501d0e0caa75111aff4daa0dd48", + "shasum": "" + }, + "require": { + "ocramius/package-versions": "^1.2.0", + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "time": "2018-06-13T13:22:40+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2018-06-11T23:09:50+00:00" + }, + { + "name": "nette/bootstrap", + "version": "v2.4.6", + "source": { + "type": "git", + "url": "https://github.com/nette/bootstrap.git", + "reference": "268816e3f1bb7426c3a4ceec2bd38a036b532543" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/bootstrap/zipball/268816e3f1bb7426c3a4ceec2bd38a036b532543", + "reference": "268816e3f1bb7426c3a4ceec2bd38a036b532543", + "shasum": "" + }, + "require": { + "nette/di": "~2.4.7", + "nette/utils": "~2.4", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "latte/latte": "~2.2", + "nette/application": "~2.3", + "nette/caching": "~2.3", + "nette/database": "~2.3", + "nette/forms": "~2.3", + "nette/http": "~2.4.0", + "nette/mail": "~2.3", + "nette/robot-loader": "^2.4.2 || ^3.0", + "nette/safe-stream": "~2.2", + "nette/security": "~2.3", + "nette/tester": "~2.0", + "tracy/tracy": "^2.4.1" + }, + "suggest": { + "nette/robot-loader": "to use Configurator::createRobotLoader()", + "tracy/tracy": "to use Configurator::enableTracy()" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.", + "homepage": "https://nette.org", + "keywords": [ + "bootstrapping", + "configurator", + "nette" + ], + "time": "2018-05-17T12:52:20+00:00" + }, + { + "name": "nette/di", + "version": "v2.4.15", + "source": { + "type": "git", + "url": "https://github.com/nette/di.git", + "reference": "d0561b8f77e8ef2ed6d83328860e16c81a5a8649" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/di/zipball/d0561b8f77e8ef2ed6d83328860e16c81a5a8649", + "reference": "d0561b8f77e8ef2ed6d83328860e16c81a5a8649", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "nette/neon": "^2.3.3 || ~3.0.0", + "nette/php-generator": "^2.6.1 || ^3.0.0", + "nette/utils": "^2.5.0 || ~3.0.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/bootstrap": "<2.4", + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP 7.1 features.", + "homepage": "https://nette.org", + "keywords": [ + "compiled", + "di", + "dic", + "factory", + "ioc", + "nette", + "static" + ], + "time": "2019-01-30T13:26:05+00:00" + }, + { + "name": "nette/finder", + "version": "v2.4.2", + "source": { + "type": "git", + "url": "https://github.com/nette/finder.git", + "reference": "ee951a656cb8ac622e5dd33474a01fd2470505a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/finder/zipball/ee951a656cb8ac622e5dd33474a01fd2470505a0", + "reference": "ee951a656cb8ac622e5dd33474a01fd2470505a0", + "shasum": "" + }, + "require": { + "nette/utils": "~2.4", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🔍 Nette Finder: find files and directories with an intuitive API.", + "homepage": "https://nette.org", + "keywords": [ + "filesystem", + "glob", + "iterator", + "nette" + ], + "time": "2018-06-28T11:49:23+00:00" + }, + { + "name": "nette/neon", + "version": "v2.4.3", + "source": { + "type": "git", + "url": "https://github.com/nette/neon.git", + "reference": "5e72b1dd3e2d34f0863c5561139a19df6a1ef398" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/neon/zipball/5e72b1dd3e2d34f0863c5561139a19df6a1ef398", + "reference": "5e72b1dd3e2d34f0863c5561139a19df6a1ef398", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "ext-json": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🍸 Nette NEON: encodes and decodes NEON file format.", + "homepage": "http://ne-on.org", + "keywords": [ + "export", + "import", + "neon", + "nette", + "yaml" + ], + "time": "2018-03-21T12:12:21+00:00" + }, + { + "name": "nette/php-generator", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/nette/php-generator.git", + "reference": "9de4e093a130f7a1bd175198799ebc0efbac6924" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/php-generator/zipball/9de4e093a130f7a1bd175198799ebc0efbac6924", + "reference": "9de4e093a130f7a1bd175198799ebc0efbac6924", + "shasum": "" + }, + "require": { + "nette/utils": "^2.4.2 || ~3.0.0", + "php": ">=7.1" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 7.3 features.", + "homepage": "https://nette.org", + "keywords": [ + "code", + "nette", + "php", + "scaffolding" + ], + "time": "2018-11-27T19:00:14+00:00" + }, + { + "name": "nette/robot-loader", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/nette/robot-loader.git", + "reference": "fc76c70e740b10f091e502b2e393d0be912f38d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/robot-loader/zipball/fc76c70e740b10f091e502b2e393d0be912f38d4", + "reference": "fc76c70e740b10f091e502b2e393d0be912f38d4", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "nette/finder": "^2.3 || ^3.0", + "nette/utils": "^2.4 || ^3.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.", + "homepage": "https://nette.org", + "keywords": [ + "autoload", + "class", + "interface", + "nette", + "trait" + ], + "time": "2018-08-13T14:19:06+00:00" + }, + { + "name": "nette/utils", + "version": "v2.5.3", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "17b9f76f2abd0c943adfb556e56f2165460b15ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/17b9f76f2abd0c943adfb556e56f2165460b15ce", + "reference": "17b9f76f2abd0c943adfb556e56f2165460b15ce", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize() and toAscii()", + "ext-intl": "for script transliteration in Strings::webalize() and toAscii()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/loader.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "time": "2018-09-18T10:22:16+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.2.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/594bcae1fc0bccd3993d2f0d61a018e26ac2865a", + "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5 || ^7.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2019-01-12T16:31:37+00:00" + }, + { + "name": "ocramius/package-versions", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/PackageVersions.git", + "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/4489d5002c49d55576fa0ba786f42dbb009be46f", + "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0.0", + "php": "^7.1.0" + }, + "require-dev": { + "composer/composer": "^1.6.3", + "ext-zip": "*", + "infection/infection": "^0.7.1", + "phpunit/phpunit": "^7.0.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "time": "2018-02-05T13:05:30+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^2.0", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2018-07-08T19:23:20+00:00" + }, + { + "name": "phar-io/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2018-07-08T19:19:57+00:00" + }, + { + "name": "php-coveralls/php-coveralls", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3b00c229726f892bfdadeaf01ea430ffd04a939d", + "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.0", + "php": "^5.5 || ^7.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", + "symfony/yaml": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/php-coveralls" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "PhpCoveralls\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp", + "role": "Original creator" + }, + { + "name": "Takashi Matsuo", + "email": "tmatsuo@google.com" + }, + { + "name": "Google Inc" + }, + { + "name": "Dariusz Ruminski", + "email": "dariusz.ruminski@gmail.com", + "homepage": "https://github.com/keradus" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2018-05-22T23:11:08+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-08-05T17:53:17+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "0.3.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "2cc49f47c69b023eaf05b48e6529389893b13d74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/2cc49f47c69b023eaf05b48e6529389893b13d74", + "reference": "2cc49f47c69b023eaf05b48e6529389893b13d74", + "shasum": "" + }, + "require": { + "php": "~7.1" + }, + "require-dev": { + "consistence/coding-standard": "^2.0.0", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "phing/phing": "^2.16.0", + "phpstan/phpstan": "^0.10", + "phpunit/phpunit": "^6.3", + "slevomat/coding-standard": "^3.3.0", + "symfony/process": "^3.4 || ^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.3-dev" + } + }, + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "time": "2019-01-14T12:26:23+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "0.10.8", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "4f828460a0276180da76c670a0a6e592e7c38b71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/4f828460a0276180da76c670a0a6e592e7c38b71", + "reference": "4f828460a0276180da76c670a0a6e592e7c38b71", + "shasum": "" + }, + "require": { + "composer/xdebug-handler": "^1.3.0", + "jean85/pretty-package-versions": "^1.0.3", + "nette/bootstrap": "^2.4 || ^3.0", + "nette/di": "^2.4.7 || ^3.0", + "nette/robot-loader": "^3.0.1", + "nette/utils": "^2.4.5 || ^3.0", + "nikic/php-parser": "^4.0.2", + "php": "~7.1", + "phpstan/phpdoc-parser": "^0.3", + "symfony/console": "~3.2 || ~4.0", + "symfony/finder": "~3.2 || ~4.0" + }, + "conflict": { + "symfony/console": "3.4.16 || 4.1.5" + }, + "require-dev": { + "brianium/paratest": "^2.0", + "consistence/coding-standard": "^3.5", + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4", + "ext-gd": "*", + "ext-intl": "*", + "ext-mysqli": "*", + "ext-zip": "*", + "jakub-onderka/php-parallel-lint": "^1.0", + "localheinz/composer-normalize": "~0.9.0", + "phing/phing": "^2.16.0", + "phpstan/phpstan-deprecation-rules": "^0.10.2", + "phpstan/phpstan-php-parser": "^0.10", + "phpstan/phpstan-phpunit": "^0.10", + "phpstan/phpstan-strict-rules": "^0.10", + "phpunit/phpunit": "^7.0", + "slevomat/coding-standard": "^4.7.2", + "squizlabs/php_codesniffer": "^3.3.2" + }, + "bin": [ + "bin/phpstan" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.10-dev" + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": [ + "src/", + "build/PHPStan" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "time": "2019-01-08T09:51:19+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "6.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.1", + "phpunit/php-file-iterator": "^2.0", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.1 || ^4.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "suggest": { + "ext-xdebug": "^2.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2018-10-31T16:06:48+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "050bedf145a257b1ff02746c31894800e5122946" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2018-09-13T20:33:42+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2018-02-01T13:07:23+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18", + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2018-10-30T05:52:18+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "7.5.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "2cb759721e53bc05f56487f628c6b9fbb6c18746" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2cb759721e53bc05f56487f628c6b9fbb6c18746", + "reference": "2cb759721e53bc05f56487f628c6b9fbb6c18746", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.7", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", + "php": "^7.1", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0.1", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.0", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^4.0", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpunit/phpunit-mock-objects": "*" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2019-02-01T05:24:07+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11T07:05:27+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "shasum": "" + }, + "require": { + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2018-07-12T15:12:46+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "366541b989927187c4ca70490a35615d3fef2dce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/366541b989927187c4ca70490a35615d3fef2dce", + "reference": "366541b989927187c4ca70490a35615d3fef2dce", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "time": "2018-06-10T07:54:39+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6fda8ce1974b62b14935adc02a9ed38252eca656", + "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2019-02-01T05:27:49+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2017-04-03T13:19:02+00:00" + }, + { + "name": "sebastian/global-state", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2018-10-04T04:07:39+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "379deb987e26c7cd103a7b387aea178baec96e48" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48", + "reference": "379deb987e26c7cd103a7b387aea178baec96e48", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2018-12-19T23:57:18+00:00" + }, + { + "name": "symfony/config", + "version": "v4.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "a7a7d0a0244cfc82f040729ccf769e6cf55a78fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/a7a7d0a0244cfc82f040729ccf769e6cf55a78fb", + "reference": "a7a7d0a0244cfc82f040729ccf769e6cf55a78fb", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/filesystem": "~3.4|~4.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<3.4" + }, + "require-dev": { + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2019-01-03T09:07:35+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v4.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "c2ffd9a93f2d6c5be2f68a0aa7953cc229f871f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c2ffd9a93f2d6c5be2f68a0aa7953cc229f871f8", + "reference": "c2ffd9a93f2d6c5be2f68a0aa7953cc229f871f8", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2019-01-03T09:07:35+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "backendtea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v4.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "af62b35760fc92c8dbdce659b4eebdfe0e6a0472" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/af62b35760fc92c8dbdce659b4eebdfe0e6a0472", + "reference": "af62b35760fc92c8dbdce659b4eebdfe0e6a0472", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2019-01-03T09:07:35+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "d0aa6c0ea484087927b49fd513383a7d36190ca6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d0aa6c0ea484087927b49fd513383a7d36190ca6", + "reference": "d0aa6c0ea484087927b49fd513383a7d36190ca6", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2019-01-03T09:07:35+00:00" + }, + { + "name": "thecodingmachine/phpstan-strict-rules", + "version": "v0.10.8", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/phpstan-strict-rules.git", + "reference": "663fad8801b24c666f3c695ca6cbbc1cb28776a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/phpstan-strict-rules/zipball/663fad8801b24c666f3c695ca6cbbc1cb28776a9", + "reference": "663fad8801b24c666f3c695ca6cbbc1cb28776a9", + "shasum": "" + }, + "require": { + "php": "^7.1", + "phpstan/phpstan": "^0.10|^0.11" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.10-dev" + } + }, + "autoload": { + "psr-4": { + "TheCodingMachine\\PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com" + } + ], + "description": "A set of additional rules for PHPStan based on best practices followed at TheCodingMachine", + "time": "2019-01-18T08:10:20+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-12-25T11:19:39+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.1", + "ext-simplexml": "*", + "ext-json": "^1.5" + }, + "platform-dev": [] +} diff --git a/vendor/thecodingmachine/safe/generator/config/ignoredFunctions.php b/vendor/thecodingmachine/safe/generator/config/ignoredFunctions.php new file mode 100644 index 00000000..624ded8f --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/config/ignoredFunctions.php @@ -0,0 +1,15 @@ + + + Expressive Skeleton coding standard + + + + + + + + + + src + + + + + + + + \ No newline at end of file diff --git a/vendor/thecodingmachine/safe/generator/phpstan.neon b/vendor/thecodingmachine/safe/generator/phpstan.neon new file mode 100644 index 00000000..323181fc --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/phpstan.neon @@ -0,0 +1,6 @@ +parameters: + ignoreErrors: + - "#subject of function str_replace expects array|string, string|true given#" + - "#createExceptionFile\\(\\) expects string, int|string given#" +includes: + - vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon \ No newline at end of file diff --git a/vendor/thecodingmachine/safe/generator/phpunit.xml.dist b/vendor/thecodingmachine/safe/generator/phpunit.xml.dist new file mode 100644 index 00000000..a0751aed --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/phpunit.xml.dist @@ -0,0 +1,27 @@ + + + + + + ./tests/ + + + + + src + + + + + + + \ No newline at end of file diff --git a/vendor/thecodingmachine/safe/generator/safe.php b/vendor/thecodingmachine/safe/generator/safe.php new file mode 100755 index 00000000..5477a1f2 --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/safe.php @@ -0,0 +1,15 @@ +#!/usr/bin/env php +addCommands([new GenerateCommand()]); +$application->addCommands([new ScanObjectsCommand()]); + +$application->run(); diff --git a/vendor/thecodingmachine/safe/generator/src/ComposerJsonEditor.php b/vendor/thecodingmachine/safe/generator/src/ComposerJsonEditor.php new file mode 100644 index 00000000..24bd028e --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/src/ComposerJsonEditor.php @@ -0,0 +1,30 @@ +path = $_path; + } + + /* + * Detect function which didn't return FALSE on error. + * + * @return bool + */ + public function detectFalsyFunction(): bool + { + $file = file_get_contents($this->path); + + if (preg_match('/&warn\.deprecated\.function-(\d+-\d+-\d+)\.removed-(\d+-\d+-\d+)/', $file, $matches)) { + $removedVersion = $matches[2]; + [$major, $minor] = explode('-', $removedVersion); + if ($major < 7 || ($major == 7 && $minor == 0)) { + // Ignore function if it was removed before PHP 7.1 + return false; + } + } + if (preg_match('/&warn\.removed\.function-(\d+-\d+-\d+)/', $file, $matches) && isset($matches[2])) { + $removedVersion = $matches[2]; + [$major, $minor] = explode('-', $removedVersion); + if ($major < 7 || ($major == 7 && $minor == 0)) { + // Ignore function if it was removed before PHP 7.1 + return false; + } + } + + if (preg_match('/&false;\s+on\s+error/m', $file)) { + return true; + } + if (preg_match('/&false;\s+on\s+failure/m', $file)) { + return true; + } + if (preg_match('/&false;\s+otherwise/m', $file) && !preg_match('/(returns\s+&true;|&true;\s+on\s+success|&true;\s+if)/im', $file)) { + return true; + } + if (preg_match('/may\s+return\s+&false;/m', $file) && !preg_match('/(returns\s+&true;|&true;\s+on\s+success|&true;\s+if)/im', $file)) { + return true; + } + if (preg_match('/&false;\s+if\s+an\s+error\s+occurred/m', $file)) { + return true; + } + if (preg_match('/&return.success;/m', $file)) { + return true; + } + if (preg_match('/&return.nullorfalse;/m', $file)) { + return true; + } + if (preg_match('/&return.falseforfailure;/m', $file)) { + return true; + } + if (preg_match('/&date.datetime.return.modifiedobjectorfalseforfailure;/m', $file)) { + return true; + } + if (preg_match('/ or &false; \\(and generates an error/m', $file)) { + return true; + } + if (preg_match('/&false;\s+if\s+the\s+number\s+of\s+elements\s+for\s+each\s+array\s+isn\'t\s+equal/m', $file)) { + return true; + } + if (preg_match('/If\s+the\s+call\s+fails,\s+it\s+will\s+return\s+&false;/m', $file)) { + return true; + } + + return false; + } + + + /** + * @return \SimpleXMLElement[] + */ + public function getMethodSynopsis(): array + { + /** @var string[] $cleanedFunctions */ + $cleanedFunctions = []; + + $file = \file_get_contents($this->path); + if (!preg_match_all('/<\/?methodsynopsis[\s\S]*?>[\s\S]*?<\/methodsynopsis>/m', $file, $functions, PREG_SET_ORDER, 0)) { + return []; + } + $functions = $this->arrayFlatten($functions); + foreach ($functions as $function) { + $cleaningFunction = \str_replace(['&false;', '&true;', '&null;'], ['false', 'true', 'null'], $function); + $cleaningFunction = preg_replace('/&(.*);/m', '', $cleaningFunction); + if (!\is_string($cleaningFunction)) { + throw new \RuntimeException('Error occured in preg_replace'); + } + $cleanedFunctions[] = $cleaningFunction; + } + $functionObjects = []; + foreach ($cleanedFunctions as $cleanedFunction) { + $functionObject = \simplexml_load_string($cleanedFunction); + if ($functionObject) { + $functionObjects[] = $functionObject; + } + } + return $functionObjects; + } + + /** + * Loads the XML file, resolving all DTD declared entities. + * + * @return \SimpleXMLElement + */ + public function loadAndResolveFile(): \SimpleXMLElement + { + $content = \file_get_contents($this->path); + $strpos = \strpos($content, '?>')+2; + if (!\file_exists(__DIR__.'/../doc/entities/generated.ent')) { + self::buildEntities(); + } + $path = \realpath(__DIR__.'/../doc/entities/generated.ent'); + + + $content = \substr($content, 0, $strpos) + .'' + .\substr($content, $strpos+1); + + echo 'Loading '.$this->path."\n"; + $elem = \simplexml_load_string($content, \SimpleXMLElement::class, LIBXML_DTDLOAD | LIBXML_NOENT); + if ($elem === false) { + throw new \RuntimeException('Invalid XML file for '.$this->path); + } + $elem->registerXPathNamespace('docbook', 'http://docbook.org/ns/docbook'); + + return $elem; + } + + /** + * Returns the module name in Camelcase. + * + * @return string + */ + public function getModule(): string + { + return $this->toCamelCase(\basename(\dirname($this->path, 2))); + } + + private function toCamelCase(string $str): string + { + $tokens = preg_split("/[_ ]+/", $str); + if ($tokens === false) { + throw new \RuntimeException('Unexpected preg_split error'); // @codeCoverageIgnore + } + + $str = ''; + foreach ($tokens as $token) { + $str .= ucfirst($token); + } + + return $str; + } + + /** + * @param mixed[] $array multidimensional string array + * @return string[] + */ + private function arrayFlatten(array $array): array + { + $result = array(); + + foreach ($array as $key => $value) { + if (is_array($value)) { + $result = array_merge($result, $this->arrayFlatten($value)); + } else { + $result[$key] = $value; + } + } + return $result; + } + + public static function buildEntities(): void + { + $file1 = \file_get_contents(__DIR__.'/../doc/doc-en/en/language-defs.ent'); + $file2 = \file_get_contents(__DIR__.'/../doc/doc-en/en/language-snippets.ent'); + $file3 = \file_get_contents(__DIR__.'/../doc/doc-en/en/extensions.ent'); + $file4 = \file_get_contents(__DIR__.'/../doc/doc-en/doc-base/entities/global.ent'); + + $completeFile = $file1 . self::extractXmlHeader($file2) . self::extractXmlHeader($file3) . $file4; + + \file_put_contents(__DIR__.'/../doc/entities/generated.ent', $completeFile); + } + + private static function extractXmlHeader(string $content): string + { + $strpos = strpos($content, '?>')+2; + return substr($content, $strpos); + } +} diff --git a/vendor/thecodingmachine/safe/generator/src/EmptyTypeException.php b/vendor/thecodingmachine/safe/generator/src/EmptyTypeException.php new file mode 100644 index 00000000..cf584eca --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/src/EmptyTypeException.php @@ -0,0 +1,11 @@ +getActiveSheet(); + $sheet->setCellValue('A1', 'Function name'); + $sheet->setCellValue('B1', 'Status'); + + foreach ($protoFunctions as $protoFunction) { + if ($protoFunction) { + if (strpos($protoFunction, '=') === false && strpos($protoFunction, 'json') === false) { + $status = 'classic'; + } elseif (strpos($protoFunction, 'json')) { + $status = 'json'; + } else { + $status = 'opt'; + } + $sheet->setCellValue('A'.$numb, $protoFunction); + $sheet->setCellValue('B'.$numb++, $status); + } + } + $writer = new Xlsx($spreadsheet); + $writer->save($path); + } + + /** + * This function generate an improved php lib function in a php file + * + * @param Method[] $functions + * @param string $path + */ + public function generatePhpFile(array $functions, string $path): void + { + $path = rtrim($path, '/').'/'; + $phpFunctionsByModule = []; + foreach ($functions as $function) { + $writePhpFunction = new WritePhpFunction($function); + $phpFunctionsByModule[$function->getModuleName()][] = $writePhpFunction->getPhpFunctionalFunction(); + } + + foreach ($phpFunctionsByModule as $module => $phpFunctions) { + $lcModule = \lcfirst($module); + $stream = \fopen($path.$lcModule.'.php', 'w'); + if ($stream === false) { + throw new \RuntimeException('Unable to write to '.$path); + } + \fwrite($stream, "getFunctionName(); + }, $functions); + $specialCases = require __DIR__.'/../config/specialCasesFunctions.php'; + return array_merge($functionNames, $specialCases); + } + + + /** + * This function generate a PHP file containing the list of functions we can handle. + * + * @param Method[] $functions + * @param string $path + */ + public function generateFunctionsList(array $functions, string $path): void + { + $functionNames = $this->getFunctionsNameList($functions); + $stream = fopen($path, 'w'); + if ($stream === false) { + throw new \RuntimeException('Unable to write to '.$path); + } + fwrite($stream, "getFunctionsNameList($functions); + $stream = fopen($path, 'w'); + if ($stream === false) { + throw new \RuntimeException('Unable to write to '.$path); + } + fwrite($stream, "# This rector file is replacing all core PHP functions with the equivalent \"safe\" functions +services: + Rector\Rector\Function_\FunctionReplaceRector: + \$oldFunctionToNewFunction: +"); + foreach ($functionNames as $functionName) { + fwrite($stream, ' '.$functionName.": 'Safe\\".$functionName."'\n"); + } + fclose($stream); + } + + + public function createExceptionFile(string $moduleName): void + { + $exceptionName = self::toExceptionName($moduleName); + if (!file_exists(__DIR__.'/../../lib/Exceptions/'.$exceptionName.'.php')) { + \file_put_contents( + __DIR__.'/../../generated/Exceptions/'.$exceptionName.'.php', + <<setName('generate') + ->setDescription('Generates the PHP file with all functions.') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + + $this->rmGenerated(); + // Let's build the DTD necessary to load the XML files. + DocPage::buildEntities(); + $scanner = new Scanner(__DIR__ . '/../doc/doc-en/en/reference/'); + + $paths = $scanner->getFunctionsPaths(); + + [ + 'functions' => $functions, + 'overloadedFunctions' => $overloadedFunctions + ] = $scanner->getMethods($paths); + + $output->writeln('These functions have been ignored and must be dealt with manually: '.\implode(', ', $overloadedFunctions)); + + $fileCreator = new FileCreator(); + //$fileCreator->generateXlsFile($protoFunctions, __DIR__ . '/../generated/lib.xls'); + $fileCreator->generatePhpFile($functions, __DIR__ . '/../../generated/'); + $fileCreator->generateFunctionsList($functions, __DIR__ . '/../../generated/functionsList.php'); + $fileCreator->generateRectorFile($functions, __DIR__ . '/../../rector-migrate.yml'); + + + $modules = []; + foreach ($functions as $function) { + $modules[$function->getModuleName()] = $function->getModuleName(); + } + + foreach ($modules as $moduleName => $foo) { + $fileCreator->createExceptionFile($moduleName); + } + + $this->runCsFix($output); + + // Let's require the generated file to check there is no error. + $files = \glob(__DIR__.'/../../generated/*.php'); + + foreach ($files as $file) { + require($file); + } + + $files = \glob(__DIR__.'/../../generated/Exceptions/*.php'); + + require_once __DIR__.'/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__.'/../../lib/Exceptions/AbstractSafeException.php'; + foreach ($files as $file) { + require($file); + } + + // Finally, let's edit the composer.json file + $output->writeln('Editing composer.json'); + ComposerJsonEditor::editFiles(\array_values($modules)); + } + + private function rmGenerated(): void + { + $exceptions = \glob(__DIR__.'/../../generated/Exceptions/*.php'); + + foreach ($exceptions as $exception) { + \unlink($exception); + } + + $files = \glob(__DIR__.'/../../generated/*.php'); + + foreach ($files as $file) { + \unlink($file); + } + + if (\file_exists(__DIR__.'/../doc/entities/generated.ent')) { + \unlink(__DIR__.'/../doc/entities/generated.ent'); + } + } + + private function runCsFix(OutputInterface $output): void + { + $process = new Process('vendor/bin/phpcbf', __DIR__.'/../..'); + $process->setTimeout(600); + $process->run(function ($type, $buffer) use ($output) { + if (Process::ERR === $type) { + echo $output->write(''.$buffer.''); + } else { + echo $output->write($buffer); + } + }); + } +} diff --git a/vendor/thecodingmachine/safe/generator/src/Method.php b/vendor/thecodingmachine/safe/generator/src/Method.php new file mode 100644 index 00000000..0ff014db --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/src/Method.php @@ -0,0 +1,233 @@ +functionObject = $_functionObject; + $this->rootEntity = $rootEntity; + $this->moduleName = $moduleName; + $this->phpStanFunctionMapReader = $phpStanFunctionMapReader; + } + + public function getFunctionName(): string + { + return $this->functionObject->methodname->__toString(); + } + + public function getReturnType(): string + { + // If the function returns a boolean, since false is for error, true is for success. + // Let's replace this with a "void". + $type = $this->functionObject->type->__toString(); + if ($type === 'bool') { + return 'void'; + } + // Some types are completely weird. For instance, oci_new_collection returns a "OCI-Collection" (with a dash, yup) + if (\strpos($type, '-') !== false) { + return 'mixed'; + } + + return Type::toRootNamespace($type); + } + + /** + * @return Parameter[] + */ + public function getParams(): array + { + if ($this->params === null) { + if (!isset($this->functionObject->methodparam)) { + return []; + } + $phpStanFunction = $this->getPhpStanData(); + $params = []; + $i=1; + foreach ($this->functionObject->methodparam as $param) { + $notes = $this->stripReturnFalseText($this->getStringForXPath("(//docbook:refsect1[@role='parameters']//docbook:varlistentry)[$i]//docbook:note//docbook:para")); + $i++; + + if (preg_match('/This parameter has been removed in PHP (\d+\.\d+\.\d+)/', $notes, $matches)) { + $removedVersion = $matches[1]; + [$major, $minor] = explode('.', $removedVersion); + if ($major < 7 || ($major == 7 && $minor == 0)) { + // Ignore parameter if it was removed before PHP 7.1 + continue; + } + } + + $params[] = new Parameter($param, $phpStanFunction); + } + $this->params = $params; + } + return $this->params; + } + + public function getPhpDoc(): string + { + $str = "/**\n". + implode("\n", array_map(function (string $line) { + return ' * '.ltrim($line); + }, \explode("\n", \strip_tags($this->getDocBlock())))) + ."\n */\n"; + + return $str; + } + + private function getDocBlock(): string + { + $str = $this->stripReturnFalseText($this->getStringForXPath("//docbook:refsect1[@role='description']/docbook:para")); + $str .= "\n\n"; + + $i=1; + foreach ($this->getParams() as $parameter) { + $str .= '@param '.$parameter->getBestType().' $'.$parameter->getParameter().' '; + $str .= $this->getStringForXPath("(//docbook:refsect1[@role='parameters']//docbook:varlistentry)[$i]//docbook:para")."\n"; + $i++; + } + + $bestReturnType = $this->getBestReturnType(); + if ($bestReturnType !== 'void') { + $str .= '@return '.$bestReturnType. ' ' .$this->getReturnDoc()."\n"; + } + + $str .= '@throws '.FileCreator::toExceptionName($this->getModuleName()). "\n"; + + return $str; + } + + private function getReturnDoc(): string + { + $returnDoc = $this->getStringForXPath("//docbook:refsect1[@role='returnvalues']/docbook:para"); + return $this->stripReturnFalseText($returnDoc); + } + + private function stripReturnFalseText(string $string): string + { + $string = \strip_tags($string); + $string = $this->removeString($string, 'or FALSE on failure'); + $string = $this->removeString($string, 'may return FALSE'); + $string = $this->removeString($string, 'and FALSE on failure'); + $string = $this->removeString($string, 'on success, or FALSE otherwise'); + $string = $this->removeString($string, 'or FALSE on error'); + $string = $this->removeString($string, 'or FALSE if an error occurred'); + $string = $this->removeString($string, 'the function will return TRUE, or FALSE otherwise'); + return $string; + } + + /** + * Removes a string, even if the string is split on multiple lines. + * @param string $string + * @param string $search + * @return string + */ + private function removeString(string $string, string $search): string + { + $search = str_replace(' ', '\s+', $search); + $result = preg_replace('/[\s\,]*'.$search.'/m', '', $string); + if ($result === null) { + throw new \RuntimeException('An error occurred while calling preg_replace'); + } + return $result; + } + + private function getStringForXPath(string $xpath): string + { + $paragraphs = $this->rootEntity->xpath($xpath); + if ($paragraphs === false) { + throw new \RuntimeException('Error while performing Xpath request.'); + } + $str = ''; + foreach ($paragraphs as $paragraph) { + $str .= $this->getInnerXml($paragraph)."\n\n"; + } + return trim($str); + } + + private function getBestReturnType(): ?string + { + $phpStanFunction = $this->getPhpStanData(); + // Get the type from PhpStan database first, then from the php doc. + if ($phpStanFunction !== null) { + return Type::toRootNamespace($phpStanFunction->getReturnType()); + } else { + return Type::toRootNamespace($this->getReturnType()); + } + } + + private function getPhpStanData(): ?PhpStanFunction + { + $functionName = $this->getFunctionName(); + if (!$this->phpStanFunctionMapReader->hasFunction($functionName)) { + return null; + } + return $this->phpStanFunctionMapReader->getFunction($functionName); + } + + private function getInnerXml(\SimpleXMLElement $SimpleXMLElement): string + { + $element_name = $SimpleXMLElement->getName(); + $inner_xml = $SimpleXMLElement->asXML(); + if ($inner_xml === false) { + throw new \RuntimeException('Unable to serialize to XML'); + } + $inner_xml = str_replace(['<'.$element_name.'>', ''], '', $inner_xml); + $inner_xml = trim($inner_xml); + return $inner_xml; + } + + public function getModuleName(): string + { + return $this->moduleName; + } + + /** + * The function is overloaded if at least one parameter is optional with no default value and this parameter is not by reference. + * + * @return bool + */ + public function isOverloaded(): bool + { + foreach ($this->getParams() as $parameter) { + if ($parameter->isOptionalWithNoDefault() && !$parameter->isByReference()) { + return true; + } + } + return false; + } + + public function cloneAndRemoveAParameter(): Method + { + $new = clone $this; + $params = $this->getParams(); + \array_pop($params); + $new->params = $params; + return $new; + } +} diff --git a/vendor/thecodingmachine/safe/generator/src/Parameter.php b/vendor/thecodingmachine/safe/generator/src/Parameter.php new file mode 100644 index 00000000..24ff990d --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/src/Parameter.php @@ -0,0 +1,160 @@ +parameter = $parameter; + $this->phpStanFunction = $phpStanFunction; + } + + /** + * Returns the type as declared in the doc. + * @return string + */ + public function getType(): string + { + $type = $this->parameter->type->__toString(); + $strType = Type::toRootNamespace($type); + if ($strType !== 'mixed' && $strType !== 'resource' && $this->phpStanFunction !== null) { + $phpStanParameter = $this->phpStanFunction->getParameter($this->getParameter()); + if ($phpStanParameter) { + // Let's make the parameter nullable if it is by reference and is used only for writing. + if ($phpStanParameter->isWriteOnly()) { + $strType = '?'.$strType; + } + } + } + return $strType; + } + + /** + * Returns the type as declared in the doc. + * @return string + */ + public function getBestType(): string + { + // Get the type from PhpStan database first, then from the php doc. + if ($this->phpStanFunction !== null) { + $phpStanParameter = $this->phpStanFunction->getParameter($this->getParameter()); + if ($phpStanParameter) { + try { + return $phpStanParameter->getType(); + } catch (EmptyTypeException $e) { + // If the type is empty in PHPStan, let's fallback to documentation. + return $this->getType(); + } + } + } + return $this->getType(); + } + + /* + * @return string + */ + public function getParameter(): string + { + if ($this->isVariadic()) { + return 'params'; + } + // The db2_bind_param method has parameters with a dash in it... yep... (patch submitted) + return \str_replace('-', '_', $this->parameter->parameter->__toString()); + } + + public function isByReference(): bool + { + return ((string)$this->parameter->parameter['role']) === 'reference'; + } + + /** + * Some parameters can be optional with no default value. In this case, the function is "overloaded" (which is not + * possible in user-land but possible in core...) + * + * @return bool + */ + public function isOptionalWithNoDefault(): bool + { + if (((string)$this->parameter['choice']) !== 'opt') { + return false; + } + if (!$this->hasDefaultValue()) { + return true; + } + + $initializer = $this->getInitializer(); + // Some default value have weird values. For instance, first parameter of "mb_internal_encoding" has default value "mb_internal_encoding()" + if ($initializer !== 'array()' && strpos($initializer, '(') !== false) { + return true; + } + return false; + } + + public function isVariadic(): bool + { + return $this->parameter->parameter->__toString() === '...'; + } + + public function isNullable(): bool + { + if ($this->phpStanFunction !== null) { + $phpStanParameter = $this->phpStanFunction->getParameter($this->getParameter()); + if ($phpStanParameter) { + return $phpStanParameter->isNullable(); + } + } + return $this->hasDefaultValue() && $this->getDefaultValue() === 'null'; + } + + /* + * @return string + */ + public function getInitializer(): string + { + return \str_replace(['', ''], '', $this->getInnerXml($this->parameter->initializer)); + } + + public function hasDefaultValue(): bool + { + return isset($this->parameter->initializer); + } + + public function getDefaultValue(): ?string + { + if (!$this->hasDefaultValue()) { + return null; + } + + $initializer = $this->getInitializer(); + + // Some default value have weird values. For instance, first parameter of "mb_internal_encoding" has default value "mb_internal_encoding()" + if (strpos($initializer, '(') !== false) { + return null; + } + + return $initializer; + } + + private function getInnerXml(\SimpleXMLElement $SimpleXMLElement): string + { + $element_name = $SimpleXMLElement->getName(); + $inner_xml = $SimpleXMLElement->asXML(); + if ($inner_xml === false) { + throw new \RuntimeException('Unable to serialize to XML'); + } + $inner_xml = str_replace(['<'.$element_name.'>', '', '<'.$element_name.'/>'], '', $inner_xml); + $inner_xml = trim($inner_xml); + return $inner_xml; + } +} diff --git a/vendor/thecodingmachine/safe/generator/src/PhpStanFunctions/PhpStanFunction.php b/vendor/thecodingmachine/safe/generator/src/PhpStanFunctions/PhpStanFunction.php new file mode 100644 index 00000000..7edd6ec6 --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/src/PhpStanFunctions/PhpStanFunction.php @@ -0,0 +1,53 @@ +returnType = \array_shift($signature); + foreach ($signature as $name => $type) { + $param = new PhpStanParameter($name, $type); + $this->parameters[$param->getName()] = $param; + } + } + + /** + * @return string + */ + public function getReturnType(): string + { + if ($this->returnType === 'bool') { + $this->returnType = 'void'; + } + return \str_replace(['|bool', '|false'], '', $this->returnType); + } + + /** + * @return array + */ + public function getParameters(): array + { + return $this->parameters; + } + + public function getParameter(string $name): ?PhpStanParameter + { + return $this->parameters[$name] ?? null; + } +} diff --git a/vendor/thecodingmachine/safe/generator/src/PhpStanFunctions/PhpStanFunctionMapReader.php b/vendor/thecodingmachine/safe/generator/src/PhpStanFunctions/PhpStanFunctionMapReader.php new file mode 100644 index 00000000..db42757c --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/src/PhpStanFunctions/PhpStanFunctionMapReader.php @@ -0,0 +1,27 @@ + + */ + private $functionMap; + + public function __construct() + { + $this->functionMap = require __DIR__.'/../../vendor/phpstan/phpstan/src/Reflection/SignatureMap/functionMap.php'; + } + + public function hasFunction(string $functionName): bool + { + return isset($this->functionMap[$functionName]); + } + + public function getFunction(string $functionName): PhpStanFunction + { + return new PhpStanFunction($this->functionMap[$functionName]); + } +} diff --git a/vendor/thecodingmachine/safe/generator/src/PhpStanFunctions/PhpStanParameter.php b/vendor/thecodingmachine/safe/generator/src/PhpStanFunctions/PhpStanParameter.php new file mode 100644 index 00000000..57cea136 --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/src/PhpStanFunctions/PhpStanParameter.php @@ -0,0 +1,124 @@ +optional = true; + } + if (\strpos($name, '...') !== false) { + $this->variadic = true; + } + if (\strpos($name, '&') !== false) { + $this->byReference = true; + } + if (\strpos($name, '&w_') !== false) { + $this->writeOnly = true; + } + $name = \str_replace(['&rw_', '&w_'], '', $name); + $name = trim($name, '=.&'); + + $this->name = $name; + + if (\strpos($type, '?') !== false) { + $type = \str_replace('?', '', $type).'|null'; + $this->nullable = true; + } + + $this->type = $type; + } + + /** + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * @return string + */ + public function getType(): string + { + return Type::toRootNamespace($this->type); + } + + /** + * @return bool + */ + public function isOptional(): bool + { + return $this->optional; + } + + /** + * @return bool + */ + public function isVariadic(): bool + { + return $this->variadic; + } + + /** + * @return bool + */ + public function isByReference(): bool + { + return $this->byReference; + } + + /** + * Whether the parameter is "write only" (applies only to "by reference" parameters) + * @return bool + */ + public function isWriteOnly(): bool + { + return $this->writeOnly; + } + + /** + * @return bool + */ + public function isNullable(): bool + { + return $this->nullable; + } +} diff --git a/vendor/thecodingmachine/safe/generator/src/ScanObjectsCommand.php b/vendor/thecodingmachine/safe/generator/src/ScanObjectsCommand.php new file mode 100644 index 00000000..2e3703e1 --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/src/ScanObjectsCommand.php @@ -0,0 +1,38 @@ +setName('scan-objects') + ->setDescription('Displays all methods of all objects not handled yet by Safe.') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $scanner = new Scanner(__DIR__ . '/../doc/doc-en/en/reference/'); + + $paths = $scanner->getMethodsPaths(); + + [ + 'functions' => $functions, + 'overloadedFunctions' => $overloadedFunctions + ] = $scanner->getMethods($paths); + + foreach ($functions as $function) { + $name = $function->getFunctionName(); + $output->writeln('Found method '.$name); + } + + $output->writeln('These methods are overloaded: '.\implode(', ', $overloadedFunctions)); + } +} diff --git a/vendor/thecodingmachine/safe/generator/src/Scanner.php b/vendor/thecodingmachine/safe/generator/src/Scanner.php new file mode 100644 index 00000000..e53cfffb --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/src/Scanner.php @@ -0,0 +1,124 @@ +path = $path; + } + + /** + * @return array + */ + public function getFunctionsPaths(): array + { + $finder = new Finder(); + $finder->in($this->path.'*/functions/')->name('*.xml')->sortByName(); + + return iterator_to_array($finder); + } + + /** + * @return array + */ + public function getMethodsPaths(): array + { + $finder = new Finder(); + $finder->in($this->path)->notPath('functions')->name('*.xml')->sortByName(); + + return iterator_to_array($finder); + } + + private $ignoredFunctions; + + /** + * Returns the list of functions that must be ignored. + * @return string[] + */ + private function getIgnoredFunctions(): array + { + if ($this->ignoredFunctions === null) { + $ignoredFunctions = require __DIR__.'/../config/ignoredFunctions.php'; + $specialCaseFunctions = require __DIR__.'/../config/specialCasesFunctions.php'; + + $this->ignoredFunctions = array_merge($ignoredFunctions, $specialCaseFunctions); + } + return $this->ignoredFunctions; + } + + private $ignoredModules; + + /** + * Returns the list of modules that must be ignored. + * @return string[] + */ + private function getIgnoredModules(): array + { + if ($this->ignoredModules === null) { + $this->ignoredModules = require __DIR__.'/../config/ignoredModules.php'; + } + return $this->ignoredModules; + } + + /** + * @param SplFileInfo[] $paths + * @return mixed[] Structure: ['functions'=>Method[], 'overloadedFunctions'=>string[]] + */ + public function getMethods(array $paths): array + { + $functions = []; + $overloadedFunctions = []; + + $phpStanFunctionMapReader = new PhpStanFunctionMapReader(); + $ignoredFunctions = $this->getIgnoredFunctions(); + $ignoredFunctions = \array_combine($ignoredFunctions, $ignoredFunctions); + $ignoredModules = $this->getIgnoredModules(); + $ignoredModules = \array_combine($ignoredModules, $ignoredModules); + foreach ($paths as $path) { + $module = \basename(\dirname($path, 2)); + if (isset($ignoredModules[$module])) { + continue; + } + + $docPage = new DocPage($path); + if ($docPage->detectFalsyFunction()) { + $functionObjects = $docPage->getMethodSynopsis(); + if (count($functionObjects) > 1) { + $overloadedFunctions = array_merge($overloadedFunctions, \array_map(function ($functionObject) { + return $functionObject->methodname->__toString(); + }, $functionObjects)); + $overloadedFunctions = \array_filter($overloadedFunctions, function (string $functionName) use ($ignoredFunctions) { + return !isset($ignoredFunctions[$functionName]); + }); + continue; + } + $rootEntity = $docPage->loadAndResolveFile(); + foreach ($functionObjects as $functionObject) { + $function = new Method($functionObject, $rootEntity, $docPage->getModule(), $phpStanFunctionMapReader); + if (isset($ignoredFunctions[$function->getFunctionName()])) { + continue; + } + $functions[] = $function; + } + } + } + + return [ + 'functions' => $functions, + 'overloadedFunctions' => \array_unique($overloadedFunctions) + ]; + } +} diff --git a/vendor/thecodingmachine/safe/generator/src/Type.php b/vendor/thecodingmachine/safe/generator/src/Type.php new file mode 100644 index 00000000..5073fc1e --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/src/Type.php @@ -0,0 +1,42 @@ +method = $method; + } + + /* + * @return string + */ + public function getPhpPrototypeFunction(): string + { + if ($this->method->getFunctionName()) { + return 'function '.$this->method->getFunctionName().'('.$this->displayParamsWithType($this->method->getParams()).')'.': '.$this->method->getReturnType().'{}'; + } + return ''; + } + + /* + * return string + */ + public function getPhpFunctionalFunction(): string + { + if ($this->getPhpPrototypeFunction()) { + return $this->writePhpFunction(); + } + return ''; + } + + /* + * return string + */ + private function writePhpFunction(): string + { + $phpFunction = $this->method->getPhpDoc(); + if ($this->method->getReturnType() !== 'mixed' && $this->method->getReturnType() !== 'resource') { + $returnType = ': ' . $this->method->getReturnType(); + } else { + $returnType = ''; + } + $returnStatement = ''; + if ($this->method->getReturnType() !== 'void') { + $returnStatement = " return \$result;\n"; + } + $moduleName = $this->method->getModuleName(); + + $phpFunction .= "function {$this->method->getFunctionName()}({$this->displayParamsWithType($this->method->getParams())}){$returnType} +{ + error_clear_last(); +"; + + if (!$this->method->isOverloaded()) { + $phpFunction .= ' $result = '.$this->printFunctionCall($this->method); + } else { + $method = $this->method; + $inElse = false; + do { + $lastParameter = $method->getParams()[count($method->getParams())-1]; + if ($inElse) { + $phpFunction .= ' else'; + } else { + $phpFunction .= ' '; + } + if ($lastParameter->isVariadic()) { + $defaultValueToString = '[]'; + } else { + $defaultValue = $lastParameter->getDefaultValue(); + $defaultValueToString = $this->defaultValueToString($defaultValue); + } + $phpFunction .= 'if ($'.$lastParameter->getParameter().' !== '.$defaultValueToString.') {'."\n"; + $phpFunction .= ' $result = '.$this->printFunctionCall($method)."\n"; + $phpFunction .= ' }'; + $inElse = true; + $method = $method->cloneAndRemoveAParameter(); + if (!$method->isOverloaded()) { + break; + } + } while (true); + $phpFunction .= 'else {'."\n"; + $phpFunction .= ' $result = '.$this->printFunctionCall($method)."\n"; + $phpFunction .= ' }'; + } + + $phpFunction .= $this->generateExceptionCode($moduleName, $this->method).$returnStatement. '} + +'; + + return $phpFunction; + } + + private function generateExceptionCode(string $moduleName, Method $method) : string + { + // Special case for CURL: we need the first argument of the method if this is a resource. + if ($moduleName === 'Curl') { + $params = $method->getParams(); + if (\count($params) > 0 && $params[0]->getParameter() === 'ch') { + return " + if (\$result === false) { + throw CurlException::createFromCurlResource(\$ch); + } +"; + } + } + + $exceptionName = FileCreator::toExceptionName($moduleName); + return " + if (\$result === false) { + throw {$exceptionName}::createFromPhpError(); + } +"; + } + + /** + * @param Parameter[] $params + * @return string + */ + private function displayParamsWithType(array $params): string + { + $paramsAsString = []; + $optDetected = false; + + foreach ($params as $param) { + $paramAsString = ''; + if ($param->getType() !== 'mixed' && $param->getType() !== 'resource') { + if ($param->isNullable()) { + $paramAsString .= '?'; + } + $paramAsString .= $param->getType().' '; + } + + $paramName = $param->getParameter(); + if ($param->isVariadic()) { + $paramAsString .= ' ...$'.$paramName; + } else { + if ($param->isByReference()) { + $paramAsString .= '&'; + } + $paramAsString .= '$'.$paramName; + } + + + if ($param->hasDefaultValue() || $param->isOptionalWithNoDefault()) { + $optDetected = true; + } + $defaultValue = $param->getDefaultValue(); + if ($defaultValue !== null) { + $paramAsString .= ' = '.$this->defaultValueToString($defaultValue); + } elseif ($optDetected && !$param->isVariadic()) { + $paramAsString .= ' = null'; + } + $paramsAsString[] = $paramAsString; + } + + return implode(', ', $paramsAsString); + } + + private function printFunctionCall(Method $function): string + { + $functionCall = '\\'.$function->getFunctionName().'('; + $functionCall .= implode(', ', \array_map(function (Parameter $parameter) { + $str = ''; + if ($parameter->isVariadic()) { + $str = '...'; + } + return $str.'$'.$parameter->getParameter(); + }, $function->getParams())); + $functionCall .= ');'; + return $functionCall; + } + + private function defaultValueToString(?string $defaultValue): string + { + if ($defaultValue === null) { + return 'null'; + } + if ($defaultValue === '') { + return "''"; + } + return $defaultValue; + } +} diff --git a/vendor/thecodingmachine/safe/generator/tests/DocPageTest.php b/vendor/thecodingmachine/safe/generator/tests/DocPageTest.php new file mode 100644 index 00000000..d3f844ab --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/tests/DocPageTest.php @@ -0,0 +1,28 @@ +assertTrue($pregMatch->detectFalsyFunction()); + $this->assertFalse($implode->detectFalsyFunction()); + $this->assertTrue($getCwd->detectFalsyFunction()); + $this->assertTrue($setTime->detectFalsyFunction()); + $this->assertTrue($filesize->detectFalsyFunction()); + $this->assertFalse($sessionRegister->detectFalsyFunction()); + $this->assertTrue($mcryptDecrypt->detectFalsyFunction()); + $this->assertTrue($fsockopen->detectFalsyFunction()); + } +} diff --git a/vendor/thecodingmachine/safe/generator/tests/GeneratedFilesTest.php b/vendor/thecodingmachine/safe/generator/tests/GeneratedFilesTest.php new file mode 100644 index 00000000..ab9aa57e --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/tests/GeneratedFilesTest.php @@ -0,0 +1,142 @@ +assertSame('foo', sprintf('foo')); + $this->assertSame('foobar', sprintf('foo%s', 'bar')); + $this->assertSame('foobarbaz', sprintf('foo%s%s', 'bar', 'baz')); + + set_error_handler(function () { + }); + try { + $this->expectException(StringsException::class); + sprintf('foo%s%s', 'bar'); + } finally { + restore_error_handler(); + } + } + + public function testPregMatch() + { + require_once __DIR__ . '/../../generated/pcre.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../lib/Exceptions/PcreException.php'; + + + $url = 'https://open.spotify.com/track/0nCqpKBrvDchO1BIvt7DTR?si=iLUKDfkLSy-IpnLA7qImnw'; + $spotifyRegex = "/https?:\/\/(?:embed\.|open\.)(?:spotify\.com\/)(?:track\/|\?uri=spotify:track:)((\w|-){22})/"; + preg_match($spotifyRegex, $url, $matches); + \preg_match($spotifyRegex, $url, $originalMatches); + $this->assertSame($originalMatches, $matches); + } + + public function testObjects() + { + require_once __DIR__ . '/../../generated/simplexml.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../generated/Exceptions/SimplexmlException.php'; + + $xmlStr = << + + + PHP: Behind the Parser + + +XML; + + $movies = simplexml_load_string($xmlStr); + + $this->assertInstanceOf(SimpleXMLElement::class, $movies); + + $domImplementation = new \DOMImplementation(); + $doc = $domImplementation->createDocument(null, 'foo'); + + $xmlElem = simplexml_import_dom($doc); + $this->assertInstanceOf(SimpleXMLElement::class, $xmlElem); + } + + /** + * Tests that the limit parameter is nullable. + * See https://github.com/thecodingmachine/safe/issues/56 + */ + public function testPregSplit() + { + require_once __DIR__ . '/../../generated/pcre.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../lib/Exceptions/PcreException.php'; + + $keywords = preg_split("/[\s,]+/", "hypertext language, programming", null); + $this->assertSame(['hypertext', 'language', 'programming'], $keywords); + } + + + /** + * Tests that parameters with "time()" default value are correctly handled. + */ + public function testStrtotime() + { + require_once __DIR__ . '/../../generated/datetime.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../generated/Exceptions/DatetimeException.php'; + + $this->assertSame(\strtotime('+1 day'), strtotime('+1 day')); + } + + /** + * Tests that parameters signature can be not passed. See https://github.com/thecodingmachine/safe/issues/86 + */ + public function testOpenSslSign() + { + require_once __DIR__ . '/../../generated/openssl.php'; + require_once __DIR__ . '/../../lib/Exceptions/SafeExceptionInterface.php'; + require_once __DIR__ . '/../../lib/Exceptions/AbstractSafeException.php'; + require_once __DIR__ . '/../../generated/Exceptions/OpensslException.php'; + + \openssl_sign('foo', $signature, file_get_contents(__DIR__ . '/fixtures/id_rsa')); + openssl_sign('foo', $signatureSafe, file_get_contents(__DIR__ . '/fixtures/id_rsa')); + + $this->assertSame($signature, $signatureSafe); + + } + + public function testOpenSslEncrypt() + { + $result = \openssl_encrypt( + 'test', + 'aes-256-cbc', + pack('H*', 'a2e8ccd0e7985cc0b6213a55815a1034afc252980e970ca90e5202689f9473b0'), + \OPENSSL_RAW_DATA, + pack('H*', '123ce954203b7caaaa9da67f59839456')); + + $resultSafe = openssl_encrypt( + 'test', + 'aes-256-cbc', + pack('H*', 'a2e8ccd0e7985cc0b6213a55815a1034afc252980e970ca90e5202689f9473b0'), + \OPENSSL_RAW_DATA, + pack('H*', '123ce954203b7caaaa9da67f59839456')); + + $this->assertSame($result, $resultSafe); + } +} \ No newline at end of file diff --git a/vendor/thecodingmachine/safe/generator/tests/MethodTest.php b/vendor/thecodingmachine/safe/generator/tests/MethodTest.php new file mode 100644 index 00000000..0eb83b72 --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/tests/MethodTest.php @@ -0,0 +1,44 @@ +getMethodSynopsis(); + $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader()); + $name = $method->getFunctionName(); + $this->assertEquals('preg_match', $name); + } + + public function testGetFunctionType() { + $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/pcre/functions/preg-match.xml'); + $xmlObject = $docPage->getMethodSynopsis(); + $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader()); + $type = $method->getReturnType(); + $this->assertEquals('int', $type); + } + + public function testGetFunctionParam() { + $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/pcre/functions/preg-match.xml'); + $xmlObject = $docPage->getMethodSynopsis(); + $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader()); + $params = $method->getParams(); + $this->assertEquals('string', $params[0]->getType()); + $this->assertEquals('pattern', $params[0]->getParameter()); + } + + public function testGetInitializer() { + $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/apc/functions/apc-cache-info.xml'); + $xmlObject = $docPage->getMethodSynopsis(); + $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader()); + + $params = $method->getParams(); + $this->assertEquals('', $params[0]->getDefaultValue()); + } + +} diff --git a/vendor/thecodingmachine/safe/generator/tests/PhpStanFunctions/PhpStanFunctionMapReaderTest.php b/vendor/thecodingmachine/safe/generator/tests/PhpStanFunctions/PhpStanFunctionMapReaderTest.php new file mode 100644 index 00000000..713da061 --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/tests/PhpStanFunctions/PhpStanFunctionMapReaderTest.php @@ -0,0 +1,32 @@ +assertTrue($mapReader->hasFunction('strpos')); + $this->assertFalse($mapReader->hasFunction('foobar')); + } + + public function testGet(): void + { + $mapReader = new PhpStanFunctionMapReader(); + $function = $mapReader->getFunction('apcu_fetch'); + + + // 'apcu_fetch' => ['mixed', 'key'=>'string|string[]', '&w_success='=>'bool'], + $this->assertSame('mixed', $function->getReturnType()); + $parameters = $function->getParameters(); + $this->assertCount(2, $parameters); + $this->assertSame('success', $parameters['success']->getName()); + $this->assertSame('bool', $parameters['success']->getType()); + $this->assertFalse($parameters['success']->isVariadic()); + $this->assertTrue($parameters['success']->isByReference()); + $this->assertTrue($parameters['success']->isOptional()); + } +} diff --git a/vendor/thecodingmachine/safe/generator/tests/ScannerTest.php b/vendor/thecodingmachine/safe/generator/tests/ScannerTest.php new file mode 100644 index 00000000..65babe38 --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/tests/ScannerTest.php @@ -0,0 +1,27 @@ +getFunctionsPaths(); + + $this->assertArrayHasKey(__DIR__.'/../doc/doc-en/en/reference/filesystem/functions/chmod.xml', $paths); + $this->assertArrayNotHasKey(__DIR__.'/../doc/doc-en/en/reference/spl/appenditerator/getarrayiterator.xml', $paths); + } + + public function testGetFunctionsPaths() + { + $scanner = new Scanner(__DIR__ . '/../doc/doc-en/en/reference/'); + $paths = $scanner->getMethodsPaths(); + + $this->assertArrayNotHasKey(__DIR__.'/../doc/doc-en/en/reference/filesystem/functions/chmod.xml', $paths); + $this->assertArrayHasKey(__DIR__.'/../doc/doc-en/en/reference/spl/appenditerator/getarrayiterator.xml', $paths); + } +} diff --git a/vendor/thecodingmachine/safe/generator/tests/SpecialCasesTest.php b/vendor/thecodingmachine/safe/generator/tests/SpecialCasesTest.php new file mode 100644 index 00000000..35474214 --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/tests/SpecialCasesTest.php @@ -0,0 +1,21 @@ +expectException(PcreException::class); + $this->expectExceptionMessage('PREG_BAD_UTF8_ERROR: Invalid UTF8 character'); + preg_replace("/([\s,]+)/u", "foo", "\xc3\x28"); + } +} diff --git a/vendor/thecodingmachine/safe/generator/tests/TypeTest.php b/vendor/thecodingmachine/safe/generator/tests/TypeTest.php new file mode 100644 index 00000000..d2f69e6d --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/tests/TypeTest.php @@ -0,0 +1,16 @@ +assertSame('\\stdClass', Type::toRootNamespace('stdClass')); + $this->assertSame('\\SimpleXMLElement', Type::toRootNamespace('SimpleXMLElement')); + $this->assertSame('bool', Type::toRootNamespace('bool')); + $this->assertSame('int', Type::toRootNamespace('int')); + } +} diff --git a/vendor/thecodingmachine/safe/generator/tests/fixtures/id_rsa b/vendor/thecodingmachine/safe/generator/tests/fixtures/id_rsa new file mode 100644 index 00000000..7d5f0008 --- /dev/null +++ b/vendor/thecodingmachine/safe/generator/tests/fixtures/id_rsa @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAoc4Ay97wfke5L1RLeiUtstzzdiSrzhwdgirjLSUeniEtXI6g +Yj7PxX2rBV6f6a4o9CpkkeoSbj3lA82hkDzc411XVSws+OJ4cz4cc4K5fZ5HLJFA +GpCqgO2ywCXH2pPmse+ACrdX1fPdZPqSyW1M+ZKYUDRAaHjlSsCkR8KSTN8Max2A +4EMsntrWVWiMdOGg5jB7CAAwIz3a6R3gKEmFml2gs77gpYme/bTVERuNW+TCG/x3 +3xUhkdOrvRKPE81K4D6rtCXuBrqfmE8r1vp29yPbjIM6KStKLTCIJHLx1/h34CNj +MXW6d8abQ7KKxAycw4ADwCO4VNhAMxhhyylNGQIDAQABAoIBABBoiaAjDZRgxaDN +FZJfbtDyoyXZ9ipCo6NtofgUCZTTnHwEYrNT11IZulwjCmhyJukL24MIj7HqSO0n +zziHU4cjEhYrEqxymvBk3hHAsfrRMDqOyEdpYEEO2c+uhSPfV8e3l+5+RUQHJO52 +kqgmk2XDvfp0MgvmJqp7+qzkSF3PH2R00c2AdjbPQoFxXv5Tkk7EBWa92pw+81Om +YEK7ch/a5tqqz2AHrcU6P8I7MsqIDLc0AuUg/Xx5Nb9K2phBpQ9Extu1cg3t769C +RR/5gqHRh3QgdaG6PGaGDSpb4ZIxNYdH7DxSVZGtZ/rBCCV8UNFBoiuXemm+QzQ2 +ob8e+/kCgYEA15FgAOTsSINZIFsWnuUTK8vQHTCkf0IL/89vvN8CIvN86Mri2yw8 +n4cQrVKjxBhhCdhu7coLzrMlo9saL9oS14Z43mPtAx6C4ACr5lcFcxcKd4zqoBP7 +YM7TJ6DN9oYd7yWQTPjUJHZXYuuVisqXDMics+rccQrsSdrN7hSFwB8CgYEAwCcn +9SU9BFZ2LnCAmMDve4+xotaxiYJMwkVLr4f/7/fOWxgsmjQUThXNfLMHgFGA0kE2 +tn1Z9axsdlZGkhr7CRQ2gUHhpEldNEKWswoj6I1uKU7fVTPuRQP7FmMYAN0cGtpC +NvQLcQbKI51VDKp6BN1JpDhw4RaWfWAntYOca8cCgYAM65GtfAsNbZHx9oOskl5L +ybN3jGrPlc3ST0SLNXKTVbSu3zopmMUpapb9TG60WiG2zVoYtntusB4ZbBBtvcxT +TqP/8E1MWo/NjTzAWYbiFwdxkuidH5V5f+v3/BNcKz2wD7hOZLuSU+V48FXOM8ZJ +5dw+jF0aCWWQJ6UgF+rMUQKBgQCdnICN+CmAcVsm5GjW4wqMk2TlaKzfWd2UTDq0 +lB0+vEirN7z+D1HIauHOMxsoCbJcw9kY/uDXPsMInePs2+ylmcrLYzquAu9MeoIa +AWtKyRdfEq7luF7shUNjLYz2yGbRL824PZ1U7HjJlbe5V+wWKVzKMvGD738o/8IS +hQ286QKBgQCeIP6DWRAvIYNWs+R1oe5jln8N7SrQUCA2F5AmffBaRU+gLcHHyTBM +VPtwF5uOAU7C7/ZhLe0MuMdVBvHSrfGh4y1qUXj1qu3KKrgF5kohyxlYvmEylDHY +mFgG7Mb6/WmP+RORcAaaIrBg9rAj6v4wdLP5FRcvQY+csP/GmksZXw== +-----END RSA PRIVATE KEY----- diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/AbstractSafeException.php b/vendor/thecodingmachine/safe/lib/Exceptions/AbstractSafeException.php new file mode 100644 index 00000000..2e36f09c --- /dev/null +++ b/vendor/thecodingmachine/safe/lib/Exceptions/AbstractSafeException.php @@ -0,0 +1,14 @@ + 'PREG_INTERNAL_ERROR: Internal error', + PREG_BACKTRACK_LIMIT_ERROR => 'PREG_BACKTRACK_LIMIT_ERROR: Backtrack limit reached', + PREG_RECURSION_LIMIT_ERROR => 'PREG_RECURSION_LIMIT_ERROR: Recursion limit reached', + PREG_BAD_UTF8_ERROR => 'PREG_BAD_UTF8_ERROR: Invalid UTF8 character', + PREG_BAD_UTF8_OFFSET_ERROR => 'PREG_BAD_UTF8_OFFSET_ERROR', + PREG_JIT_STACKLIMIT_ERROR => 'PREG_JIT_STACKLIMIT_ERROR', + ]; + $errMsg = $errorMap[preg_last_error()] ?? 'Unknown PCRE error: '.preg_last_error(); + return new static($errMsg, \preg_last_error()); + } +} diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php b/vendor/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php new file mode 100644 index 00000000..fbea6ad2 --- /dev/null +++ b/vendor/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php @@ -0,0 +1,9 @@ + + + Expressive Skeleton coding standard + + + + + + + + + + lib + generated + + + + + + + + \ No newline at end of file diff --git a/vendor/thecodingmachine/safe/phpstan.neon b/vendor/thecodingmachine/safe/phpstan.neon new file mode 100644 index 00000000..9cbb5b7c --- /dev/null +++ b/vendor/thecodingmachine/safe/phpstan.neon @@ -0,0 +1,7 @@ +parameters: + ignoreErrors: + # A lot of functions are in extensions so it is ok not to find those + - "#Function .* not found#" + - "#Undefined variable: \\$success#" +includes: + - vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon \ No newline at end of file diff --git a/vendor/thecodingmachine/safe/rector-migrate.yml b/vendor/thecodingmachine/safe/rector-migrate.yml new file mode 100644 index 00000000..ec22f004 --- /dev/null +++ b/vendor/thecodingmachine/safe/rector-migrate.yml @@ -0,0 +1,1081 @@ +# This rector file is replacing all core PHP functions with the equivalent "safe" functions +services: + Rector\Rector\Function_\FunctionReplaceRector: + $oldFunctionToNewFunction: + apache_get_version: 'Safe\apache_get_version' + apache_getenv: 'Safe\apache_getenv' + apache_request_headers: 'Safe\apache_request_headers' + apache_reset_timeout: 'Safe\apache_reset_timeout' + apache_response_headers: 'Safe\apache_response_headers' + apache_setenv: 'Safe\apache_setenv' + getallheaders: 'Safe\getallheaders' + virtual: 'Safe\virtual' + apc_cache_info: 'Safe\apc_cache_info' + apc_cas: 'Safe\apc_cas' + apc_compile_file: 'Safe\apc_compile_file' + apc_dec: 'Safe\apc_dec' + apc_define_constants: 'Safe\apc_define_constants' + apc_delete_file: 'Safe\apc_delete_file' + apc_delete: 'Safe\apc_delete' + apc_inc: 'Safe\apc_inc' + apc_load_constants: 'Safe\apc_load_constants' + apc_sma_info: 'Safe\apc_sma_info' + apcu_cache_info: 'Safe\apcu_cache_info' + apcu_cas: 'Safe\apcu_cas' + apcu_dec: 'Safe\apcu_dec' + apcu_delete: 'Safe\apcu_delete' + apcu_inc: 'Safe\apcu_inc' + apcu_sma_info: 'Safe\apcu_sma_info' + array_combine: 'Safe\array_combine' + array_multisort: 'Safe\array_multisort' + array_walk_recursive: 'Safe\array_walk_recursive' + arsort: 'Safe\arsort' + asort: 'Safe\asort' + krsort: 'Safe\krsort' + ksort: 'Safe\ksort' + natcasesort: 'Safe\natcasesort' + natsort: 'Safe\natsort' + rsort: 'Safe\rsort' + shuffle: 'Safe\shuffle' + sort: 'Safe\sort' + uasort: 'Safe\uasort' + uksort: 'Safe\uksort' + usort: 'Safe\usort' + bzclose: 'Safe\bzclose' + bzflush: 'Safe\bzflush' + bzread: 'Safe\bzread' + bzwrite: 'Safe\bzwrite' + class_alias: 'Safe\class_alias' + com_event_sink: 'Safe\com_event_sink' + com_load_typelib: 'Safe\com_load_typelib' + com_print_typeinfo: 'Safe\com_print_typeinfo' + cubrid_free_result: 'Safe\cubrid_free_result' + cubrid_get_charset: 'Safe\cubrid_get_charset' + cubrid_get_client_info: 'Safe\cubrid_get_client_info' + cubrid_get_db_parameter: 'Safe\cubrid_get_db_parameter' + cubrid_get_server_info: 'Safe\cubrid_get_server_info' + cubrid_insert_id: 'Safe\cubrid_insert_id' + cubrid_lob2_new: 'Safe\cubrid_lob2_new' + cubrid_lob2_size: 'Safe\cubrid_lob2_size' + cubrid_lob2_size64: 'Safe\cubrid_lob2_size64' + cubrid_lob2_tell: 'Safe\cubrid_lob2_tell' + cubrid_lob2_tell64: 'Safe\cubrid_lob2_tell64' + cubrid_set_db_parameter: 'Safe\cubrid_set_db_parameter' + curl_escape: 'Safe\curl_escape' + curl_exec: 'Safe\curl_exec' + curl_getinfo: 'Safe\curl_getinfo' + curl_init: 'Safe\curl_init' + curl_multi_errno: 'Safe\curl_multi_errno' + curl_multi_info_read: 'Safe\curl_multi_info_read' + curl_multi_init: 'Safe\curl_multi_init' + curl_setopt: 'Safe\curl_setopt' + curl_share_errno: 'Safe\curl_share_errno' + curl_share_setopt: 'Safe\curl_share_setopt' + curl_unescape: 'Safe\curl_unescape' + date_parse_from_format: 'Safe\date_parse_from_format' + date_parse: 'Safe\date_parse' + date_sun_info: 'Safe\date_sun_info' + date_sunrise: 'Safe\date_sunrise' + date_sunset: 'Safe\date_sunset' + mktime: 'Safe\mktime' + strptime: 'Safe\strptime' + strtotime: 'Safe\strtotime' + timezone_name_from_abbr: 'Safe\timezone_name_from_abbr' + chdir: 'Safe\chdir' + chroot: 'Safe\chroot' + getcwd: 'Safe\getcwd' + opendir: 'Safe\opendir' + readdir: 'Safe\readdir' + rewinddir: 'Safe\rewinddir' + scandir: 'Safe\scandir' + eio_busy: 'Safe\eio_busy' + eio_chmod: 'Safe\eio_chmod' + eio_chown: 'Safe\eio_chown' + eio_close: 'Safe\eio_close' + eio_custom: 'Safe\eio_custom' + eio_dup2: 'Safe\eio_dup2' + eio_event_loop: 'Safe\eio_event_loop' + eio_fallocate: 'Safe\eio_fallocate' + eio_fchmod: 'Safe\eio_fchmod' + eio_fdatasync: 'Safe\eio_fdatasync' + eio_fstat: 'Safe\eio_fstat' + eio_fstatvfs: 'Safe\eio_fstatvfs' + eio_fsync: 'Safe\eio_fsync' + eio_ftruncate: 'Safe\eio_ftruncate' + eio_futime: 'Safe\eio_futime' + eio_grp: 'Safe\eio_grp' + eio_lstat: 'Safe\eio_lstat' + eio_mkdir: 'Safe\eio_mkdir' + eio_mknod: 'Safe\eio_mknod' + eio_nop: 'Safe\eio_nop' + eio_readahead: 'Safe\eio_readahead' + eio_readdir: 'Safe\eio_readdir' + eio_readlink: 'Safe\eio_readlink' + eio_rename: 'Safe\eio_rename' + eio_rmdir: 'Safe\eio_rmdir' + eio_seek: 'Safe\eio_seek' + eio_sendfile: 'Safe\eio_sendfile' + eio_stat: 'Safe\eio_stat' + eio_statvfs: 'Safe\eio_statvfs' + eio_symlink: 'Safe\eio_symlink' + eio_sync_file_range: 'Safe\eio_sync_file_range' + eio_sync: 'Safe\eio_sync' + eio_syncfs: 'Safe\eio_syncfs' + eio_truncate: 'Safe\eio_truncate' + eio_unlink: 'Safe\eio_unlink' + eio_utime: 'Safe\eio_utime' + eio_write: 'Safe\eio_write' + error_log: 'Safe\error_log' + proc_get_status: 'Safe\proc_get_status' + proc_nice: 'Safe\proc_nice' + system: 'Safe\system' + finfo_close: 'Safe\finfo_close' + finfo_open: 'Safe\finfo_open' + mime_content_type: 'Safe\mime_content_type' + chgrp: 'Safe\chgrp' + chmod: 'Safe\chmod' + chown: 'Safe\chown' + copy: 'Safe\copy' + disk_free_space: 'Safe\disk_free_space' + disk_total_space: 'Safe\disk_total_space' + fclose: 'Safe\fclose' + fflush: 'Safe\fflush' + file_get_contents: 'Safe\file_get_contents' + file_put_contents: 'Safe\file_put_contents' + fileatime: 'Safe\fileatime' + filectime: 'Safe\filectime' + fileinode: 'Safe\fileinode' + filemtime: 'Safe\filemtime' + fileowner: 'Safe\fileowner' + filesize: 'Safe\filesize' + flock: 'Safe\flock' + fopen: 'Safe\fopen' + fputcsv: 'Safe\fputcsv' + fread: 'Safe\fread' + ftruncate: 'Safe\ftruncate' + fwrite: 'Safe\fwrite' + glob: 'Safe\glob' + lchgrp: 'Safe\lchgrp' + lchown: 'Safe\lchown' + link: 'Safe\link' + mkdir: 'Safe\mkdir' + parse_ini_file: 'Safe\parse_ini_file' + parse_ini_string: 'Safe\parse_ini_string' + readlink: 'Safe\readlink' + realpath: 'Safe\realpath' + rename: 'Safe\rename' + rewind: 'Safe\rewind' + rmdir: 'Safe\rmdir' + symlink: 'Safe\symlink' + tempnam: 'Safe\tempnam' + tmpfile: 'Safe\tmpfile' + touch: 'Safe\touch' + unlink: 'Safe\unlink' + filter_has_var: 'Safe\filter_has_var' + filter_input_array: 'Safe\filter_input_array' + filter_var_array: 'Safe\filter_var_array' + fastcgi_finish_request: 'Safe\fastcgi_finish_request' + ftp_alloc: 'Safe\ftp_alloc' + ftp_append: 'Safe\ftp_append' + ftp_cdup: 'Safe\ftp_cdup' + ftp_chdir: 'Safe\ftp_chdir' + ftp_chmod: 'Safe\ftp_chmod' + ftp_close: 'Safe\ftp_close' + ftp_connect: 'Safe\ftp_connect' + ftp_delete: 'Safe\ftp_delete' + ftp_fget: 'Safe\ftp_fget' + ftp_fput: 'Safe\ftp_fput' + ftp_get: 'Safe\ftp_get' + ftp_login: 'Safe\ftp_login' + ftp_mkdir: 'Safe\ftp_mkdir' + ftp_mlsd: 'Safe\ftp_mlsd' + ftp_nlist: 'Safe\ftp_nlist' + ftp_pasv: 'Safe\ftp_pasv' + ftp_put: 'Safe\ftp_put' + ftp_pwd: 'Safe\ftp_pwd' + ftp_rename: 'Safe\ftp_rename' + ftp_rmdir: 'Safe\ftp_rmdir' + ftp_site: 'Safe\ftp_site' + ftp_ssl_connect: 'Safe\ftp_ssl_connect' + ftp_systype: 'Safe\ftp_systype' + create_function: 'Safe\create_function' + forward_static_call_array: 'Safe\forward_static_call_array' + forward_static_call: 'Safe\forward_static_call' + register_tick_function: 'Safe\register_tick_function' + gmp_binomial: 'Safe\gmp_binomial' + gmp_export: 'Safe\gmp_export' + gmp_import: 'Safe\gmp_import' + gmp_random_seed: 'Safe\gmp_random_seed' + gnupg_adddecryptkey: 'Safe\gnupg_adddecryptkey' + gnupg_addencryptkey: 'Safe\gnupg_addencryptkey' + gnupg_addsignkey: 'Safe\gnupg_addsignkey' + gnupg_cleardecryptkeys: 'Safe\gnupg_cleardecryptkeys' + gnupg_clearencryptkeys: 'Safe\gnupg_clearencryptkeys' + gnupg_clearsignkeys: 'Safe\gnupg_clearsignkeys' + gnupg_setarmor: 'Safe\gnupg_setarmor' + gnupg_setsignmode: 'Safe\gnupg_setsignmode' + hash_hkdf: 'Safe\hash_hkdf' + hash_update_file: 'Safe\hash_update_file' + ibase_add_user: 'Safe\ibase_add_user' + ibase_blob_cancel: 'Safe\ibase_blob_cancel' + ibase_blob_create: 'Safe\ibase_blob_create' + ibase_blob_get: 'Safe\ibase_blob_get' + ibase_close: 'Safe\ibase_close' + ibase_commit_ret: 'Safe\ibase_commit_ret' + ibase_commit: 'Safe\ibase_commit' + ibase_connect: 'Safe\ibase_connect' + ibase_delete_user: 'Safe\ibase_delete_user' + ibase_drop_db: 'Safe\ibase_drop_db' + ibase_free_event_handler: 'Safe\ibase_free_event_handler' + ibase_free_query: 'Safe\ibase_free_query' + ibase_free_result: 'Safe\ibase_free_result' + ibase_maintain_db: 'Safe\ibase_maintain_db' + ibase_modify_user: 'Safe\ibase_modify_user' + ibase_name_result: 'Safe\ibase_name_result' + ibase_pconnect: 'Safe\ibase_pconnect' + ibase_rollback_ret: 'Safe\ibase_rollback_ret' + ibase_rollback: 'Safe\ibase_rollback' + ibase_service_detach: 'Safe\ibase_service_detach' + db2_autocommit: 'Safe\db2_autocommit' + db2_bind_param: 'Safe\db2_bind_param' + db2_client_info: 'Safe\db2_client_info' + db2_close: 'Safe\db2_close' + db2_commit: 'Safe\db2_commit' + db2_execute: 'Safe\db2_execute' + db2_free_result: 'Safe\db2_free_result' + db2_free_stmt: 'Safe\db2_free_stmt' + db2_get_option: 'Safe\db2_get_option' + db2_pclose: 'Safe\db2_pclose' + db2_rollback: 'Safe\db2_rollback' + db2_server_info: 'Safe\db2_server_info' + db2_set_option: 'Safe\db2_set_option' + iconv_get_encoding: 'Safe\iconv_get_encoding' + iconv_set_encoding: 'Safe\iconv_set_encoding' + iconv: 'Safe\iconv' + image2wbmp: 'Safe\image2wbmp' + imageaffine: 'Safe\imageaffine' + imageaffinematrixconcat: 'Safe\imageaffinematrixconcat' + imageaffinematrixget: 'Safe\imageaffinematrixget' + imagealphablending: 'Safe\imagealphablending' + imageantialias: 'Safe\imageantialias' + imagearc: 'Safe\imagearc' + imagebmp: 'Safe\imagebmp' + imagechar: 'Safe\imagechar' + imagecharup: 'Safe\imagecharup' + imagecolorat: 'Safe\imagecolorat' + imagecolordeallocate: 'Safe\imagecolordeallocate' + imagecolormatch: 'Safe\imagecolormatch' + imageconvolution: 'Safe\imageconvolution' + imagecopy: 'Safe\imagecopy' + imagecopymerge: 'Safe\imagecopymerge' + imagecopymergegray: 'Safe\imagecopymergegray' + imagecopyresampled: 'Safe\imagecopyresampled' + imagecopyresized: 'Safe\imagecopyresized' + imagecrop: 'Safe\imagecrop' + imagecropauto: 'Safe\imagecropauto' + imagedashedline: 'Safe\imagedashedline' + imagedestroy: 'Safe\imagedestroy' + imageellipse: 'Safe\imageellipse' + imagefill: 'Safe\imagefill' + imagefilledarc: 'Safe\imagefilledarc' + imagefilledellipse: 'Safe\imagefilledellipse' + imagefilledpolygon: 'Safe\imagefilledpolygon' + imagefilledrectangle: 'Safe\imagefilledrectangle' + imagefilltoborder: 'Safe\imagefilltoborder' + imagefilter: 'Safe\imagefilter' + imageflip: 'Safe\imageflip' + imagegammacorrect: 'Safe\imagegammacorrect' + imagegd: 'Safe\imagegd' + imagegd2: 'Safe\imagegd2' + imagegif: 'Safe\imagegif' + imagegrabscreen: 'Safe\imagegrabscreen' + imagegrabwindow: 'Safe\imagegrabwindow' + imagejpeg: 'Safe\imagejpeg' + imagelayereffect: 'Safe\imagelayereffect' + imageline: 'Safe\imageline' + imageloadfont: 'Safe\imageloadfont' + imageopenpolygon: 'Safe\imageopenpolygon' + imagepng: 'Safe\imagepng' + imagepolygon: 'Safe\imagepolygon' + imagepsencodefont: 'Safe\imagepsencodefont' + imagepsextendfont: 'Safe\imagepsextendfont' + imagepsfreefont: 'Safe\imagepsfreefont' + imagepsslantfont: 'Safe\imagepsslantfont' + imagerectangle: 'Safe\imagerectangle' + imagerotate: 'Safe\imagerotate' + imagesavealpha: 'Safe\imagesavealpha' + imagescale: 'Safe\imagescale' + imagesetbrush: 'Safe\imagesetbrush' + imagesetclip: 'Safe\imagesetclip' + imagesetinterpolation: 'Safe\imagesetinterpolation' + imagesetpixel: 'Safe\imagesetpixel' + imagesetstyle: 'Safe\imagesetstyle' + imagesetthickness: 'Safe\imagesetthickness' + imagesettile: 'Safe\imagesettile' + imagestring: 'Safe\imagestring' + imagestringup: 'Safe\imagestringup' + imagesx: 'Safe\imagesx' + imagesy: 'Safe\imagesy' + imagetruecolortopalette: 'Safe\imagetruecolortopalette' + imagettfbbox: 'Safe\imagettfbbox' + imagettftext: 'Safe\imagettftext' + imagewbmp: 'Safe\imagewbmp' + imagewebp: 'Safe\imagewebp' + imagexbm: 'Safe\imagexbm' + iptcembed: 'Safe\iptcembed' + iptcparse: 'Safe\iptcparse' + jpeg2wbmp: 'Safe\jpeg2wbmp' + png2wbmp: 'Safe\png2wbmp' + imap_append: 'Safe\imap_append' + imap_check: 'Safe\imap_check' + imap_clearflag_full: 'Safe\imap_clearflag_full' + imap_close: 'Safe\imap_close' + imap_createmailbox: 'Safe\imap_createmailbox' + imap_deletemailbox: 'Safe\imap_deletemailbox' + imap_gc: 'Safe\imap_gc' + imap_headerinfo: 'Safe\imap_headerinfo' + imap_mail_copy: 'Safe\imap_mail_copy' + imap_mail_move: 'Safe\imap_mail_move' + imap_mail: 'Safe\imap_mail' + imap_mailboxmsginfo: 'Safe\imap_mailboxmsginfo' + imap_mutf7_to_utf8: 'Safe\imap_mutf7_to_utf8' + imap_num_msg: 'Safe\imap_num_msg' + imap_open: 'Safe\imap_open' + imap_renamemailbox: 'Safe\imap_renamemailbox' + imap_savebody: 'Safe\imap_savebody' + imap_set_quota: 'Safe\imap_set_quota' + imap_setacl: 'Safe\imap_setacl' + imap_setflag_full: 'Safe\imap_setflag_full' + imap_subscribe: 'Safe\imap_subscribe' + imap_thread: 'Safe\imap_thread' + imap_timeout: 'Safe\imap_timeout' + imap_undelete: 'Safe\imap_undelete' + imap_unsubscribe: 'Safe\imap_unsubscribe' + imap_utf8_to_mutf7: 'Safe\imap_utf8_to_mutf7' + assert_options: 'Safe\assert_options' + cli_set_process_title: 'Safe\cli_set_process_title' + dl: 'Safe\dl' + getlastmod: 'Safe\getlastmod' + getmygid: 'Safe\getmygid' + getmyinode: 'Safe\getmyinode' + getmypid: 'Safe\getmypid' + getmyuid: 'Safe\getmyuid' + getopt: 'Safe\getopt' + ini_set: 'Safe\ini_set' + phpcredits: 'Safe\phpcredits' + phpinfo: 'Safe\phpinfo' + putenv: 'Safe\putenv' + set_include_path: 'Safe\set_include_path' + set_time_limit: 'Safe\set_time_limit' + ingres_autocommit: 'Safe\ingres_autocommit' + ingres_close: 'Safe\ingres_close' + ingres_commit: 'Safe\ingres_commit' + ingres_connect: 'Safe\ingres_connect' + ingres_execute: 'Safe\ingres_execute' + ingres_field_name: 'Safe\ingres_field_name' + ingres_field_type: 'Safe\ingres_field_type' + ingres_free_result: 'Safe\ingres_free_result' + ingres_pconnect: 'Safe\ingres_pconnect' + ingres_result_seek: 'Safe\ingres_result_seek' + ingres_rollback: 'Safe\ingres_rollback' + ingres_set_environment: 'Safe\ingres_set_environment' + inotify_init: 'Safe\inotify_init' + inotify_rm_watch: 'Safe\inotify_rm_watch' + json_encode: 'Safe\json_encode' + json_last_error_msg: 'Safe\json_last_error_msg' + ldap_add_ext: 'Safe\ldap_add_ext' + ldap_add: 'Safe\ldap_add' + ldap_bind_ext: 'Safe\ldap_bind_ext' + ldap_bind: 'Safe\ldap_bind' + ldap_control_paged_result_response: 'Safe\ldap_control_paged_result_response' + ldap_control_paged_result: 'Safe\ldap_control_paged_result' + ldap_count_entries: 'Safe\ldap_count_entries' + ldap_delete_ext: 'Safe\ldap_delete_ext' + ldap_delete: 'Safe\ldap_delete' + ldap_exop_passwd: 'Safe\ldap_exop_passwd' + ldap_exop_whoami: 'Safe\ldap_exop_whoami' + ldap_exop: 'Safe\ldap_exop' + ldap_explode_dn: 'Safe\ldap_explode_dn' + ldap_first_attribute: 'Safe\ldap_first_attribute' + ldap_first_entry: 'Safe\ldap_first_entry' + ldap_free_result: 'Safe\ldap_free_result' + ldap_get_attributes: 'Safe\ldap_get_attributes' + ldap_get_dn: 'Safe\ldap_get_dn' + ldap_get_entries: 'Safe\ldap_get_entries' + ldap_get_option: 'Safe\ldap_get_option' + ldap_get_values_len: 'Safe\ldap_get_values_len' + ldap_get_values: 'Safe\ldap_get_values' + ldap_list: 'Safe\ldap_list' + ldap_mod_add_ext: 'Safe\ldap_mod_add_ext' + ldap_mod_add: 'Safe\ldap_mod_add' + ldap_mod_del_ext: 'Safe\ldap_mod_del_ext' + ldap_mod_del: 'Safe\ldap_mod_del' + ldap_mod_replace_ext: 'Safe\ldap_mod_replace_ext' + ldap_mod_replace: 'Safe\ldap_mod_replace' + ldap_modify_batch: 'Safe\ldap_modify_batch' + ldap_next_attribute: 'Safe\ldap_next_attribute' + ldap_parse_exop: 'Safe\ldap_parse_exop' + ldap_parse_result: 'Safe\ldap_parse_result' + ldap_read: 'Safe\ldap_read' + ldap_rename_ext: 'Safe\ldap_rename_ext' + ldap_rename: 'Safe\ldap_rename' + ldap_sasl_bind: 'Safe\ldap_sasl_bind' + ldap_search: 'Safe\ldap_search' + ldap_set_option: 'Safe\ldap_set_option' + ldap_unbind: 'Safe\ldap_unbind' + event_add: 'Safe\event_add' + event_base_loopbreak: 'Safe\event_base_loopbreak' + event_base_loopexit: 'Safe\event_base_loopexit' + event_base_new: 'Safe\event_base_new' + event_base_priority_init: 'Safe\event_base_priority_init' + event_base_reinit: 'Safe\event_base_reinit' + event_base_set: 'Safe\event_base_set' + event_buffer_base_set: 'Safe\event_buffer_base_set' + event_buffer_disable: 'Safe\event_buffer_disable' + event_buffer_enable: 'Safe\event_buffer_enable' + event_buffer_new: 'Safe\event_buffer_new' + event_buffer_priority_set: 'Safe\event_buffer_priority_set' + event_buffer_set_callback: 'Safe\event_buffer_set_callback' + event_buffer_write: 'Safe\event_buffer_write' + event_del: 'Safe\event_del' + event_new: 'Safe\event_new' + event_priority_set: 'Safe\event_priority_set' + event_set: 'Safe\event_set' + event_timer_set: 'Safe\event_timer_set' + libxml_get_last_error: 'Safe\libxml_get_last_error' + libxml_set_external_entity_loader: 'Safe\libxml_set_external_entity_loader' + lzf_compress: 'Safe\lzf_compress' + lzf_decompress: 'Safe\lzf_decompress' + mailparse_msg_extract_part_file: 'Safe\mailparse_msg_extract_part_file' + mailparse_msg_free: 'Safe\mailparse_msg_free' + mailparse_msg_parse_file: 'Safe\mailparse_msg_parse_file' + mailparse_msg_parse: 'Safe\mailparse_msg_parse' + mailparse_stream_encode: 'Safe\mailparse_stream_encode' + mb_chr: 'Safe\mb_chr' + mb_detect_order: 'Safe\mb_detect_order' + mb_encoding_aliases: 'Safe\mb_encoding_aliases' + mb_ereg_replace_callback: 'Safe\mb_ereg_replace_callback' + mb_ereg_replace: 'Safe\mb_ereg_replace' + mb_ereg_search_getregs: 'Safe\mb_ereg_search_getregs' + mb_ereg_search_init: 'Safe\mb_ereg_search_init' + mb_ereg_search_regs: 'Safe\mb_ereg_search_regs' + mb_ereg_search_setpos: 'Safe\mb_ereg_search_setpos' + mb_eregi_replace: 'Safe\mb_eregi_replace' + mb_http_output: 'Safe\mb_http_output' + mb_internal_encoding: 'Safe\mb_internal_encoding' + mb_ord: 'Safe\mb_ord' + mb_parse_str: 'Safe\mb_parse_str' + mb_regex_encoding: 'Safe\mb_regex_encoding' + mb_send_mail: 'Safe\mb_send_mail' + define: 'Safe\define' + highlight_file: 'Safe\highlight_file' + highlight_string: 'Safe\highlight_string' + sapi_windows_cp_set: 'Safe\sapi_windows_cp_set' + sapi_windows_vt100_support: 'Safe\sapi_windows_vt100_support' + sleep: 'Safe\sleep' + time_nanosleep: 'Safe\time_nanosleep' + time_sleep_until: 'Safe\time_sleep_until' + msql_affected_rows: 'Safe\msql_affected_rows' + msql_close: 'Safe\msql_close' + msql_connect: 'Safe\msql_connect' + msql_create_db: 'Safe\msql_create_db' + msql_data_seek: 'Safe\msql_data_seek' + msql_db_query: 'Safe\msql_db_query' + msql_drop_db: 'Safe\msql_drop_db' + msql_field_len: 'Safe\msql_field_len' + msql_field_name: 'Safe\msql_field_name' + msql_field_seek: 'Safe\msql_field_seek' + msql_field_table: 'Safe\msql_field_table' + msql_field_type: 'Safe\msql_field_type' + msql_free_result: 'Safe\msql_free_result' + msql_pconnect: 'Safe\msql_pconnect' + msql_query: 'Safe\msql_query' + msql_select_db: 'Safe\msql_select_db' + mssql_bind: 'Safe\mssql_bind' + mssql_close: 'Safe\mssql_close' + mssql_connect: 'Safe\mssql_connect' + mssql_data_seek: 'Safe\mssql_data_seek' + mssql_field_length: 'Safe\mssql_field_length' + mssql_field_name: 'Safe\mssql_field_name' + mssql_field_seek: 'Safe\mssql_field_seek' + mssql_field_type: 'Safe\mssql_field_type' + mssql_free_result: 'Safe\mssql_free_result' + mssql_free_statement: 'Safe\mssql_free_statement' + mssql_init: 'Safe\mssql_init' + mssql_pconnect: 'Safe\mssql_pconnect' + mssql_query: 'Safe\mssql_query' + mssql_select_db: 'Safe\mssql_select_db' + mysql_close: 'Safe\mysql_close' + mysql_connect: 'Safe\mysql_connect' + mysql_create_db: 'Safe\mysql_create_db' + mysql_data_seek: 'Safe\mysql_data_seek' + mysql_db_name: 'Safe\mysql_db_name' + mysql_db_query: 'Safe\mysql_db_query' + mysql_drop_db: 'Safe\mysql_drop_db' + mysql_fetch_lengths: 'Safe\mysql_fetch_lengths' + mysql_field_flags: 'Safe\mysql_field_flags' + mysql_field_len: 'Safe\mysql_field_len' + mysql_field_name: 'Safe\mysql_field_name' + mysql_field_seek: 'Safe\mysql_field_seek' + mysql_free_result: 'Safe\mysql_free_result' + mysql_get_host_info: 'Safe\mysql_get_host_info' + mysql_get_proto_info: 'Safe\mysql_get_proto_info' + mysql_get_server_info: 'Safe\mysql_get_server_info' + mysql_info: 'Safe\mysql_info' + mysql_list_dbs: 'Safe\mysql_list_dbs' + mysql_list_fields: 'Safe\mysql_list_fields' + mysql_list_processes: 'Safe\mysql_list_processes' + mysql_list_tables: 'Safe\mysql_list_tables' + mysql_num_fields: 'Safe\mysql_num_fields' + mysql_num_rows: 'Safe\mysql_num_rows' + mysql_query: 'Safe\mysql_query' + mysql_real_escape_string: 'Safe\mysql_real_escape_string' + mysql_result: 'Safe\mysql_result' + mysql_select_db: 'Safe\mysql_select_db' + mysql_set_charset: 'Safe\mysql_set_charset' + mysql_tablename: 'Safe\mysql_tablename' + mysql_thread_id: 'Safe\mysql_thread_id' + mysql_unbuffered_query: 'Safe\mysql_unbuffered_query' + mysqli_get_cache_stats: 'Safe\mysqli_get_cache_stats' + mysqli_get_client_stats: 'Safe\mysqli_get_client_stats' + mysqlnd_ms_dump_servers: 'Safe\mysqlnd_ms_dump_servers' + mysqlnd_ms_fabric_select_global: 'Safe\mysqlnd_ms_fabric_select_global' + mysqlnd_ms_fabric_select_shard: 'Safe\mysqlnd_ms_fabric_select_shard' + mysqlnd_ms_get_last_used_connection: 'Safe\mysqlnd_ms_get_last_used_connection' + mysqlnd_qc_clear_cache: 'Safe\mysqlnd_qc_clear_cache' + mysqlnd_qc_set_is_select: 'Safe\mysqlnd_qc_set_is_select' + mysqlnd_qc_set_storage_handler: 'Safe\mysqlnd_qc_set_storage_handler' + closelog: 'Safe\closelog' + dns_get_record: 'Safe\dns_get_record' + fsockopen: 'Safe\fsockopen' + getprotobyname: 'Safe\getprotobyname' + getprotobynumber: 'Safe\getprotobynumber' + header_register_callback: 'Safe\header_register_callback' + inet_ntop: 'Safe\inet_ntop' + openlog: 'Safe\openlog' + syslog: 'Safe\syslog' + oci_bind_array_by_name: 'Safe\oci_bind_array_by_name' + oci_bind_by_name: 'Safe\oci_bind_by_name' + oci_cancel: 'Safe\oci_cancel' + oci_close: 'Safe\oci_close' + oci_commit: 'Safe\oci_commit' + oci_connect: 'Safe\oci_connect' + oci_define_by_name: 'Safe\oci_define_by_name' + oci_execute: 'Safe\oci_execute' + oci_fetch_all: 'Safe\oci_fetch_all' + oci_field_name: 'Safe\oci_field_name' + oci_field_precision: 'Safe\oci_field_precision' + oci_field_scale: 'Safe\oci_field_scale' + oci_field_size: 'Safe\oci_field_size' + oci_field_type_raw: 'Safe\oci_field_type_raw' + oci_field_type: 'Safe\oci_field_type' + oci_free_descriptor: 'Safe\oci_free_descriptor' + oci_free_statement: 'Safe\oci_free_statement' + oci_new_collection: 'Safe\oci_new_collection' + oci_new_connect: 'Safe\oci_new_connect' + oci_new_cursor: 'Safe\oci_new_cursor' + oci_new_descriptor: 'Safe\oci_new_descriptor' + oci_num_fields: 'Safe\oci_num_fields' + oci_num_rows: 'Safe\oci_num_rows' + oci_parse: 'Safe\oci_parse' + oci_pconnect: 'Safe\oci_pconnect' + oci_result: 'Safe\oci_result' + oci_rollback: 'Safe\oci_rollback' + oci_server_version: 'Safe\oci_server_version' + oci_set_action: 'Safe\oci_set_action' + oci_set_call_timeout: 'Safe\oci_set_call_timeout' + oci_set_client_identifier: 'Safe\oci_set_client_identifier' + oci_set_client_info: 'Safe\oci_set_client_info' + oci_set_db_operation: 'Safe\oci_set_db_operation' + oci_set_edition: 'Safe\oci_set_edition' + oci_set_module_name: 'Safe\oci_set_module_name' + oci_set_prefetch: 'Safe\oci_set_prefetch' + oci_statement_type: 'Safe\oci_statement_type' + oci_unregister_taf_callback: 'Safe\oci_unregister_taf_callback' + opcache_compile_file: 'Safe\opcache_compile_file' + opcache_get_status: 'Safe\opcache_get_status' + openssl_cipher_iv_length: 'Safe\openssl_cipher_iv_length' + openssl_csr_export_to_file: 'Safe\openssl_csr_export_to_file' + openssl_csr_export: 'Safe\openssl_csr_export' + openssl_csr_get_subject: 'Safe\openssl_csr_get_subject' + openssl_csr_new: 'Safe\openssl_csr_new' + openssl_csr_sign: 'Safe\openssl_csr_sign' + openssl_decrypt: 'Safe\openssl_decrypt' + openssl_dh_compute_key: 'Safe\openssl_dh_compute_key' + openssl_digest: 'Safe\openssl_digest' + openssl_open: 'Safe\openssl_open' + openssl_pbkdf2: 'Safe\openssl_pbkdf2' + openssl_pkcs12_export_to_file: 'Safe\openssl_pkcs12_export_to_file' + openssl_pkcs12_export: 'Safe\openssl_pkcs12_export' + openssl_pkcs12_read: 'Safe\openssl_pkcs12_read' + openssl_pkcs7_decrypt: 'Safe\openssl_pkcs7_decrypt' + openssl_pkcs7_encrypt: 'Safe\openssl_pkcs7_encrypt' + openssl_pkcs7_read: 'Safe\openssl_pkcs7_read' + openssl_pkcs7_sign: 'Safe\openssl_pkcs7_sign' + openssl_pkey_export_to_file: 'Safe\openssl_pkey_export_to_file' + openssl_pkey_export: 'Safe\openssl_pkey_export' + openssl_pkey_get_private: 'Safe\openssl_pkey_get_private' + openssl_pkey_get_public: 'Safe\openssl_pkey_get_public' + openssl_pkey_new: 'Safe\openssl_pkey_new' + openssl_private_decrypt: 'Safe\openssl_private_decrypt' + openssl_private_encrypt: 'Safe\openssl_private_encrypt' + openssl_public_decrypt: 'Safe\openssl_public_decrypt' + openssl_public_encrypt: 'Safe\openssl_public_encrypt' + openssl_random_pseudo_bytes: 'Safe\openssl_random_pseudo_bytes' + openssl_seal: 'Safe\openssl_seal' + openssl_sign: 'Safe\openssl_sign' + openssl_x509_export_to_file: 'Safe\openssl_x509_export_to_file' + openssl_x509_export: 'Safe\openssl_x509_export' + openssl_x509_fingerprint: 'Safe\openssl_x509_fingerprint' + openssl_x509_read: 'Safe\openssl_x509_read' + ob_end_clean: 'Safe\ob_end_clean' + ob_end_flush: 'Safe\ob_end_flush' + output_add_rewrite_var: 'Safe\output_add_rewrite_var' + output_reset_rewrite_vars: 'Safe\output_reset_rewrite_vars' + password_hash: 'Safe\password_hash' + pcntl_exec: 'Safe\pcntl_exec' + pcntl_getpriority: 'Safe\pcntl_getpriority' + pcntl_setpriority: 'Safe\pcntl_setpriority' + pcntl_signal_dispatch: 'Safe\pcntl_signal_dispatch' + pcntl_sigprocmask: 'Safe\pcntl_sigprocmask' + pcntl_strerror: 'Safe\pcntl_strerror' + preg_match_all: 'Safe\preg_match_all' + preg_match: 'Safe\preg_match' + preg_split: 'Safe\preg_split' + PDF_activate_item: 'Safe\PDF_activate_item' + PDF_add_locallink: 'Safe\PDF_add_locallink' + PDF_add_nameddest: 'Safe\PDF_add_nameddest' + PDF_add_note: 'Safe\PDF_add_note' + PDF_add_pdflink: 'Safe\PDF_add_pdflink' + PDF_add_thumbnail: 'Safe\PDF_add_thumbnail' + PDF_add_weblink: 'Safe\PDF_add_weblink' + PDF_attach_file: 'Safe\PDF_attach_file' + PDF_begin_layer: 'Safe\PDF_begin_layer' + PDF_begin_page_ext: 'Safe\PDF_begin_page_ext' + PDF_begin_page: 'Safe\PDF_begin_page' + PDF_circle: 'Safe\PDF_circle' + PDF_clip: 'Safe\PDF_clip' + PDF_close_pdi_page: 'Safe\PDF_close_pdi_page' + PDF_close_pdi: 'Safe\PDF_close_pdi' + PDF_close: 'Safe\PDF_close' + PDF_closepath_fill_stroke: 'Safe\PDF_closepath_fill_stroke' + PDF_closepath_stroke: 'Safe\PDF_closepath_stroke' + PDF_closepath: 'Safe\PDF_closepath' + PDF_concat: 'Safe\PDF_concat' + PDF_continue_text: 'Safe\PDF_continue_text' + PDF_curveto: 'Safe\PDF_curveto' + PDF_delete: 'Safe\PDF_delete' + PDF_end_layer: 'Safe\PDF_end_layer' + PDF_end_page_ext: 'Safe\PDF_end_page_ext' + PDF_end_page: 'Safe\PDF_end_page' + PDF_end_pattern: 'Safe\PDF_end_pattern' + PDF_end_template: 'Safe\PDF_end_template' + PDF_fill_stroke: 'Safe\PDF_fill_stroke' + PDF_fill: 'Safe\PDF_fill' + PDF_fit_image: 'Safe\PDF_fit_image' + PDF_fit_pdi_page: 'Safe\PDF_fit_pdi_page' + PDF_fit_textline: 'Safe\PDF_fit_textline' + PDF_initgraphics: 'Safe\PDF_initgraphics' + PDF_lineto: 'Safe\PDF_lineto' + PDF_makespotcolor: 'Safe\PDF_makespotcolor' + PDF_moveto: 'Safe\PDF_moveto' + PDF_open_file: 'Safe\PDF_open_file' + PDF_place_image: 'Safe\PDF_place_image' + PDF_place_pdi_page: 'Safe\PDF_place_pdi_page' + PDF_rect: 'Safe\PDF_rect' + PDF_restore: 'Safe\PDF_restore' + PDF_rotate: 'Safe\PDF_rotate' + PDF_save: 'Safe\PDF_save' + PDF_scale: 'Safe\PDF_scale' + PDF_set_border_color: 'Safe\PDF_set_border_color' + PDF_set_border_dash: 'Safe\PDF_set_border_dash' + PDF_set_border_style: 'Safe\PDF_set_border_style' + PDF_set_info: 'Safe\PDF_set_info' + PDF_set_layer_dependency: 'Safe\PDF_set_layer_dependency' + PDF_set_parameter: 'Safe\PDF_set_parameter' + PDF_set_text_pos: 'Safe\PDF_set_text_pos' + PDF_set_value: 'Safe\PDF_set_value' + PDF_setcolor: 'Safe\PDF_setcolor' + PDF_setdash: 'Safe\PDF_setdash' + PDF_setdashpattern: 'Safe\PDF_setdashpattern' + PDF_setflat: 'Safe\PDF_setflat' + PDF_setfont: 'Safe\PDF_setfont' + PDF_setgray_fill: 'Safe\PDF_setgray_fill' + PDF_setgray_stroke: 'Safe\PDF_setgray_stroke' + PDF_setgray: 'Safe\PDF_setgray' + PDF_setlinejoin: 'Safe\PDF_setlinejoin' + PDF_setlinewidth: 'Safe\PDF_setlinewidth' + PDF_setmatrix: 'Safe\PDF_setmatrix' + PDF_setmiterlimit: 'Safe\PDF_setmiterlimit' + PDF_setrgbcolor_fill: 'Safe\PDF_setrgbcolor_fill' + PDF_setrgbcolor_stroke: 'Safe\PDF_setrgbcolor_stroke' + PDF_setrgbcolor: 'Safe\PDF_setrgbcolor' + PDF_show_xy: 'Safe\PDF_show_xy' + PDF_show: 'Safe\PDF_show' + PDF_skew: 'Safe\PDF_skew' + PDF_stroke: 'Safe\PDF_stroke' + pg_cancel_query: 'Safe\pg_cancel_query' + pg_client_encoding: 'Safe\pg_client_encoding' + pg_close: 'Safe\pg_close' + pg_connect: 'Safe\pg_connect' + pg_connection_reset: 'Safe\pg_connection_reset' + pg_convert: 'Safe\pg_convert' + pg_copy_from: 'Safe\pg_copy_from' + pg_copy_to: 'Safe\pg_copy_to' + pg_dbname: 'Safe\pg_dbname' + pg_delete: 'Safe\pg_delete' + pg_end_copy: 'Safe\pg_end_copy' + pg_execute: 'Safe\pg_execute' + pg_field_name: 'Safe\pg_field_name' + pg_field_table: 'Safe\pg_field_table' + pg_field_type: 'Safe\pg_field_type' + pg_flush: 'Safe\pg_flush' + pg_free_result: 'Safe\pg_free_result' + pg_host: 'Safe\pg_host' + pg_insert: 'Safe\pg_insert' + pg_last_error: 'Safe\pg_last_error' + pg_last_notice: 'Safe\pg_last_notice' + pg_last_oid: 'Safe\pg_last_oid' + pg_lo_close: 'Safe\pg_lo_close' + pg_lo_export: 'Safe\pg_lo_export' + pg_lo_import: 'Safe\pg_lo_import' + pg_lo_open: 'Safe\pg_lo_open' + pg_lo_read_all: 'Safe\pg_lo_read_all' + pg_lo_read: 'Safe\pg_lo_read' + pg_lo_seek: 'Safe\pg_lo_seek' + pg_lo_truncate: 'Safe\pg_lo_truncate' + pg_lo_unlink: 'Safe\pg_lo_unlink' + pg_lo_write: 'Safe\pg_lo_write' + pg_meta_data: 'Safe\pg_meta_data' + pg_options: 'Safe\pg_options' + pg_parameter_status: 'Safe\pg_parameter_status' + pg_pconnect: 'Safe\pg_pconnect' + pg_ping: 'Safe\pg_ping' + pg_port: 'Safe\pg_port' + pg_prepare: 'Safe\pg_prepare' + pg_put_line: 'Safe\pg_put_line' + pg_query_params: 'Safe\pg_query_params' + pg_query: 'Safe\pg_query' + pg_result_error_field: 'Safe\pg_result_error_field' + pg_result_seek: 'Safe\pg_result_seek' + pg_select: 'Safe\pg_select' + pg_send_execute: 'Safe\pg_send_execute' + pg_send_prepare: 'Safe\pg_send_prepare' + pg_send_query_params: 'Safe\pg_send_query_params' + pg_send_query: 'Safe\pg_send_query' + pg_socket: 'Safe\pg_socket' + pg_trace: 'Safe\pg_trace' + pg_tty: 'Safe\pg_tty' + pg_update: 'Safe\pg_update' + pg_version: 'Safe\pg_version' + posix_access: 'Safe\posix_access' + posix_getgrnam: 'Safe\posix_getgrnam' + posix_getpgid: 'Safe\posix_getpgid' + posix_initgroups: 'Safe\posix_initgroups' + posix_kill: 'Safe\posix_kill' + posix_mkfifo: 'Safe\posix_mkfifo' + posix_mknod: 'Safe\posix_mknod' + posix_setegid: 'Safe\posix_setegid' + posix_seteuid: 'Safe\posix_seteuid' + posix_setgid: 'Safe\posix_setgid' + posix_setpgid: 'Safe\posix_setpgid' + posix_setrlimit: 'Safe\posix_setrlimit' + posix_setuid: 'Safe\posix_setuid' + ps_add_launchlink: 'Safe\ps_add_launchlink' + ps_add_locallink: 'Safe\ps_add_locallink' + ps_add_note: 'Safe\ps_add_note' + ps_add_pdflink: 'Safe\ps_add_pdflink' + ps_add_weblink: 'Safe\ps_add_weblink' + ps_arc: 'Safe\ps_arc' + ps_arcn: 'Safe\ps_arcn' + ps_begin_page: 'Safe\ps_begin_page' + ps_begin_pattern: 'Safe\ps_begin_pattern' + ps_begin_template: 'Safe\ps_begin_template' + ps_circle: 'Safe\ps_circle' + ps_clip: 'Safe\ps_clip' + ps_close_image: 'Safe\ps_close_image' + ps_close: 'Safe\ps_close' + ps_closepath_stroke: 'Safe\ps_closepath_stroke' + ps_closepath: 'Safe\ps_closepath' + ps_continue_text: 'Safe\ps_continue_text' + ps_curveto: 'Safe\ps_curveto' + ps_delete: 'Safe\ps_delete' + ps_end_page: 'Safe\ps_end_page' + ps_end_pattern: 'Safe\ps_end_pattern' + ps_end_template: 'Safe\ps_end_template' + ps_fill_stroke: 'Safe\ps_fill_stroke' + ps_fill: 'Safe\ps_fill' + ps_get_parameter: 'Safe\ps_get_parameter' + ps_hyphenate: 'Safe\ps_hyphenate' + ps_include_file: 'Safe\ps_include_file' + ps_lineto: 'Safe\ps_lineto' + ps_moveto: 'Safe\ps_moveto' + ps_new: 'Safe\ps_new' + ps_open_file: 'Safe\ps_open_file' + ps_place_image: 'Safe\ps_place_image' + ps_rect: 'Safe\ps_rect' + ps_restore: 'Safe\ps_restore' + ps_rotate: 'Safe\ps_rotate' + ps_save: 'Safe\ps_save' + ps_scale: 'Safe\ps_scale' + ps_set_border_color: 'Safe\ps_set_border_color' + ps_set_border_dash: 'Safe\ps_set_border_dash' + ps_set_border_style: 'Safe\ps_set_border_style' + ps_set_info: 'Safe\ps_set_info' + ps_set_parameter: 'Safe\ps_set_parameter' + ps_set_text_pos: 'Safe\ps_set_text_pos' + ps_set_value: 'Safe\ps_set_value' + ps_setcolor: 'Safe\ps_setcolor' + ps_setdash: 'Safe\ps_setdash' + ps_setflat: 'Safe\ps_setflat' + ps_setfont: 'Safe\ps_setfont' + ps_setgray: 'Safe\ps_setgray' + ps_setlinecap: 'Safe\ps_setlinecap' + ps_setlinejoin: 'Safe\ps_setlinejoin' + ps_setlinewidth: 'Safe\ps_setlinewidth' + ps_setmiterlimit: 'Safe\ps_setmiterlimit' + ps_setoverprintmode: 'Safe\ps_setoverprintmode' + ps_setpolydash: 'Safe\ps_setpolydash' + ps_shading_pattern: 'Safe\ps_shading_pattern' + ps_shading: 'Safe\ps_shading' + ps_shfill: 'Safe\ps_shfill' + ps_show_xy: 'Safe\ps_show_xy' + ps_show_xy2: 'Safe\ps_show_xy2' + ps_show: 'Safe\ps_show' + ps_show2: 'Safe\ps_show2' + ps_stroke: 'Safe\ps_stroke' + ps_symbol: 'Safe\ps_symbol' + ps_translate: 'Safe\ps_translate' + pspell_add_to_personal: 'Safe\pspell_add_to_personal' + pspell_add_to_session: 'Safe\pspell_add_to_session' + pspell_clear_session: 'Safe\pspell_clear_session' + pspell_config_create: 'Safe\pspell_config_create' + pspell_config_data_dir: 'Safe\pspell_config_data_dir' + pspell_config_dict_dir: 'Safe\pspell_config_dict_dir' + pspell_config_ignore: 'Safe\pspell_config_ignore' + pspell_config_mode: 'Safe\pspell_config_mode' + pspell_config_personal: 'Safe\pspell_config_personal' + pspell_config_repl: 'Safe\pspell_config_repl' + pspell_config_runtogether: 'Safe\pspell_config_runtogether' + pspell_config_save_repl: 'Safe\pspell_config_save_repl' + pspell_new_config: 'Safe\pspell_new_config' + pspell_new: 'Safe\pspell_new' + pspell_save_wordlist: 'Safe\pspell_save_wordlist' + pspell_store_replacement: 'Safe\pspell_store_replacement' + readline_add_history: 'Safe\readline_add_history' + readline_callback_handler_install: 'Safe\readline_callback_handler_install' + readline_clear_history: 'Safe\readline_clear_history' + readline_completion_function: 'Safe\readline_completion_function' + readline_read_history: 'Safe\readline_read_history' + readline_write_history: 'Safe\readline_write_history' + rrd_create: 'Safe\rrd_create' + msg_queue_exists: 'Safe\msg_queue_exists' + msg_receive: 'Safe\msg_receive' + msg_remove_queue: 'Safe\msg_remove_queue' + msg_send: 'Safe\msg_send' + msg_set_queue: 'Safe\msg_set_queue' + sem_acquire: 'Safe\sem_acquire' + sem_get: 'Safe\sem_get' + sem_release: 'Safe\sem_release' + sem_remove: 'Safe\sem_remove' + shm_put_var: 'Safe\shm_put_var' + shm_remove_var: 'Safe\shm_remove_var' + shm_remove: 'Safe\shm_remove' + session_abort: 'Safe\session_abort' + session_decode: 'Safe\session_decode' + session_destroy: 'Safe\session_destroy' + session_regenerate_id: 'Safe\session_regenerate_id' + session_reset: 'Safe\session_reset' + session_unset: 'Safe\session_unset' + session_write_close: 'Safe\session_write_close' + shmop_delete: 'Safe\shmop_delete' + shmop_read: 'Safe\shmop_read' + shmop_write: 'Safe\shmop_write' + simplexml_import_dom: 'Safe\simplexml_import_dom' + simplexml_load_file: 'Safe\simplexml_load_file' + simplexml_load_string: 'Safe\simplexml_load_string' + socket_accept: 'Safe\socket_accept' + socket_bind: 'Safe\socket_bind' + socket_connect: 'Safe\socket_connect' + socket_create_listen: 'Safe\socket_create_listen' + socket_create_pair: 'Safe\socket_create_pair' + socket_create: 'Safe\socket_create' + socket_export_stream: 'Safe\socket_export_stream' + socket_get_option: 'Safe\socket_get_option' + socket_getpeername: 'Safe\socket_getpeername' + socket_getsockname: 'Safe\socket_getsockname' + socket_listen: 'Safe\socket_listen' + socket_read: 'Safe\socket_read' + socket_send: 'Safe\socket_send' + socket_sendmsg: 'Safe\socket_sendmsg' + socket_sendto: 'Safe\socket_sendto' + socket_set_block: 'Safe\socket_set_block' + socket_set_nonblock: 'Safe\socket_set_nonblock' + socket_set_option: 'Safe\socket_set_option' + socket_shutdown: 'Safe\socket_shutdown' + socket_write: 'Safe\socket_write' + sodium_crypto_pwhash_str: 'Safe\sodium_crypto_pwhash_str' + sodium_crypto_pwhash: 'Safe\sodium_crypto_pwhash' + solr_get_version: 'Safe\solr_get_version' + class_implements: 'Safe\class_implements' + class_parents: 'Safe\class_parents' + class_uses: 'Safe\class_uses' + spl_autoload_register: 'Safe\spl_autoload_register' + spl_autoload_unregister: 'Safe\spl_autoload_unregister' + sqlsrv_begin_transaction: 'Safe\sqlsrv_begin_transaction' + sqlsrv_cancel: 'Safe\sqlsrv_cancel' + sqlsrv_client_info: 'Safe\sqlsrv_client_info' + sqlsrv_close: 'Safe\sqlsrv_close' + sqlsrv_commit: 'Safe\sqlsrv_commit' + sqlsrv_configure: 'Safe\sqlsrv_configure' + sqlsrv_execute: 'Safe\sqlsrv_execute' + sqlsrv_free_stmt: 'Safe\sqlsrv_free_stmt' + sqlsrv_get_field: 'Safe\sqlsrv_get_field' + sqlsrv_next_result: 'Safe\sqlsrv_next_result' + sqlsrv_num_fields: 'Safe\sqlsrv_num_fields' + sqlsrv_num_rows: 'Safe\sqlsrv_num_rows' + sqlsrv_prepare: 'Safe\sqlsrv_prepare' + sqlsrv_query: 'Safe\sqlsrv_query' + sqlsrv_rollback: 'Safe\sqlsrv_rollback' + ssdeep_fuzzy_compare: 'Safe\ssdeep_fuzzy_compare' + ssdeep_fuzzy_hash_filename: 'Safe\ssdeep_fuzzy_hash_filename' + ssdeep_fuzzy_hash: 'Safe\ssdeep_fuzzy_hash' + ssh2_auth_agent: 'Safe\ssh2_auth_agent' + ssh2_auth_hostbased_file: 'Safe\ssh2_auth_hostbased_file' + ssh2_auth_password: 'Safe\ssh2_auth_password' + ssh2_auth_pubkey_file: 'Safe\ssh2_auth_pubkey_file' + ssh2_connect: 'Safe\ssh2_connect' + ssh2_disconnect: 'Safe\ssh2_disconnect' + ssh2_exec: 'Safe\ssh2_exec' + ssh2_publickey_add: 'Safe\ssh2_publickey_add' + ssh2_publickey_init: 'Safe\ssh2_publickey_init' + ssh2_publickey_remove: 'Safe\ssh2_publickey_remove' + ssh2_scp_recv: 'Safe\ssh2_scp_recv' + ssh2_scp_send: 'Safe\ssh2_scp_send' + ssh2_sftp_chmod: 'Safe\ssh2_sftp_chmod' + ssh2_sftp_mkdir: 'Safe\ssh2_sftp_mkdir' + ssh2_sftp_rename: 'Safe\ssh2_sftp_rename' + ssh2_sftp_rmdir: 'Safe\ssh2_sftp_rmdir' + ssh2_sftp_symlink: 'Safe\ssh2_sftp_symlink' + ssh2_sftp_unlink: 'Safe\ssh2_sftp_unlink' + stats_covariance: 'Safe\stats_covariance' + stats_standard_deviation: 'Safe\stats_standard_deviation' + stats_stat_correlation: 'Safe\stats_stat_correlation' + stats_stat_innerproduct: 'Safe\stats_stat_innerproduct' + stats_variance: 'Safe\stats_variance' + stream_context_set_params: 'Safe\stream_context_set_params' + stream_copy_to_stream: 'Safe\stream_copy_to_stream' + stream_filter_append: 'Safe\stream_filter_append' + stream_filter_prepend: 'Safe\stream_filter_prepend' + stream_filter_register: 'Safe\stream_filter_register' + stream_filter_remove: 'Safe\stream_filter_remove' + stream_get_contents: 'Safe\stream_get_contents' + stream_isatty: 'Safe\stream_isatty' + stream_resolve_include_path: 'Safe\stream_resolve_include_path' + stream_set_blocking: 'Safe\stream_set_blocking' + stream_set_timeout: 'Safe\stream_set_timeout' + stream_socket_accept: 'Safe\stream_socket_accept' + stream_socket_client: 'Safe\stream_socket_client' + stream_socket_pair: 'Safe\stream_socket_pair' + stream_socket_server: 'Safe\stream_socket_server' + stream_socket_shutdown: 'Safe\stream_socket_shutdown' + stream_supports_lock: 'Safe\stream_supports_lock' + stream_wrapper_register: 'Safe\stream_wrapper_register' + stream_wrapper_restore: 'Safe\stream_wrapper_restore' + stream_wrapper_unregister: 'Safe\stream_wrapper_unregister' + convert_uudecode: 'Safe\convert_uudecode' + convert_uuencode: 'Safe\convert_uuencode' + hex2bin: 'Safe\hex2bin' + md5_file: 'Safe\md5_file' + metaphone: 'Safe\metaphone' + sha1_file: 'Safe\sha1_file' + sprintf: 'Safe\sprintf' + substr: 'Safe\substr' + swoole_async_write: 'Safe\swoole_async_write' + swoole_async_writefile: 'Safe\swoole_async_writefile' + swoole_event_defer: 'Safe\swoole_event_defer' + swoole_event_del: 'Safe\swoole_event_del' + swoole_event_write: 'Safe\swoole_event_write' + odbc_autocommit: 'Safe\odbc_autocommit' + odbc_binmode: 'Safe\odbc_binmode' + odbc_columnprivileges: 'Safe\odbc_columnprivileges' + odbc_columns: 'Safe\odbc_columns' + odbc_commit: 'Safe\odbc_commit' + odbc_data_source: 'Safe\odbc_data_source' + odbc_exec: 'Safe\odbc_exec' + odbc_execute: 'Safe\odbc_execute' + odbc_fetch_into: 'Safe\odbc_fetch_into' + odbc_field_len: 'Safe\odbc_field_len' + odbc_field_name: 'Safe\odbc_field_name' + odbc_field_num: 'Safe\odbc_field_num' + odbc_field_scale: 'Safe\odbc_field_scale' + odbc_field_type: 'Safe\odbc_field_type' + odbc_foreignkeys: 'Safe\odbc_foreignkeys' + odbc_gettypeinfo: 'Safe\odbc_gettypeinfo' + odbc_longreadlen: 'Safe\odbc_longreadlen' + odbc_prepare: 'Safe\odbc_prepare' + odbc_primarykeys: 'Safe\odbc_primarykeys' + odbc_result_all: 'Safe\odbc_result_all' + odbc_result: 'Safe\odbc_result' + odbc_rollback: 'Safe\odbc_rollback' + odbc_setoption: 'Safe\odbc_setoption' + odbc_specialcolumns: 'Safe\odbc_specialcolumns' + odbc_statistics: 'Safe\odbc_statistics' + odbc_tableprivileges: 'Safe\odbc_tableprivileges' + odbc_tables: 'Safe\odbc_tables' + uopz_extend: 'Safe\uopz_extend' + uopz_implement: 'Safe\uopz_implement' + base64_decode: 'Safe\base64_decode' + get_headers: 'Safe\get_headers' + parse_url: 'Safe\parse_url' + settype: 'Safe\settype' + xdiff_file_bdiff: 'Safe\xdiff_file_bdiff' + xdiff_file_bpatch: 'Safe\xdiff_file_bpatch' + xdiff_file_diff_binary: 'Safe\xdiff_file_diff_binary' + xdiff_file_diff: 'Safe\xdiff_file_diff' + xdiff_file_patch_binary: 'Safe\xdiff_file_patch_binary' + xdiff_file_rabdiff: 'Safe\xdiff_file_rabdiff' + xdiff_string_bpatch: 'Safe\xdiff_string_bpatch' + xdiff_string_patch_binary: 'Safe\xdiff_string_patch_binary' + xdiff_string_patch: 'Safe\xdiff_string_patch' + xml_parser_create_ns: 'Safe\xml_parser_create_ns' + xml_parser_create: 'Safe\xml_parser_create' + xml_set_object: 'Safe\xml_set_object' + xmlrpc_set_type: 'Safe\xmlrpc_set_type' + yaml_parse_file: 'Safe\yaml_parse_file' + yaml_parse_url: 'Safe\yaml_parse_url' + yaml_parse: 'Safe\yaml_parse' + yaz_ccl_parse: 'Safe\yaz_ccl_parse' + yaz_close: 'Safe\yaz_close' + yaz_connect: 'Safe\yaz_connect' + yaz_database: 'Safe\yaz_database' + yaz_element: 'Safe\yaz_element' + yaz_present: 'Safe\yaz_present' + yaz_search: 'Safe\yaz_search' + yaz_wait: 'Safe\yaz_wait' + zip_entry_close: 'Safe\zip_entry_close' + zip_entry_open: 'Safe\zip_entry_open' + zip_entry_read: 'Safe\zip_entry_read' + deflate_add: 'Safe\deflate_add' + deflate_init: 'Safe\deflate_init' + gzclose: 'Safe\gzclose' + gzcompress: 'Safe\gzcompress' + gzdecode: 'Safe\gzdecode' + gzdeflate: 'Safe\gzdeflate' + gzencode: 'Safe\gzencode' + gzgets: 'Safe\gzgets' + gzgetss: 'Safe\gzgetss' + gzinflate: 'Safe\gzinflate' + gzpassthru: 'Safe\gzpassthru' + gzrewind: 'Safe\gzrewind' + gzuncompress: 'Safe\gzuncompress' + inflate_get_read_len: 'Safe\inflate_get_read_len' + inflate_get_status: 'Safe\inflate_get_status' + inflate_add: 'Safe\inflate_add' + inflate_init: 'Safe\inflate_init' + zlib_decode: 'Safe\zlib_decode' + json_decode: 'Safe\json_decode' + apc_fetch: 'Safe\apc_fetch' + apcu_fetch: 'Safe\apcu_fetch' + preg_replace: 'Safe\preg_replace' + openssl_encrypt: 'Safe\openssl_encrypt' diff --git a/www/ebooks/ebook.php b/www/ebooks/ebook.php index 8f6d7e6f..796138ef 100644 --- a/www/ebooks/ebook.php +++ b/www/ebooks/ebook.php @@ -1,6 +1,11 @@