Completed
Push — prototype ( 942ea2...3bfdd7 )
by Peter
04:02
created
examples/simple/public/console-animation-custom/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
-        $cli->addArt(__DIR__ . '/animation');
33
+        $cli->addArt(__DIR__.'/animation');
34 34
         $cli->animation('bender')->speed(50)->run();
35 35
     }
36 36
 }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
 $app = Webino::application($config)->bootstrap();
43 43
 
44
-$app->bind(DefaultRoute::class, function (RouteEvent $event) {
44
+$app->bind(DefaultRoute::class, function(RouteEvent $event) {
45 45
     $event->setResponseContent([
46 46
         new Html\Text('Use Command Line Interface!'),
47 47
         (new ConsolePreview('preview.gif'))->setHeight(400),
Please login to merge, or discard this patch.
examples/simple/public/route-config/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 WebinoConfigLib\Feature\Route;
14 14
 use WebinoEventLib\AbstractListener;
15 15
 
16
-require __DIR__ . '/../../vendor/autoload.php';
16
+require __DIR__.'/../../vendor/autoload.php';
17 17
 
18 18
 /**
19 19
  * Listener aggregate
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         /**
28 28
          * Handling default route.
29 29
          */
30
-        $this->listen(DefaultRoute::class, function (RouteEvent $event) {
30
+        $this->listen(DefaultRoute::class, function(RouteEvent $event) {
31 31
             $event->setResponseContent([
32 32
                 new Html\Text('Hello Webino!'),
33 33
                 $event->getApp()->url('myRoute')->html('Go to MyRoute'),
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         /**
39 39
          * Handling custom route.
40 40
          */
41
-        $this->listenRoute('myRoute', function (RouteEvent $event) {
41
+        $this->listenRoute('myRoute', function(RouteEvent $event) {
42 42
             $event->setResponseContent([
43 43
                 new Html\Text('My Route Example!'),
44 44
                 $event->getApp()->url(DefaultRoute::class)->html('Go Home'),
Please login to merge, or discard this patch.
examples/simple/public/debugger/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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->setResponseContent([
23 23
         'Check out right bottom corner > TRACY!',
24 24
         new SourcePreview(__FILE__),
Please login to merge, or discard this patch.
examples/simple/public/service-factory-object/index.php 2 patches
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, new MyServiceFactory);
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.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
  * Webino example
5 5
  */
6 6
 
7
-use WebinoAppLib\Application\CoreConfig;
8 7
 use WebinoAppLib\Event\RouteEvent;
9 8
 use WebinoAppLib\Factory\AbstractFactory;
10 9
 use WebinoAppLib\Feature\Service;
Please login to merge, or discard this patch.
examples/simple/public/view-component-counter-ajax/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 use WebinoViewLib\Feature\CommonView;
16 16
 use WebinoViewLib\Feature\NodeView;
17 17
 
18
-require __DIR__ . '/../../vendor/autoload.php';
18
+require __DIR__.'/../../vendor/autoload.php';
19 19
 
20 20
 /**
21 21
  * Custom view component
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
         $event->getNode('display')
55 55
             ->setValue($this->getState()->count);
56 56
 
57
-        $this->onStateChange('plus', function () {
57
+        $this->onStateChange('plus', function() {
58 58
             $this->getState()->count++;
59 59
         });
60 60
 
61
-        $this->onStateChange('minus', function () {
61
+        $this->onStateChange('minus', function() {
62 62
             $this->getState()->count--;
63 63
         });
64 64
     }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 $app = Webino::application($config)->bootstrap();
82 82
 
83
-$app->bind(DefaultRoute::class, function (RouteEvent $event) {
83
+$app->bind(DefaultRoute::class, function(RouteEvent $event) {
84 84
     $event->setResponse(new ViewResponse);
85 85
 });
86 86
 
Please login to merge, or discard this patch.
examples/skeleton-application/config/application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 //    new ConfigFeature\ConfigCacheEnabled,
36 36
     new AppFeature\FilesystemCache,
37 37
 
38
-    ['responseText' => 'Random: ' . rand(9, 9999)],
38
+    ['responseText' => 'Random: '.rand(9, 9999)],
39 39
 
40 40
     new AppFeature\CoreListener(MyCoreListener::class),
41 41
 
Please login to merge, or discard this patch.
examples/skeleton-application/dispatch.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -333,10 +333,10 @@
 block discarded – undo
333 333
         // todo configurable locators
334 334
         $table = $doc->locate('table');
335 335
         $table->locate('thead th')
336
-              ->loop(array_keys(current($data)), function (\WebinoDomLib\Dom\NodeList $node, $data) {
337
-                  // TODO emit event
338
-                  $node->setValue($data);
339
-              });
336
+                ->loop(array_keys(current($data)), function (\WebinoDomLib\Dom\NodeList $node, $data) {
337
+                    // TODO emit event
338
+                    $node->setValue($data);
339
+                });
340 340
 
341 341
         $table->locate('tbody tr')
342 342
             ->loop($data, function (\WebinoDomLib\Dom\NodeList $node, $data) {
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 //dd($app->url('something', ['paramtest' => '123456']));
45 45
 
46 46
 
47
-$app->bind(RouteEvent::NO_MATCH, function (DispatchEvent $event) {
47
+$app->bind(RouteEvent::NO_MATCH, function(DispatchEvent $event) {
48 48
     $event->setResponseContent('404 NOT FOUND');
49 49
 });
50 50
 
51
-$app->bind(DefaultRoute::class, function (RouteEvent $event) use ($app) {
51
+$app->bind(DefaultRoute::class, function(RouteEvent $event) use ($app) {
52 52
 
53 53
     $event->setResponseContent('<p>Default Route</p>');
54 54
 
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
 //    echo '<p>Default Something</p>';
61 61
 //});
62 62
 
63
-$app->bindRoute('something', function (RouteEvent $event) {
63
+$app->bindRoute('something', function(RouteEvent $event) {
64 64
 
65 65
 //    dd($event->getRequest()->getBaseUrl());
66 66
 
67 67
 //    dd($event->getRouteParam('paramtest'));
68 68
 
69
-    $event->setResponseContent('<p>Default Something X ' . $event->getParam('paramtest') . '</p>');
69
+    $event->setResponseContent('<p>Default Something X '.$event->getParam('paramtest').'</p>');
70 70
 }, AppEvent::FINISH);
71 71
 
72
-$app->bindRoute('something', function (RouteEvent $event) use ($app) {
72
+$app->bindRoute('something', function(RouteEvent $event) use ($app) {
73 73
     $event->setResponseContent('<p>Default Something 2</p>');
74 74
     $event->setResponseContent($app->url(DefaultRoute::class)->html('Test link to home')->setTitle('Bla bla bla')->setClass('x'));
75 75
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
 // TODO route lisetner
85 85
 
86
-$app->bind(AppEvent::DISPATCH, function (DispatchEvent $event) use ($app) {
86
+$app->bind(AppEvent::DISPATCH, function(DispatchEvent $event) use ($app) {
87 87
 
88 88
 //    dd($event->getApp());
89 89
 //    dd($event->getRequest());
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
 // TODO
151 151
 //$app->bind(DrawEvent::RENDER, function (DrawEvent $event) {
152
-$app->bind('render.html', function (DispatchEvent $event) {
152
+$app->bind('render.html', function(DispatchEvent $event) {
153 153
 
154 154
     /** @var \WebinoDomLib\Dom $html */
155 155
     $doc = $event->getParam('doc');
@@ -181,8 +181,8 @@  discard block
 block discarded – undo
181 181
 
182 182
 });
183 183
 
184
-$app->bind(DefaultRoute::class, function () use ($app) {
185
-    $app->bind('render.html', function (DispatchEvent $event) {
184
+$app->bind(DefaultRoute::class, function() use ($app) {
185
+    $app->bind('render.html', function(DispatchEvent $event) {
186 186
 
187 187
         /** @var \WebinoDomLib\Dom $doc */
188 188
         $doc = $event->getParam('doc');
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 });
198 198
 
199 199
 // TODO HTML layout listener
200
-$app->bind(AppEvent::DISPATCH, function (DispatchEvent $event) {
200
+$app->bind(AppEvent::DISPATCH, function(DispatchEvent $event) {
201 201
 
202 202
     $content = $event->getResponse()->getContent();
203 203
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     $events = $renderer->getEventManager();
237 237
 
238 238
     // setting a value
239
-    $events->attach('render', function ($event) {
239
+    $events->attach('render', function($event) {
240 240
 
241 241
         $node  = $event->getParam('node');
242 242
         $spec  = $event->getParam('spec');
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     });
247 247
 
248 248
     // setting an html
249
-    $events->attach('render', function ($event) {
249
+    $events->attach('render', function($event) {
250 250
 
251 251
         $node = $event->getParam('node');
252 252
         $spec = $event->getParam('spec');
@@ -254,14 +254,14 @@  discard block
 block discarded – undo
254 254
 
255 255
         // todo replace placeholders
256 256
         $innerHtml = $node->getInnerHtml();
257
-        $html = $innerHtml . $html;
257
+        $html = $innerHtml.$html;
258 258
 
259 259
         empty($html) or $node->setHtml($html);
260 260
     });
261 261
 
262 262
     // TODO components render listener
263 263
     // components
264
-    $events->attach('render', function (\Zend\EventManager\Event $event) {
264
+    $events->attach('render', function(\Zend\EventManager\Event $event) {
265 265
         /** @var \WebinoDomLib\State\Spec $spec */
266 266
         $spec = $event->getParam('spec');
267 267
 
@@ -276,13 +276,13 @@  discard block
 block discarded – undo
276 276
         if (class_exists($options['component'])) {
277 277
             $events->trigger($options['component'], $event);
278 278
         } else {
279
-            $events->trigger('render.component.' . $options['component'], $event);
279
+            $events->trigger('render.component.'.$options['component'], $event);
280 280
         }
281 281
 
282 282
     }, DispatchEvent::BEGIN * 9);
283 283
 
284 284
     // resolve components data
285
-    $events->attach(\WebinoDrawLib\Feature\TableDraw::class, function ($event) {
285
+    $events->attach(\WebinoDrawLib\Feature\TableDraw::class, function($event) {
286 286
         $spec = $event->getParam('spec');
287 287
         if (!$spec->hasOption('data')) {
288 288
             return;
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     });
308 308
 
309 309
     // table component
310
-    $events->attach(\WebinoDrawLib\Feature\TableDraw::class, function (\Zend\EventManager\Event $event) {
310
+    $events->attach(\WebinoDrawLib\Feature\TableDraw::class, function(\Zend\EventManager\Event $event) {
311 311
 
312 312
         /** @var \WebinoDomLib\Dom\Element $node */
313 313
         $node = $event->getParam('node');
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 
317 317
         // todo replace placeholders
318 318
         $innerHtml = $node->getInnerHtml();
319
-        $html = $innerHtml . $html;
319
+        $html = $innerHtml.$html;
320 320
 
321 321
         $data = $event->getParam('data', []);
322 322
         if (empty($data)) {
@@ -333,16 +333,16 @@  discard block
 block discarded – undo
333 333
         // todo configurable locators
334 334
         $table = $doc->locate('table');
335 335
         $table->locate('thead th')
336
-              ->loop(array_keys(current($data)), function (\WebinoDomLib\Dom\NodeList $node, $data) {
336
+              ->loop(array_keys(current($data)), function(\WebinoDomLib\Dom\NodeList $node, $data) {
337 337
                   // TODO emit event
338 338
                   $node->setValue($data);
339 339
               });
340 340
 
341 341
         $table->locate('tbody tr')
342
-            ->loop($data, function (\WebinoDomLib\Dom\NodeList $node, $data) {
342
+            ->loop($data, function(\WebinoDomLib\Dom\NodeList $node, $data) {
343 343
 
344 344
                 $node->locate('td')
345
-                    ->loop($data, function (\WebinoDomLib\Dom\NodeList $node, $data) {
345
+                    ->loop($data, function(\WebinoDomLib\Dom\NodeList $node, $data) {
346 346
                         // TODO emit event
347 347
                         $node->setValue($data);
348 348
                     });
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 
376 376
 //$app->bind(AppEvent::DISPATCH, MyListener::class, AppEvent::BEGIN);
377 377
 
378
-$app->bind(AppEvent::DISPATCH, function () use ($app) {
378
+$app->bind(AppEvent::DISPATCH, function() use ($app) {
379 379
     //    undefined();
380 380
     //    echo 'Svet';
381 381
 
Please login to merge, or discard this patch.
library/WebinoAppLib/Application/Traits/ConfigTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
      */
105 105
     public function onConfig(callable $callback)
106 106
     {
107
-        $this->bind(AppEvent::CONFIGURE, function (AppEvent $event) use ($callback) {
107
+        $this->bind(AppEvent::CONFIGURE, function(AppEvent $event) use ($callback) {
108 108
             $event->getApp()->setConfig(call_user_func($callback));
109 109
         });
110 110
     }
Please login to merge, or discard this patch.
library/WebinoAppLib/Module/AbstractModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $modules = $app->get(Modules::class);
20 20
         $modules->loadModules($this->getDependencies());
21 21
 
22
-        $app->onConfig(function () {
22
+        $app->onConfig(function() {
23 23
             return $this->getConfig();
24 24
         });
25 25
 
Please login to merge, or discard this patch.