Completed
Push — master ( c64881...c0b61c )
by GBProd
02:14
created
src/ElasticsearchDataProviderBundle/Command/ProvideCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         
98 98
         $dispatcher->addListener(
99 99
             'elasticsearch.has_started_handling',
100
-            function (HasStartedHandling $event) use ($output) {
100
+            function(HasStartedHandling $event) use ($output) {
101 101
                 $output->writeln(sprintf(
102 102
                     '<info>Start running <comment>%d</comment> providers</info>', 
103 103
                     count($event->getEntries())
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         $dispatcher->addListener(
109 109
             'elasticsearch.has_started_providing',
110
-            function (HasStartedProviding $event) use ($output) {
110
+            function(HasStartedProviding $event) use ($output) {
111 111
                 $output->writeln(sprintf(
112 112
                     '<info>Start running <comment>%s</comment> provider</info>',
113 113
                     get_class($event->getEntry()->getProvider())
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         
118 118
         $dispatcher->addListener(
119 119
             'elasticsearch.has_indexed_document',
120
-            function (HasIndexingDocument $event) use ($output) {
120
+            function(HasIndexingDocument $event) use ($output) {
121 121
                 $output->writeln(sprintf(
122 122
                     '<info>Indexing <comment>%s</comment> document</info>',
123 123
                     get_class($event->getEntry()->getId())
Please login to merge, or discard this patch.
tests/ElasticsearchDataProviderBundle/DataProvider/DataProviderTest.php 1 patch
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -13,68 +13,68 @@
 block discarded – undo
13 13
  */
14 14
 class DataProviderTest extends \PHPUnit_Framework_TestCase
15 15
 {
16
-   public function testRunExecutePopulate()
17
-   {
18
-      $provider = $this->getMockForAbstractClass(DataProvider::class);
16
+    public function testRunExecutePopulate()
17
+    {
18
+        $provider = $this->getMockForAbstractClass(DataProvider::class);
19 19
       
20
-      $provider
21
-         ->expects($this->once())
22
-         ->method('populate')
23
-      ;
20
+        $provider
21
+            ->expects($this->once())
22
+            ->method('populate')
23
+        ;
24 24
       
25
-      $provider->run(
26
-         $this->getClient(), 
27
-         'index', 
28
-         'type',
29
-         $this->getMock(EventDispatcherInterface::class)
30
-      );
31
-   }
25
+        $provider->run(
26
+            $this->getClient(), 
27
+            'index', 
28
+            'type',
29
+            $this->getMock(EventDispatcherInterface::class)
30
+        );
31
+    }
32 32
    
33
-   private function getClient()
34
-   {
35
-      return $this
36
-         ->getMockBuilder(Client::class)
37
-         ->disableOriginalConstructor()
38
-         ->getMock()
39
-      ;
40
-   }
33
+    private function getClient()
34
+    {
35
+        return $this
36
+            ->getMockBuilder(Client::class)
37
+            ->disableOriginalConstructor()
38
+            ->getMock()
39
+        ;
40
+    }
41 41
    
42
-   public function testIndexWithIndexAndType()
43
-   {
44
-      $provider = $this->getMockForAbstractClass(DataProvider::class);
42
+    public function testIndexWithIndexAndType()
43
+    {
44
+        $provider = $this->getMockForAbstractClass(DataProvider::class);
45 45
       
46
-      $client = $this->getClient();
47
-      $client
48
-         ->expects($this->once())
49
-         ->method('index')
50
-         ->with([
46
+        $client = $this->getClient();
47
+        $client
48
+            ->expects($this->once())
49
+            ->method('index')
50
+            ->with([
51 51
             'index' => 'my_index',
52 52
             'type'  => 'my_type',
53 53
             'id'    => 'my_id',
54 54
             'body'  => ['foo' => 'bar'],
55
-         ])
56
-      ;
55
+            ])
56
+        ;
57 57
       
58
-      $provider
59
-         ->expects($this->once())
60
-         ->method('populate')
61
-         ->will(
58
+        $provider
59
+            ->expects($this->once())
60
+            ->method('populate')
61
+            ->will(
62 62
             $this->returnCallback(
63
-               function () use ($provider) {
64
-                  $provider->index(
65
-                     'my_id', 
66
-                     ['foo' => 'bar']
67
-                  );   
68
-               }
63
+                function () use ($provider) {
64
+                    $provider->index(
65
+                        'my_id', 
66
+                        ['foo' => 'bar']
67
+                    );   
68
+                }
69 69
             )
70
-         )
71
-      ;
70
+            )
71
+        ;
72 72
       
73
-      $provider->run(
74
-         $client, 
75
-         'my_index', 
76
-         'my_type',
77
-         $this->getMock(EventDispatcherInterface::class)
78
-      );
79
-   }
73
+        $provider->run(
74
+            $client, 
75
+            'my_index', 
76
+            'my_type',
77
+            $this->getMock(EventDispatcherInterface::class)
78
+        );
79
+    }
80 80
 }
81 81
\ No newline at end of file
Please login to merge, or discard this patch.