-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce the number of unprefixed whitelisted functions in the PHAR
- Loading branch information
1 parent
0baf6de
commit 70e559b
Showing
4 changed files
with
111 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- ../vendor/hoa/consistency/Consistency.php 2017-05-02 14:18:12.000000000 +0200 | ||
+++ ../vendor/hoa/consistency/Consistency2.php 2020-05-05 08:28:35.000000000 +0200 | ||
@@ -319,42 +319,6 @@ | ||
$define('STREAM_CRYPTO_METHOD_ANY_CLIENT', 63); | ||
} | ||
|
||
-if (!function_exists('curry')) { | ||
- /** | ||
- * Curry. | ||
- * Example: | ||
- * $c = curry('str_replace', …, …, 'foobar'); | ||
- * var_dump($c('foo', 'baz')); // bazbar | ||
- * $c = curry('str_replace', 'foo', 'baz', …); | ||
- * var_dump($c('foobarbaz')); // bazbarbaz | ||
- * Nested curries also work: | ||
- * $c1 = curry('str_replace', …, …, 'foobar'); | ||
- * $c2 = curry($c1, 'foo', …); | ||
- * var_dump($c2('baz')); // bazbar | ||
- * Obviously, as the first argument is a callable, we can combine this with | ||
- * \Hoa\Consistency\Xcallable ;-). | ||
- * The “…” character is the HORIZONTAL ELLIPSIS Unicode character (Unicode: | ||
- * 2026, UTF-8: E2 80 A6). | ||
- * | ||
- * @param mixed $callable Callable (two parts). | ||
- * @param ... ... Arguments. | ||
- * @return \Closure | ||
- */ | ||
- function curry($callable) | ||
- { | ||
- $arguments = func_get_args(); | ||
- array_shift($arguments); | ||
- $ii = array_keys($arguments, …, true); | ||
- | ||
- return function () use ($callable, $arguments, $ii) { | ||
- return call_user_func_array( | ||
- $callable, | ||
- array_replace($arguments, array_combine($ii, func_get_args())) | ||
- ); | ||
- }; | ||
- } | ||
-} | ||
- | ||
/** | ||
* Flex entity. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- ../vendor/hoa/protocol/Wrapper.php 2017-01-14 13:26:10.000000000 +0100 | ||
+++ ../vendor/hoa/protocol/Wrapper2.php 2020-05-05 08:39:18.000000000 +0200 | ||
@@ -582,24 +582,3 @@ | ||
stream_wrapper_register('hoa', Wrapper::class); | ||
|
||
} | ||
- | ||
-namespace | ||
-{ | ||
- | ||
-/** | ||
- * Alias of `Hoa\Protocol::resolve` method. | ||
- * | ||
- * @param string $path Path to resolve. | ||
- * @param bool $exists If `true`, try to find the first that exists, | ||
- * else return the first solution. | ||
- * @param bool $unfold Return all solutions instead of one. | ||
- * @return mixed | ||
- */ | ||
-if (!function_exists('resolve')) { | ||
- function resolve($path, $exists = true, $unfold = false) | ||
- { | ||
- return Hoa\Protocol::getInstance()->resolve($path, $exists, $unfold); | ||
- } | ||
-} | ||
- | ||
-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters