-
-
Save simensen/f9b57934e4be6f01b58a to your computer and use it in GitHub Desktop.
This file contains 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 | |
// If I copy and paste this unindented code... | |
$app->post('/admin/brands/{brandId}/unarchive', function (Application $app, Request $request, $brandId) { | |
$redirect = function () use ($app, $request) { | |
// TODO: Use URL Generator? | |
return $app->redirect($request->getBasePath() . '/admin/brands'); | |
}; | |
}); | |
// It pastes as this... which is more or less exactly how it ends | |
// up looking if I just type it in and hit enter naturally... | |
$app->post('/admin/brands/{brandId}/unarchive', function (Application $app, Request $request, $brandId) { | |
$redirect = function () use ($app, $request) { | |
// TODO: Use URL Generator? | |
return $app->redirect($request->getBasePath() . '/admin/brands'); | |
}; | |
}); | |
// What I expected is this... | |
$app->post('/admin/brands/{brandId}/unarchive', function (Application $app, Request $request, $brandId) { | |
$redirect = function () use ($app, $request) { | |
// TODO: Use URL Generator? | |
return $app->redirect($request->getBasePath() . '/admin/brands'); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had the same problem and I think I just found the configuration option to fix this.
Go to File -> settings and then select Code style -> PHP -> Tabs and Indents and set the Continuation indent to 0.
That has fixed the problem for me without breaking any other indentation (I'm still testing, but looks good by the moment).