| @@ -15,7 +15,7 @@ | ||
| 15 | 15 |          // new InputOption('some-option', null, InputOption::VALUE_NONE, 'Some help'), | 
| 16 | 16 | )) | 
| 17 | 17 |      ->setDescription('My command description') | 
| 18 | -    ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) { | |
| 18 | +    ->setCode(function(InputInterface $input, OutputInterface $output) use ($app) { | |
| 19 | 19 | // do something | 
| 20 | 20 | }) | 
| 21 | 21 | ; | 
| @@ -60,7 +60,7 @@ | ||
| 60 | 60 |      { | 
| 61 | 61 |          foreach ($this->categoryBasedConfig as $matcher => $paths) { | 
| 62 | 62 |              if (preg_match(sprintf('#^%s#', $matcher), $category)) { | 
| 63 | - return $paths; // deeper category should match early. | |
| 63 | + return $paths; // deeper category should match early. | |
| 64 | 64 | } | 
| 65 | 65 | } | 
| 66 | 66 | |
| @@ -10,7 +10,7 @@ discard block | ||
| 10 | 10 | |
| 11 | 11 |  //Request::setTrustedProxies(array('127.0.0.1')); | 
| 12 | 12 | |
| 13 | -$app->get('/', function (Request $request) use ($app) { | |
| 13 | +$app->get('/', function(Request $request) use ($app) { | |
| 14 | 14 | |
| 15 | 15 |      if ($postId = $request->get('post_id', null)) { | 
| 16 | 16 |          return $app->redirect($app['url_generator']->generate('post', ['id' => $postId])); | 
| @@ -22,12 +22,12 @@ discard block | ||
| 22 | 22 | ; | 
| 23 | 23 | |
| 24 | 24 | |
| 25 | -$app->get('/post/{id}/', function (Request $request, $id) use ($app) { | |
| 25 | +$app->get('/post/{id}/', function(Request $request, $id) use ($app) { | |
| 26 | 26 | |
| 27 | - $esa = $app['service.esa.proxy']; /** @var Proxy $esa */ | |
| 28 | - $restrictor = $app['service.access_restrictor']; /** @var AccessRestrictor $restrictor */ | |
| 29 | - $htmlHandler = $app['service.esa.html_handler']; /** @var HtmlHandler $htmlHandler */ | |
| 30 | - $assetResolver = $app['service.asset_resolver']; /** @var AssetResolver $assetResolver */ | |
| 27 | + $esa = $app['service.esa.proxy']; /** @var Proxy $esa */ | |
| 28 | + $restrictor = $app['service.access_restrictor']; /** @var AccessRestrictor $restrictor */ | |
| 29 | + $htmlHandler = $app['service.esa.html_handler']; /** @var HtmlHandler $htmlHandler */ | |
| 30 | + $assetResolver = $app['service.asset_resolver']; /** @var AssetResolver $assetResolver */ | |
| 31 | 31 |      $force = boolval($request->get('force', 0)); | 
| 32 | 32 | |
| 33 | 33 | $post = $esa->getPost($id, $force); | 
| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 | ; | 
| 65 | 65 | |
| 66 | 66 | |
| 67 | -$app->post('/webhook/', function (Request $request) use ($app) { | |
| 67 | +$app->post('/webhook/', function(Request $request) use ($app) { | |
| 68 | 68 | |
| 69 | 69 | $payload = $request->getContent(); | 
| 70 | 70 |      $signature = $request->headers->get('X-Esa-Signature'); | 
| @@ -93,7 +93,7 @@ discard block | ||
| 93 | 93 | ; | 
| 94 | 94 | |
| 95 | 95 | |
| 96 | -$app->error(function (\Exception $e, Request $request, $code) use ($app) { | |
| 96 | +$app->error(function(\Exception $e, Request $request, $code) use ($app) { | |
| 97 | 97 | |
| 98 | 98 |      if ($app['debug']) { | 
| 99 | 99 | return; | 
| @@ -133,7 +133,7 @@ discard block | ||
| 133 | 133 | */ | 
| 134 | 134 | public function getATagReducer($pattern) | 
| 135 | 135 |      { | 
| 136 | -        $reducer = function (Crawler $node) use ($pattern) { | |
| 136 | +        $reducer = function(Crawler $node) use ($pattern) { | |
| 137 | 137 |              preg_match($pattern, $node->attr('href'), $matches); | 
| 138 | 138 | |
| 139 | 139 | return boolval($matches); | 
| @@ -156,7 +156,7 @@ discard block | ||
| 156 | 156 |      { | 
| 157 | 157 | $that = $this; | 
| 158 | 158 | |
| 159 | -        $walker = function (Crawler $node) use ($pattern, $backReferenceNumberForPostId, $backReferenceNumberForAnchorHash, $routeName, $routeVariableName, $that) { | |
| 159 | +        $walker = function(Crawler $node) use ($pattern, $backReferenceNumberForPostId, $backReferenceNumberForAnchorHash, $routeName, $routeVariableName, $that) { | |
| 160 | 160 |              preg_match($pattern, $node->attr('href'), $matches); | 
| 161 | 161 | $href = $matches[0]; | 
| 162 | 162 | $postId = $matches[$backReferenceNumberForPostId]; | 
| @@ -182,7 +182,7 @@ discard block | ||
| 182 | 182 | */ | 
| 183 | 183 | public function getATagWalkerForMentionLinks($pattern) | 
| 184 | 184 |      { | 
| 185 | -        $walker = function (Crawler $node) use ($pattern) { | |
| 185 | +        $walker = function(Crawler $node) use ($pattern) { | |
| 186 | 186 |              preg_match($pattern, $node->attr('href'), $matches); | 
| 187 | 187 | $href = $matches[0]; | 
| 188 | 188 | |
| @@ -256,7 +256,7 @@ discard block | ||
| 256 | 256 | */ | 
| 257 | 257 | public function getWalkerForToc() | 
| 258 | 258 |      { | 
| 259 | -        $walker = function (Crawler $node) { | |
| 259 | +        $walker = function(Crawler $node) { | |
| 260 | 260 | return [ | 
| 261 | 261 |                  'id' => $node->attr('id'), | 
| 262 | 262 |                  'text' => trim(str_replace($node->filter('a')->text(), '', $node->text())), |