Skip to content

Commit 45a670a

Browse files
committed
Remove tabs from the codebase. Spaces only, please.
1 parent cc8ac18 commit 45a670a

File tree

6 files changed

+64
-62
lines changed

6 files changed

+64
-62
lines changed

.jscsrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// allow some slop to account for legacy code
44
"validateQuoteMarks": { "mark": "'", "escape": true },
55
"requireCapitalizedComments": { "allExcept": ["jshint","globals"] },
6+
"disallowTabs": true,
67

78
"excludeFiles": [
89
"test.js",

deps/cdconfigure.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@ var rest = process.argv.slice(0);
1717
// "properly".
1818
switch (process.env.BUILDTYPE || 'Release') {
1919
case 'Debug':
20-
rest.push('--enable-debug');
21-
break;
20+
rest.push('--enable-debug');
21+
break;
2222
default:
2323
case 'Release':
24-
rest.push('--enable-release');
25-
break;
24+
rest.push('--enable-release');
25+
break;
2626
}
2727
// Fixup CFLAGS
2828
if (process.config.variables.target_arch !== 'ia32') {
29-
// needed for x86_64
30-
rest.push('CFLAGS=-fPIC');
31-
rest.push('CXXFLAGS=-fPIC');
29+
// needed for x86_64
30+
rest.push('CFLAGS=-fPIC');
31+
rest.push('CXXFLAGS=-fPIC');
3232
} else {
33-
// needed for multilib builds on x86_64 host
34-
rest.push('CFLAGS=-m32');
35-
rest.push('CXXFLAGS=-m32');
33+
// needed for multilib builds on x86_64 host
34+
rest.push('CFLAGS=-m32');
35+
rest.push('CXXFLAGS=-m32');
3636
}
3737

3838
console.log(path.resolve(confdir, './configure'), rest.join(' '));
3939
var c = child_process.spawn(path.resolve(confdir, './configure'), rest, {
40-
cwd: confdir,
41-
stdio: 'inherit'
40+
cwd: confdir,
41+
stdio: 'inherit'
4242
});

scripts/validate_tag.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ if [ `git describe --tags --always HEAD` ]; then
2020
fi
2121
else
2222
echo "warning: travis thinks the tag ($TRAVIS_BRANCH) differs from git (`git describe --tags --always HEAD`)"
23-
if [ "${1:-}" == "--check" ]; then
24-
exit 1
25-
fi
23+
if [ "${1:-}" == "--check" ]; then
24+
exit 1
25+
fi
2626
fi
2727
fi

test/http.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ describe('Feeding POST data from JS to PHP', function() {
115115
},
116116
}, {
117117
source: [
118-
'call_user_func(function() {',
119-
' # ensure we handle duplicate headers sent from PHP',
120-
' setcookie("a", "b");',
121-
' setcookie("c", "d", 0, "/");',
122-
' var_dump($_COOKIE);',
123-
' return 1;',
124-
'})',
118+
'call_user_func(function() {',
119+
' # ensure we handle duplicate headers sent from PHP',
120+
' setcookie("a", "b");',
121+
' setcookie("c", "d", 0, "/");',
122+
' var_dump($_COOKIE);',
123+
' return 1;',
124+
'})',
125125
].join('\n'),
126126
}).spread(function(phpvalue, output, response) {
127127
should(phpvalue).be.equal(1);

test/jswait.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ describe('Invoking asynchronous JS methods from PHP', function() {
3535
'call_user_func(function () {',
3636
' $setTimeout = $_SERVER["CONTEXT"]->setTimeout;',
3737
' $testAsync = $_SERVER["CONTEXT"]->testAsync;',
38-
// Demonstrate execution of existing node methods
39-
' $setTimeout(new Js\\Wait(), 1); # wait 1 ms',
40-
// Demonstrate that JS thread is not blocked.
41-
' return $testAsync(11, 12, new Js\\Wait());',
38+
// Demonstrate execution of existing node methods
39+
' $setTimeout(new Js\\Wait(), 1); # wait 1 ms',
40+
// Demonstrate that JS thread is not blocked.
41+
' return $testAsync(11, 12, new Js\\Wait());',
4242
'})',
4343
].join('\n'),
4444
}).then(function(v) {
@@ -54,11 +54,11 @@ describe('Invoking asynchronous JS methods from PHP', function() {
5454
source: [
5555
'call_user_func(function () {',
5656
' $testAsync = $_SERVER["CONTEXT"]->testAsync;',
57-
' try {',
58-
' $testAsync("early", "x", new Js\\Wait());',
59-
' } catch (Exception $e) {',
60-
' return "exception caught";',
61-
' }',
57+
' try {',
58+
' $testAsync("early", "x", new Js\\Wait());',
59+
' } catch (Exception $e) {',
60+
' return "exception caught";',
61+
' }',
6262
'})',
6363
].join('\n'),
6464
}).then(function(v) {
@@ -74,11 +74,11 @@ describe('Invoking asynchronous JS methods from PHP', function() {
7474
source: [
7575
'call_user_func(function () {',
7676
' $testAsync = $_SERVER["CONTEXT"]->testAsync;',
77-
' try {',
78-
' $testAsync("middle", "x", new Js\\Wait());',
79-
' } catch (Exception $e) {',
80-
' return "exception caught";',
81-
' }',
77+
' try {',
78+
' $testAsync("middle", "x", new Js\\Wait());',
79+
' } catch (Exception $e) {',
80+
' return "exception caught";',
81+
' }',
8282
'})',
8383
].join('\n'),
8484
}).then(function(v) {
@@ -94,11 +94,11 @@ describe('Invoking asynchronous JS methods from PHP', function() {
9494
source: [
9595
'call_user_func(function () {',
9696
' $testAsync = $_SERVER["CONTEXT"]->testAsync;',
97-
' try {',
98-
' $testAsync("late", "x", new Js\\Wait());',
99-
' } catch (Exception $e) {',
100-
' return "exception caught";',
101-
' }',
97+
' try {',
98+
' $testAsync("late", "x", new Js\\Wait());',
99+
' } catch (Exception $e) {',
100+
' return "exception caught";',
101+
' }',
102102
'})',
103103
].join('\n'),
104104
}).then(function(v) {

test/phpobject.js

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@ require('should');
55
describe('Wrapped PHP objects accessed from JavaScript', function() {
66
var php = require('../');
77
var code = [
8-
'call_user_func(function () {',
9-
' class SimpleClass {',
8+
'call_user_func(function () {',
9+
' class SimpleClass {',
1010
' // property declaration',
1111
' public $var = "a default value";',
12-
' public $empty = NULL;',
12+
' public $empty = NULL;',
1313
' private $priv = "private";',
14-
' ',
15-
' // method declaration',
14+
' ',
15+
' // method declaration',
1616
' public function displayVar() {',
17-
' echo $this->var;',
18-
' }',
17+
' echo $this->var;',
18+
' }',
1919
' public function getPriv() {',
2020
' return $this->priv;',
2121
' }',
22-
' }',
23-
' class MagicClass {',
22+
' }',
23+
' class MagicClass {',
2424
' private $var = "private";',
25-
' public function __get( $name ) {',
25+
' public function __get( $name ) {',
2626
' echo "__get\n";',
2727
' return $name == "v" ? $this->var : null;',
2828
' }',
@@ -38,18 +38,19 @@ describe('Wrapped PHP objects accessed from JavaScript', function() {
3838
' echo "__unset\n";',
3939
' if ( $name == "v" ) { $this->var = "unset"; }',
4040
' }',
41-
' public function __call( $name, $arguments ) {',
42-
' echo "__call\n";',
43-
' return $name;',
44-
' }',
45-
' public function __invoke( $x ) {',
46-
' echo "__invoke\n";',
47-
' return $x;',
48-
' }',
41+
' public function __call( $name, $arguments ) {',
42+
' echo "__call\n";',
43+
' return $name;',
44+
' }',
45+
' public function __invoke( $x ) {',
46+
' echo "__invoke\n";',
47+
' return $x;',
48+
' }',
4949
' }',
50-
' $c = $_SERVER["CONTEXT"];',
51-
' return $c->jsfunc(new SimpleClass(), new MagicClass());',
52-
'})',].join('\n');
50+
' $c = $_SERVER["CONTEXT"];',
51+
' return $c->jsfunc(new SimpleClass(), new MagicClass());',
52+
'})',
53+
].join('\n');
5354
var test = function(f) {
5455
var out = new StringStream();
5556
return php.request({ source: code, context: { jsfunc: f }, stream: out })

0 commit comments

Comments
 (0)