@@ -35,7 +35,6 @@ |
||
| 35 | 35 | /** |
| 36 | 36 | * @param string $name Name of adapter service. |
| 37 | 37 | * @param string $type |
| 38 | - * @param array $opt$this->htmlions |
|
| 39 | 38 | * @return $this |
| 40 | 39 | */ |
| 41 | 40 | protected function configureAdapter($name, $type, array $options = []) |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | - * @param $title |
|
| 60 | + * @param string $title |
|
| 61 | 61 | * @return $this |
| 62 | 62 | */ |
| 63 | 63 | public function setTitle($title) |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $styleData = []; |
| 87 | 87 | |
| 88 | 88 | if (!empty($this->attribs['style'])) { |
| 89 | - call_user_func(function () use (&$styleData) { |
|
| 89 | + call_user_func(function() use (&$styleData) { |
|
| 90 | 90 | foreach (explode(';', $this->attribs['style']) as $pair) { |
| 91 | 91 | list($name, $value) = explode(':', $pair); |
| 92 | 92 | $styleData[trim($name)] = trim($value); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | $stylePairs = []; |
| 110 | 110 | foreach ($styleData as $name => $value) { |
| 111 | - $stylePairs[] = $name . ': ' . $value; |
|
| 111 | + $stylePairs[] = $name.': '.$value; |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | $this->setAttribute('style', join('; ', $stylePairs)); |
@@ -26,15 +26,15 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | public function init() |
| 28 | 28 | { |
| 29 | - $this->listen(AppEvent::DISPATCH, function (DispatchEvent $event) { |
|
| 29 | + $this->listen(AppEvent::DISPATCH, function(DispatchEvent $event) { |
|
| 30 | 30 | $event->setResponse($event->getApp()->file()->read('docs/common.html')); |
| 31 | 31 | }, AppEvent::BEGIN); |
| 32 | 32 | |
| 33 | - $this->listen(AppEvent::DISPATCH, function (DispatchEvent $event) { |
|
| 33 | + $this->listen(AppEvent::DISPATCH, function(DispatchEvent $event) { |
|
| 34 | 34 | $event->setResponse($event->getApp()->file()->read('docs/footer.html')); |
| 35 | 35 | }, AppEvent::FINISH); |
| 36 | 36 | |
| 37 | - $this->listen(DefaultRoute::class, function (RouteEvent $event) { |
|
| 37 | + $this->listen(DefaultRoute::class, function(RouteEvent $event) { |
|
| 38 | 38 | $event->setResponse([ |
| 39 | 39 | '<h1>Webino Application Basic Usage Example</h1>', |
| 40 | 40 | $event->getApp()->url('myRoute')->html('My Route Example'), |
@@ -43,14 +43,14 @@ discard block |
||
| 43 | 43 | ]); |
| 44 | 44 | }); |
| 45 | 45 | |
| 46 | - $this->listen(RouteEvent::MATCH, function (RouteEvent $event) { |
|
| 46 | + $this->listen(RouteEvent::MATCH, function(RouteEvent $event) { |
|
| 47 | 47 | $routeName = $event->getRouteMatch()->getMatchedRouteName(); |
| 48 | 48 | if (DefaultRoute::class === $routeName) { |
| 49 | 49 | $routeName = 'default'; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | $file = $event->getApp()->file(); |
| 53 | - $path = 'docs/' . $routeName . '.html'; |
|
| 53 | + $path = 'docs/'.$routeName.'.html'; |
|
| 54 | 54 | |
| 55 | 55 | if ($file->has($path)) { |
| 56 | 56 | $docs = $file->read($path); |
@@ -58,17 +58,17 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | }, RouteEvent::FINISH); |
| 60 | 60 | |
| 61 | - $this->listen(RouteEvent::MATCH, function (RouteEvent $event) { |
|
| 61 | + $this->listen(RouteEvent::MATCH, function(RouteEvent $event) { |
|
| 62 | 62 | if (DefaultRoute::class !== $event->getRouteMatch()->getMatchedRouteName()) { |
| 63 | 63 | $event->setResponse($event->getApp()->url(DefaultRoute::class)->html('Go Home')); |
| 64 | 64 | } |
| 65 | 65 | }, RouteEvent::FINISH); |
| 66 | 66 | |
| 67 | - $this->listenRoute('myRoute', function (RouteEvent $event) { |
|
| 67 | + $this->listenRoute('myRoute', function(RouteEvent $event) { |
|
| 68 | 68 | $event->setResponse('<h1>My Route Example Content</h1>'); |
| 69 | 69 | }); |
| 70 | 70 | |
| 71 | - $this->listenRoute('myRuntimeRoute', function (RouteEvent $event) { |
|
| 71 | + $this->listenRoute('myRuntimeRoute', function(RouteEvent $event) { |
|
| 72 | 72 | $event->setResponse([ |
| 73 | 73 | '<h1>My Runtime Route Example Content</h1>', |
| 74 | 74 | ]); |
@@ -97,6 +97,6 @@ discard block |
||
| 97 | 97 | // runtime route example |
| 98 | 98 | $app->route('myRuntimeRoute')->setLiteral('/my-runtime-route'); |
| 99 | 99 | |
| 100 | -require __DIR__ . '/dispatch.php'; |
|
| 100 | +require __DIR__.'/dispatch.php'; |
|
| 101 | 101 | |
| 102 | 102 | $app->dispatch(); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | use WebinoExamplesLib\Html\ConsolePreview; |
| 14 | 14 | use WebinoHtmlLib\Html; |
| 15 | 15 | |
| 16 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
| 16 | +require __DIR__.'/../../vendor/autoload.php'; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * Custom console command class |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | $app = Webino::application($config)->bootstrap(); |
| 117 | 117 | |
| 118 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
| 118 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
| 119 | 119 | $event->setResponse([ |
| 120 | 120 | new Html\Text('Use Command Line Interface!'), |
| 121 | 121 | new ConsolePreview('preview.jpg'), |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | use WebinoAppLib\Router\DefaultRoute; |
| 10 | 10 | use WebinoHtmlLib\Html; |
| 11 | 11 | |
| 12 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
| 12 | +require __DIR__.'/../../vendor/autoload.php'; |
|
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * Adding the Tracy |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | $app = Webino::application(null, $debugger)->bootstrap(); |
| 21 | 21 | |
| 22 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
| 22 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
| 23 | 23 | /** |
| 24 | 24 | * Measuring |
| 25 | 25 | * execution time. |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | $event->setResponse([ |
| 32 | 32 | 'Hello Webino!', |
| 33 | - new Html\Text('Elapsed time: ' . $elapsed), |
|
| 33 | + new Html\Text('Elapsed time: '.$elapsed), |
|
| 34 | 34 | new SourcePreview(__FILE__), |
| 35 | 35 | ]); |
| 36 | 36 | }); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | use WebinoExamplesLib\Html\ConsolePreview; |
| 14 | 14 | use WebinoHtmlLib\Html; |
| 15 | 15 | |
| 16 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
| 16 | +require __DIR__.'/../../vendor/autoload.php'; |
|
| 17 | 17 | |
| 18 | 18 | class MyConsoleCommand extends AbstractConsoleCommand |
| 19 | 19 | { |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | $cli = $event->getCli(); |
| 32 | 32 | |
| 33 | - $input = $cli->input('How you doin?')->accept(function ($result) { |
|
| 33 | + $input = $cli->input('How you doin?')->accept(function($result) { |
|
| 34 | 34 | return ('Fine' === $result); |
| 35 | 35 | }); |
| 36 | 36 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $app = Webino::application($config)->bootstrap(); |
| 48 | 48 | |
| 49 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
| 49 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
| 50 | 50 | $event->setResponse([ |
| 51 | 51 | new Html\Text('Use Command Line Interface!'), |
| 52 | 52 | new ConsolePreview('preview.gif'), |
@@ -10,11 +10,11 @@ |
||
| 10 | 10 | use WebinoExamplesLib\Html\ConsolePreview; |
| 11 | 11 | use WebinoHtmlLib\Html\Text; |
| 12 | 12 | |
| 13 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
| 13 | +require __DIR__.'/../../vendor/autoload.php'; |
|
| 14 | 14 | |
| 15 | 15 | $app = Webino::application()->bootstrap(); |
| 16 | 16 | |
| 17 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
| 17 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
| 18 | 18 | $event->setResponse([ |
| 19 | 19 | new Text('Use Command Line Interface!'), |
| 20 | 20 | new ConsolePreview('preview.jpg'), |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | use WebinoExamplesLib\Html\ConsolePreview; |
| 14 | 14 | use WebinoHtmlLib\Html; |
| 15 | 15 | |
| 16 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
| 16 | +require __DIR__.'/../../vendor/autoload.php'; |
|
| 17 | 17 | |
| 18 | 18 | class MyConsoleCommand extends AbstractConsoleCommand |
| 19 | 19 | { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | $app = Webino::application($config)->bootstrap(); |
| 44 | 44 | |
| 45 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
| 45 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
| 46 | 46 | $event->setResponse([ |
| 47 | 47 | new Html\Text('Use Command Line Interface!'), |
| 48 | 48 | (new ConsolePreview('preview.gif'))->setHeight(400), |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | use WebinoAppLib\Response\Content\SourcePreview; |
| 9 | 9 | use WebinoAppLib\Router\DefaultRoute; |
| 10 | 10 | |
| 11 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
| 11 | +require __DIR__.'/../../vendor/autoload.php'; |
|
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Adding the Tracy |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | $app = Webino::application(null, $debugger)->bootstrap(); |
| 20 | 20 | |
| 21 | -$app->bind(DefaultRoute::class, function (RouteEvent $event) { |
|
| 21 | +$app->bind(DefaultRoute::class, function(RouteEvent $event) { |
|
| 22 | 22 | $event->setResponse([ |
| 23 | 23 | 'Hello Webino!', |
| 24 | 24 | /** |