This file contains hidden or 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
<?php | |
require_once(__DIR__ . '/../vendor/squizlabs/php_codesniffer/tests/bootstrap.php'); | |
require_once(__DIR__ . '/SniffTestHelper.php'); |
This file contains hidden or 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
<?php | |
use PHP_CodeSniffer\Files\LocalFile; | |
use PHP_CodeSniffer\Ruleset; | |
use PHP_CodeSniffer\Config; | |
class SniffTestHelper { | |
public function prepareLocalFileForSniffs($sniffFiles, string $fixtureFile): LocalFile { | |
$config = new Config(); | |
$ruleset = new Ruleset($config); |
This file contains hidden or 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
#!/usr/bin/env php | |
<?php | |
$vendorBinDirectory = './vendor/bin'; | |
$helpMessage = "Shortcut to run commands in vendor/bin for Composer projects | |
Usage: cpx <command> | |
<command> must be an executable file in the vendor/bin directory. | |
Read about vendor binaries here: |
This file contains hidden or 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
<?php | |
class Maybe { | |
private $value; | |
private $error; | |
private function __construct($value, $error) { | |
$this->value = $value; | |
$this->error = $error; | |
} |
This file contains hidden or 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
<?xml version="1.0"?> | |
<ruleset name="PaytonsStandard"> | |
<description> | |
Originally from https://gist.github.com/Ovsyanka/e2ab2ff76e7c0d7e75a1e4213a03ff95 | |
PSR2 with changes: | |
- tabs instead of spaces (https://gist.github.com/gsherwood/9d22f634c57f990a7c64) | |
- bracers on end of line instead new line | |
- unused/undefined variable detection (https://github.com/sirbrillig/phpcs-variable-analysis) | |
</description> | |
<arg name="tab-width" value="4"/> |
This file contains hidden or 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
diff --git a/index.js b/index.js | |
index bd240d0..afa5674 100644 | |
--- a/index.js | |
+++ b/index.js | |
@@ -165,7 +165,7 @@ export default function request( options, fn ) { | |
if ( body && formData ) { | |
debug( 'API ignoring body because formData is set. They cannot both be used together.' ); | |
} | |
- if ( body && ! formData ) { | |
+ if ( body ) { |
This file contains hidden or 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
diff --git a/package.json b/package.json | |
index 578f3fd..d4b1ba8 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -36,7 +36,7 @@ | |
}, | |
"dependencies": { | |
"debug": "~2.2.0", | |
- "superagent": "^2.1.0", | |
+ "superagent": "visionmedia/superagent#385f1f5b403c749b57ab28699fba51814806543e", |
This file contains hidden or 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
diff --git a/index.js b/index.js | |
index 9db01ce..165d708 100644 | |
--- a/index.js | |
+++ b/index.js | |
@@ -162,7 +162,7 @@ export default function request( options, fn ) { | |
} | |
// body | |
- if ( body ) { | |
+ if ( body && ! formData ) { |
This file contains hidden or 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
diff --git a/client/lib/wp/sync-handler/index.js b/client/lib/wp/sync-handler/index.js | |
index b07e761..0f67c4e 100644 | |
--- a/client/lib/wp/sync-handler/index.js | |
+++ b/client/lib/wp/sync-handler/index.js | |
@@ -54,8 +54,8 @@ export class SyncHandler { | |
window.syncHandler = this; | |
} | |
- this.reqHandler = handler; | |
- return this.syncHandlerWrapper( handler ); |