Page MenuHomePhabricator

D532.diff
No OneTemporary

D532.diff

diff --git a/composer.json b/composer.json
--- a/composer.json
+++ b/composer.json
@@ -10,6 +10,7 @@
}
],
"require": {
- "spitfire/collection": "dev-master"
+ "ext-posix" : "*",
+ "spitfire/collection": "0.1"
}
}
diff --git a/composer.lock b/composer.lock
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "ece7ac112a331ccfb82eeedfc7157335",
+ "content-hash": "c7fccaedf054a4ca0516b9ddcd7a158f",
"packages": [
{
"name": "spitfire/collection",
@@ -17,6 +17,7 @@
"require-dev": {
"phpunit/phpunit": "^9.4"
},
+ "default-branch": true,
"type": "library",
"autoload": {
"psr-4": {
@@ -45,7 +46,9 @@
},
"prefer-stable": false,
"prefer-lowest": false,
- "platform": [],
+ "platform": {
+ "ext-posix": "*"
+ },
"platform-dev": [],
- "plugin-api-version": "1.1.0"
+ "plugin-api-version": "2.0.0"
}
diff --git a/src/arguments/extractor/LongParamExtractor.php b/src/arguments/extractor/LongParamExtractor.php
--- a/src/arguments/extractor/LongParamExtractor.php
+++ b/src/arguments/extractor/LongParamExtractor.php
@@ -29,7 +29,7 @@
public function extract($argument) {
- if (\spitfire\utils\Strings::startsWith($argument, '--')) {
+ if (substr($argument, 0, 2) === '--') {
$pieces = explode('=', $argument, 2);
$name = substr(array_shift($pieces), 2);
$value = array_shift($pieces);
diff --git a/src/arguments/extractor/ShortParamExtractor.php b/src/arguments/extractor/ShortParamExtractor.php
--- a/src/arguments/extractor/ShortParamExtractor.php
+++ b/src/arguments/extractor/ShortParamExtractor.php
@@ -28,7 +28,7 @@
{
public function extract($argument) {
- if (\spitfire\utils\Strings::startsWith($argument, '-' )) {
+ if ($argument[0] == '-' ) {
$pieces = explode('=', $argument, 2);
$name = str_split(substr(array_shift($pieces), 1));
$value = array_shift($pieces);
@@ -48,4 +48,4 @@
return false;
}
-}
\ No newline at end of file
+}

File Metadata

Mime Type
text/plain
Expires
Apr 13 2021, 2:39 AM (9 w, 18 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5821
Default Alt Text
D532.diff (2 KB)

Event Timeline