@@ -20,7 +20,7 @@ |
||
| 20 | 20 | use Deployer\Utility\Httpie; |
| 21 | 21 | |
| 22 | 22 | desc('Notifies Bugsnag of deployment'); |
| 23 | -task('bugsnag:notify', function () { |
|
| 23 | +task('bugsnag:notify', function() { |
|
| 24 | 24 | $data = [ |
| 25 | 25 | 'apiKey' => get('bugsnag_api_key'), |
| 26 | 26 | 'releaseStage' => get('target'), |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | use Deployer\Utility\Httpie; |
| 76 | 76 | |
| 77 | 77 | // Title of project |
| 78 | -set('teams_title', function () { |
|
| 78 | +set('teams_title', function() { |
|
| 79 | 79 | return get('application', 'Project'); |
| 80 | 80 | }); |
| 81 | 81 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | set('teams_failure_color', '#ff0909'); |
| 91 | 91 | |
| 92 | 92 | desc('Notifies Teams'); |
| 93 | -task('teams:notify', function () { |
|
| 93 | +task('teams:notify', function() { |
|
| 94 | 94 | if (!get('teams_webhook', false)) { |
| 95 | 95 | warning('No MS Teams webhook configured'); |
| 96 | 96 | return; |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | ->hidden(); |
| 106 | 106 | |
| 107 | 107 | desc('Notifies Teams about deploy finish'); |
| 108 | -task('teams:notify:success', function () { |
|
| 108 | +task('teams:notify:success', function() { |
|
| 109 | 109 | if (!get('teams_webhook', false)) { |
| 110 | 110 | warning('No MS Teams webhook configured'); |
| 111 | 111 | return; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | ->hidden(); |
| 121 | 121 | |
| 122 | 122 | desc('Notifies Teams about deploy failure'); |
| 123 | -task('teams:notify:failure', function () { |
|
| 123 | +task('teams:notify:failure', function() { |
|
| 124 | 124 | if (!get('teams_webhook', false)) { |
| 125 | 125 | warning('No MS Teams webhook configured'); |
| 126 | 126 | return; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | set('ntfy_server', 'ntfy.sh'); |
| 90 | 90 | |
| 91 | 91 | // Title of project |
| 92 | -set('ntfy_title', function () { |
|
| 92 | +set('ntfy_title', function() { |
|
| 93 | 93 | return get('application', 'Project'); |
| 94 | 94 | }); |
| 95 | 95 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | set('ntfy_failure_tags', ''); |
| 105 | 105 | |
| 106 | 106 | desc('Notifies ntfy server'); |
| 107 | -task('ntfy:notify', function () { |
|
| 107 | +task('ntfy:notify', function() { |
|
| 108 | 108 | if (!get('ntfy_topic', false)) { |
| 109 | 109 | warning('No ntfy topic configured'); |
| 110 | 110 | return; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | ->hidden(); |
| 123 | 123 | |
| 124 | 124 | desc('Notifies ntfy server about deploy finish'); |
| 125 | -task('ntfy:notify:success', function () { |
|
| 125 | +task('ntfy:notify:success', function() { |
|
| 126 | 126 | if (!get('ntfy_topic', false)) { |
| 127 | 127 | warning('No ntfy topic configured'); |
| 128 | 128 | return; |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | ->hidden(); |
| 141 | 141 | |
| 142 | 142 | desc('Notifies ntfy server about deploy failure'); |
| 143 | -task('ntfy:notify:failure', function () { |
|
| 143 | +task('ntfy:notify:failure', function() { |
|
| 144 | 144 | if (!get('ntfy_topic', false)) { |
| 145 | 145 | warning('No ntfy topic configured'); |
| 146 | 146 | return; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | set('ispmanager_aliaslist', []); |
| 60 | 60 | |
| 61 | 61 | desc('Installs ispmanager'); |
| 62 | -task('ispmanager:init', function () { |
|
| 62 | +task('ispmanager:init', function() { |
|
| 63 | 63 | $config = get('ispmanager'); |
| 64 | 64 | |
| 65 | 65 | if (!is_null($config['createDatabase']) || !is_null($config['deleteDatabase'])) { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | }); |
| 83 | 83 | |
| 84 | 84 | desc('Takes database servers list'); |
| 85 | -task('ispmanager:db-server-list', function () { |
|
| 85 | +task('ispmanager:db-server-list', function() { |
|
| 86 | 86 | $response = ispmanagerRequest('get', [ |
| 87 | 87 | 'func' => 'db.server', |
| 88 | 88 | ]); |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | }); |
| 120 | 120 | |
| 121 | 121 | desc('Takes databases list'); |
| 122 | -task('ispmanager:db-list', function () { |
|
| 122 | +task('ispmanager:db-list', function() { |
|
| 123 | 123 | $response = ispmanagerRequest('get', [ |
| 124 | 124 | 'func' => 'db', |
| 125 | 125 | ]); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | }); |
| 142 | 142 | |
| 143 | 143 | desc('Takes domain list'); |
| 144 | -task('ispmanager:domain-list', function () { |
|
| 144 | +task('ispmanager:domain-list', function() { |
|
| 145 | 145 | $response = ispmanagerRequest('get', [ |
| 146 | 146 | 'func' => 'webdomain', |
| 147 | 147 | ]); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | }); |
| 158 | 158 | |
| 159 | 159 | desc('Creates new database'); |
| 160 | -task('ispmanager:db-create', function () { |
|
| 160 | +task('ispmanager:db-create', function() { |
|
| 161 | 161 | $config = get('ispmanager'); |
| 162 | 162 | |
| 163 | 163 | if (is_null($config['createDatabase'])) { |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | }); |
| 228 | 228 | |
| 229 | 229 | desc('Deletes database'); |
| 230 | -task('ispmanager:db-delete', function () { |
|
| 230 | +task('ispmanager:db-delete', function() { |
|
| 231 | 231 | $config = get('ispmanager'); |
| 232 | 232 | |
| 233 | 233 | if (is_null($config['deleteDatabase'])) { |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | }); |
| 279 | 279 | |
| 280 | 280 | desc('Creates new domain'); |
| 281 | -task('ispmanager:domain-create', function () { |
|
| 281 | +task('ispmanager:domain-create', function() { |
|
| 282 | 282 | $config = get('ispmanager'); |
| 283 | 283 | |
| 284 | 284 | if (is_null($config['createDomain'])) { |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | }); |
| 325 | 325 | |
| 326 | 326 | desc('Gets allowed PHP modes and versions'); |
| 327 | -task('ispmanager:get-php-list', function () { |
|
| 327 | +task('ispmanager:get-php-list', function() { |
|
| 328 | 328 | // Get www-root settings for fpm version |
| 329 | 329 | $response = ispmanagerRequest('get', [ |
| 330 | 330 | 'func' => 'user.edit', |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | }); |
| 371 | 371 | |
| 372 | 372 | desc('Prints allowed PHP modes and versions'); |
| 373 | -task('ispmanager:print-php-list', function () { |
|
| 373 | +task('ispmanager:print-php-list', function() { |
|
| 374 | 374 | invoke('ispmanager:get-php-list'); |
| 375 | 375 | |
| 376 | 376 | $versions = get('ispmanager_phplist'); |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | }); |
| 409 | 409 | |
| 410 | 410 | desc('Switches PHP version for domain'); |
| 411 | -task('ispmanager:domain-php-select', function () { |
|
| 411 | +task('ispmanager:domain-php-select', function() { |
|
| 412 | 412 | $config = get('ispmanager'); |
| 413 | 413 | |
| 414 | 414 | if (is_null($config['phpSelect'])) { |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | }); |
| 478 | 478 | |
| 479 | 479 | desc('Creates new domain alias'); |
| 480 | -task('ispmanager:domain-alias-create', function () { |
|
| 480 | +task('ispmanager:domain-alias-create', function() { |
|
| 481 | 481 | $config = get('ispmanager'); |
| 482 | 482 | |
| 483 | 483 | if (is_null($config['createAlias'])) { |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | }); |
| 547 | 547 | |
| 548 | 548 | desc('Deletes domain alias'); |
| 549 | -task('ispmanager:domain-alias-delete', function () { |
|
| 549 | +task('ispmanager:domain-alias-delete', function() { |
|
| 550 | 550 | $config = get('ispmanager'); |
| 551 | 551 | |
| 552 | 552 | if (is_null($config['deleteAlias'])) { |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | }); |
| 615 | 615 | |
| 616 | 616 | desc('Deletes domain'); |
| 617 | -task('ispmanager:domain-delete', function () { |
|
| 617 | +task('ispmanager:domain-delete', function() { |
|
| 618 | 618 | $config = get('ispmanager'); |
| 619 | 619 | |
| 620 | 620 | if (is_null($config['deleteDomain'])) { |
@@ -661,7 +661,7 @@ discard block |
||
| 661 | 661 | }); |
| 662 | 662 | |
| 663 | 663 | desc('Auto task processing'); |
| 664 | -task('ispmanager:process', function () { |
|
| 664 | +task('ispmanager:process', function() { |
|
| 665 | 665 | $config = get('ispmanager'); |
| 666 | 666 | |
| 667 | 667 | if (!is_null($config['createDatabase'])) { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | use Deployer\Utility\Httpie; |
| 43 | 43 | |
| 44 | 44 | // Title of project |
| 45 | -set('chat_title', function () { |
|
| 45 | +set('chat_title', function() { |
|
| 46 | 46 | return get('application', 'Project'); |
| 47 | 47 | }); |
| 48 | 48 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | set('chat_line2', '{{stage}}'); |
| 57 | 57 | |
| 58 | 58 | desc('Notifies Google Hangouts Chat'); |
| 59 | -task('chat:notify', function () { |
|
| 59 | +task('chat:notify', function() { |
|
| 60 | 60 | if (!get('chat_webhook', false)) { |
| 61 | 61 | return; |
| 62 | 62 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | ->hidden(); |
| 99 | 99 | |
| 100 | 100 | desc('Notifies Google Hangouts Chat about deploy finish'); |
| 101 | -task('chat:notify:success', function () { |
|
| 101 | +task('chat:notify:success', function() { |
|
| 102 | 102 | if (!get('chat_webhook', false)) { |
| 103 | 103 | return; |
| 104 | 104 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | ->hidden(); |
| 141 | 141 | |
| 142 | 142 | desc('Notifies Google Hangouts Chat about deploy failure'); |
| 143 | -task('chat:notify:failure', function () { |
|
| 143 | +task('chat:notify:failure', function() { |
|
| 144 | 144 | if (!get('chat_webhook', false)) { |
| 145 | 145 | return; |
| 146 | 146 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | require_once __DIR__ . '/npm.php'; |
| 22 | 22 | require_once __DIR__ . '/yarn.php'; |
| 23 | 23 | |
| 24 | -set('webpack_encore/package_manager', function () { |
|
| 24 | +set('webpack_encore/package_manager', function() { |
|
| 25 | 25 | if (test('[ -f {{release_path}}/yarn.lock ]')) { |
| 26 | 26 | return 'yarn'; |
| 27 | 27 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | set('webpack_encore/env', 'production'); |
| 33 | 33 | |
| 34 | 34 | desc('Runs webpack encore build'); |
| 35 | -task('webpack_encore:build', function () { |
|
| 35 | +task('webpack_encore:build', function() { |
|
| 36 | 36 | $packageManager = get('webpack_encore/package_manager'); |
| 37 | 37 | |
| 38 | 38 | if (!in_array($packageManager, ['npm', 'yarn'], true)) { |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | set('hipchat_url', 'https://api.hipchat.com/v1/rooms/message'); |
| 29 | 29 | |
| 30 | 30 | desc('Notifies Hipchat channel of deployment'); |
| 31 | -task('hipchat:notify', function () { |
|
| 31 | +task('hipchat:notify', function() { |
|
| 32 | 32 | $params = [ |
| 33 | 33 | 'room_id' => get('hipchat_room_id'), |
| 34 | 34 | 'from' => get('target'), |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | /** |
| 78 | 78 | * Path to Phinx |
| 79 | 79 | */ |
| 80 | -set('bin/phinx', function () { |
|
| 80 | +set('bin/phinx', function() { |
|
| 81 | 81 | try { |
| 82 | 82 | $phinxPath = which('phinx'); |
| 83 | 83 | } catch (RunException $e) { |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | |
| 147 | 147 | desc('Migrats database with phinx'); |
| 148 | -task('phinx:migrate', function () { |
|
| 148 | +task('phinx:migrate', function() { |
|
| 149 | 149 | $ALLOWED_OPTIONS = [ |
| 150 | 150 | 'configuration', |
| 151 | 151 | 'date', |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | }); |
| 167 | 167 | |
| 168 | 168 | desc('Rollbacks database migrations with phinx'); |
| 169 | -task('phinx:rollback', function () { |
|
| 169 | +task('phinx:rollback', function() { |
|
| 170 | 170 | $ALLOWED_OPTIONS = [ |
| 171 | 171 | 'configuration', |
| 172 | 172 | 'date', |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | }); |
| 188 | 188 | |
| 189 | 189 | desc('Seeds database with phinx'); |
| 190 | -task('phinx:seed', function () { |
|
| 190 | +task('phinx:seed', function() { |
|
| 191 | 191 | $ALLOWED_OPTIONS = [ |
| 192 | 192 | 'configuration', |
| 193 | 193 | 'environment', |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | }); |
| 208 | 208 | |
| 209 | 209 | desc('Sets a migrations breakpoint with phinx'); |
| 210 | -task('phinx:breakpoint', function () { |
|
| 210 | +task('phinx:breakpoint', function() { |
|
| 211 | 211 | $ALLOWED_OPTIONS = [ |
| 212 | 212 | 'configuration', |
| 213 | 213 | 'environment', |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $config->set('hyphen-ated', 'hyphen'); |
| 23 | 23 | $config->set('parse', 'is {{int}}'); |
| 24 | 24 | $config->set('parse-hyphen', 'has {{hyphen-ated}}'); |
| 25 | - $config->set('callback', function () { |
|
| 25 | + $config->set('callback', function() { |
|
| 26 | 26 | return 'callback'; |
| 27 | 27 | }); |
| 28 | 28 | $this->assertEquals(42, $config->get('int')); |