File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ var CodeBuilder = require('../../helpers/code-builder')
1616
1717module . exports = function ( source , options ) {
1818 var opts = util . _extend ( {
19- timeout : '10' ,
2019 indent : ' ' ,
21- pretty : true
20+ pretty : true ,
21+ timeout : '10'
2222 } , options )
2323
2424 var code = new CodeBuilder ( opts . indent )
Original file line number Diff line number Diff line change @@ -15,18 +15,19 @@ var CodeBuilder = require('../../helpers/code-builder')
1515
1616module . exports = function ( source , options ) {
1717 var opts = util . _extend ( {
18+ closingTag : false ,
1819 indent : ' ' ,
19- noTags : false ,
2020 maxRedirects : 10 ,
21- timeout : 30 ,
2221 namedErrors : false ,
23- closingTag : false
22+ noTags : false ,
23+ shortTags : false ,
24+ timeout : 30
2425 } , options )
2526
2627 var code = new CodeBuilder ( opts . indent )
2728
2829 if ( ! opts . noTags ) {
29- code . push ( '<?php' )
30+ code . push ( opts . shortTags ? '<?' : '<?php' )
3031 . blank ( )
3132 }
3233
@@ -121,7 +122,7 @@ module.exports = function (source, options) {
121122 . push ( 1 , 'echo $response;' )
122123 . push ( '}' )
123124
124- if ( opts . closingTag ) {
125+ if ( ! opts . noTags && opts . closingTag ) {
125126 code . blank ( )
126127 . push ( '?>' )
127128 }
@@ -133,5 +134,5 @@ module.exports.info = {
133134 key : 'curl' ,
134135 title : 'cURL' ,
135136 link : 'http://php.net/manual/en/book.curl.php' ,
136- description : 'PHP with libcurl '
137+ description : 'PHP with ext-curl '
137138}
Original file line number Diff line number Diff line change @@ -16,15 +16,16 @@ var CodeBuilder = require('../../helpers/code-builder')
1616
1717module . exports = function ( source , options ) {
1818 var opts = util . _extend ( {
19+ closingTag : false ,
1920 indent : ' ' ,
2021 noTags : false ,
21- closingTag : false
22+ shortTags : false
2223 } , options )
2324
2425 var code = new CodeBuilder ( opts . indent )
2526
2627 if ( ! opts . noTags ) {
27- code . push ( '<?php' )
28+ code . push ( opts . shortTags ? '<?' : '<?php' )
2829 . blank ( )
2930 }
3031
@@ -80,7 +81,7 @@ module.exports = function (source, options) {
8081 . push ( 1 , 'echo $ex;' )
8182 . push ( '}' )
8283
83- if ( opts . closingTag ) {
84+ if ( ! opts . noTags && opts . closingTag ) {
8485 code . blank ( )
8586 . push ( '?>' )
8687 }
Original file line number Diff line number Diff line change @@ -16,16 +16,17 @@ var CodeBuilder = require('../../helpers/code-builder')
1616
1717module . exports = function ( source , options ) {
1818 var opts = util . _extend ( {
19+ closingTag : false ,
1920 indent : ' ' ,
2021 noTags : false ,
21- closingTag : false
22+ shortTags : false
2223 } , options )
2324
2425 var code = new CodeBuilder ( opts . indent )
2526 var hasBody = false
2627
2728 if ( ! opts . noTags ) {
28- code . push ( '<?php' )
29+ code . push ( opts . shortTags ? '<?' : '<?php' )
2930 . blank ( )
3031 }
3132
@@ -112,7 +113,7 @@ module.exports = function (source, options) {
112113 . blank ( )
113114 . push ( 'echo $response->getBody();' )
114115
115- if ( opts . closingTag ) {
116+ if ( ! opts . noTags && opts . closingTag ) {
116117 code . blank ( )
117118 . push ( '?>' )
118119 }
Original file line number Diff line number Diff line change 1111'use strict'
1212
1313var util = require ( 'util' )
14- var helpers = require ( './ helpers' )
14+ var helpers = require ( '../../ helpers/shell ' )
1515var CodeBuilder = require ( '../../helpers/code-builder' )
1616
1717module . exports = function ( source , options ) {
1818 var opts = util . _extend ( {
19- short : false ,
20- indent : ' '
19+ indent : ' ' ,
20+ short : false
2121 } , options )
2222
2323 var code = new CodeBuilder ( opts . indent , opts . indent !== false ? ' \\\n' + opts . indent : ' ' )
@@ -59,5 +59,5 @@ module.exports.info = {
5959 key : 'curl' ,
6060 title : 'cURL' ,
6161 link : 'http://curl.haxx.se/' ,
62- description : 'curl is a command line tool and library for transferring data with URL syntax'
62+ description : 'cURL is a command line tool and library for transferring data with URL syntax'
6363}
Original file line number Diff line number Diff line change 1111'use strict'
1212
1313var util = require ( 'util' )
14- var helpers = require ( './ helpers' )
14+ var helpers = require ( '../../ helpers/shell ' )
1515var CodeBuilder = require ( '../../helpers/code-builder' )
1616
1717module . exports = function ( source , options ) {
1818 var opts = util . _extend ( {
19- queryParams : false ,
2019 body : false ,
2120 cert : false ,
2221 headers : false ,
2322 indent : ' ' ,
2423 pretty : false ,
2524 print : false ,
25+ queryParams : false ,
2626 short : false ,
2727 style : false ,
2828 timeout : false ,
Original file line number Diff line number Diff line change 1111'use strict'
1212
1313var util = require ( 'util' )
14- var helpers = require ( './ helpers' )
14+ var helpers = require ( '../../ helpers/shell ' )
1515var CodeBuilder = require ( '../../helpers/code-builder' )
1616
1717module . exports = function ( source , options ) {
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ var CodeBuilder = require('../../helpers/code-builder')
1616
1717module . exports = function ( source , options ) {
1818 var opts = util . _extend ( {
19- timeout : '10' ,
2019 indent : ' ' ,
21- pretty : true
20+ pretty : true ,
21+ timeout : '10'
2222 } , options )
2323
2424 var code = new CodeBuilder ( opts . indent )
Original file line number Diff line number Diff line change 99 "key" : " curl" ,
1010 "title" : " cURL" ,
1111 "link" : " http://curl.haxx.se/" ,
12- "description" : " curl is a command line tool and library for transferring data with URL syntax"
12+ "description" : " cURL is a command line tool and library for transferring data with URL syntax"
1313 },
1414 {
1515 "key" : " httpie" ,
9595 "key" : " curl" ,
9696 "title" : " cURL" ,
9797 "link" : " http://php.net/manual/en/book.curl.php" ,
98- "description" : " PHP with libcurl "
98+ "description" : " PHP with ext-curl "
9999 },
100100 {
101101 "key" : " http1" ,
You can’t perform that action at this time.
0 commit comments