Completed
Push — prototype ( 942ea2...3bfdd7 )
by Peter
04:02
created
examples/simple/public/events-bind-app-bootstrap-core/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 use WebinoAppLib\Response\Content\SourcePreview;
10 10
 use WebinoAppLib\Router\DefaultRoute;
11 11
 
12
-require __DIR__ . '/../../vendor/autoload.php';
12
+require __DIR__.'/../../vendor/autoload.php';
13 13
 
14 14
 $appCore = Webino::application();
15 15
 
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
  * Binding to
18 18
  * core bootstrap.
19 19
  */
20
-$appCore->bind(AppEvent::BOOTSTRAP, function (AppEvent $event) {
20
+$appCore->bind(AppEvent::BOOTSTRAP, function(AppEvent $event) {
21 21
     $event->getApp()->set('responseText', 'Hello Webino!');
22 22
 });
23 23
 
24 24
 $app = $appCore->bootstrap();
25 25
 
26
-$app->bind(DefaultRoute::class, function (RouteEvent $event) {
26
+$app->bind(DefaultRoute::class, function(RouteEvent $event) {
27 27
     $event->setResponseContent([
28 28
         $event->getApp()->get('responseText'),
29 29
         new SourcePreview(__FILE__),
Please login to merge, or discard this patch.
examples/simple/public/events-aware/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 use WebinoEventLib\EventsAwareInterface;
14 14
 use WebinoEventLib\EventsAwareTrait;
15 15
 
16
-require __DIR__ . '/../../vendor/autoload.php';
16
+require __DIR__.'/../../vendor/autoload.php';
17 17
 
18 18
 /**
19 19
  * Custom event
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
  * Binding to
91 91
  * custom event.
92 92
  */
93
-$myService->getEvents()->attach('doSomething', function (Event $event) use ($app) {
93
+$myService->getEvents()->attach('doSomething', function(Event $event) use ($app) {
94 94
     $app->set('responseText', new Html\Text($event->getParam('responseText')));
95 95
 });
96 96
 
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
  * Binding to custom
99 99
  * event object.
100 100
  */
101
-$myService->getEvents()->attach('doSomethingDifferent', function (MyServiceEvent $event) use ($app) {
102
-    $app->get('responseText')->setValue('%s ' . $event->getResponseText());
101
+$myService->getEvents()->attach('doSomethingDifferent', function(MyServiceEvent $event) use ($app) {
102
+    $app->get('responseText')->setValue('%s '.$event->getResponseText());
103 103
 });
104 104
 
105
-$app->bind(DefaultRoute::class, function (RouteEvent $event) use ($myService) {
105
+$app->bind(DefaultRoute::class, function(RouteEvent $event) use ($myService) {
106 106
     /**
107 107
      * Calling custom
108 108
      * service methods.
Please login to merge, or discard this patch.
examples/simple/public/filesystem-delete/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
10 10
 use WebinoExamplesLib\Html\ScrollBox;
11 11
 use WebinoHtmlLib\Html;
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 17
 // setup
18
-$app->file()->write('my/folder/test.txt', 'Test file contents ' . rand());
18
+$app->file()->write('my/folder/test.txt', 'Test file contents '.rand());
19 19
 $app->file()->write('my/folder/test-2.txt', null);
20 20
 
21 21
 /**
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  */
25 25
 $app->file()->delete('my/folder/test-2.txt');
26 26
 
27
-$app->bind(DefaultRoute::class, function (RouteEvent $event) {
27
+$app->bind(DefaultRoute::class, function(RouteEvent $event) {
28 28
     /**
29 29
      * Obtaining test file contents
30 30
      * and removing a file at once.
Please login to merge, or discard this patch.
examples/simple/public/config-app-bootstrap-bind-core/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,1 +1,1 @@
 block discarded – undo
1
-<?php require __DIR__ . '/../events-bind-app-bootstrap-core-config/index.php';
1
+<?php require __DIR__.'/../events-bind-app-bootstrap-core-config/index.php';
Please login to merge, or discard this patch.
examples/simple/public/service-factory-class/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 use WebinoAppLib\Response\Content\SourcePreview;
12 12
 use WebinoAppLib\Router\DefaultRoute;
13 13
 
14
-require __DIR__ . '/../../vendor/autoload.php';
14
+require __DIR__.'/../../vendor/autoload.php';
15 15
 
16 16
 /**
17 17
  * Custom service
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
  */
49 49
 $app->set(MyService::class, MyServiceFactory::class);
50 50
 
51
-$app->bind(DefaultRoute::class, function (RouteEvent $event) {
51
+$app->bind(DefaultRoute::class, function(RouteEvent $event) {
52 52
     /**
53 53
      * Obtaining service
54 54
      * instance.
Please login to merge, or discard this patch.
examples/simple/public/console-bind/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 use WebinoExamplesLib\Html\ConsolePreview;
13 13
 use WebinoHtmlLib\Html;
14 14
 
15
-require __DIR__ . '/../../vendor/autoload.php';
15
+require __DIR__.'/../../vendor/autoload.php';
16 16
 
17 17
 $config = Webino::config([
18 18
     /**
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
  * Binding to custom
32 32
  * console command.
33 33
  */
34
-$app->bindConsole('myCommand', function (ConsoleEvent $event) {
34
+$app->bindConsole('myCommand', function(ConsoleEvent $event) {
35 35
     $cli = $event->getCli();
36 36
     $cli->out('My custom command example!')->br();
37 37
 });
38 38
 
39
-$app->bind(DefaultRoute::class, function (RouteEvent $event) {
39
+$app->bind(DefaultRoute::class, function(RouteEvent $event) {
40 40
     $event->setResponseContent([
41 41
         new Html\Text('Use Command Line Interface!'),
42 42
         new ConsolePreview('preview.jpg'),
Please login to merge, or discard this patch.
examples/simple/public/console-input-accept-closure/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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->setResponseContent([
51 51
         new Html\Text('Use Command Line Interface!'),
52 52
         new ConsolePreview('preview.gif'),
Please login to merge, or discard this patch.
examples/simple/public/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 use WebinoViewLib\Feature\CommonView;
17 17
 use WebinoViewLib\Feature\NodeView;
18 18
 
19
-require __DIR__ . '/../vendor/autoload.php';
19
+require __DIR__.'/../vendor/autoload.php';
20 20
 
21 21
 /**
22 22
  * Custom view component
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
             list($section) = explode('-', $info['filename'], 2);
51 51
             $label = ucwords(str_replace('-', ' ', $info['filename']));
52
-            $examples[ucfirst($section)][] = new Html\Url($info['filename'], $label) . new Html\LineBreak;
52
+            $examples[ucfirst($section)][] = new Html\Url($info['filename'], $label).new Html\LineBreak;
53 53
         }
54 54
 
55 55
         $this->api = '';
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
 $app = Webino::application($config, Webino::debugger(Webino::debuggerOptions()->setBar()))->bootstrap();
102 102
 
103
-$app->bind(DefaultRoute::class, function (RouteEvent $event) {
103
+$app->bind(DefaultRoute::class, function(RouteEvent $event) {
104 104
     $event->setResponse(new ViewResponse);
105 105
 });
106 106
 
Please login to merge, or discard this patch.
examples/simple/public/config-service-invokable/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,1 +1,1 @@
 block discarded – undo
1
-<?php require __DIR__ . '/../service-invokable-config/index.php';
1
+<?php require __DIR__.'/../service-invokable-config/index.php';
Please login to merge, or discard this patch.