Test Setup Failed
Push — master ( 568f60...80f464 )
by
unknown
03:06
created
Oro/Bundle/DemoDataBundle/Migrations/Data/Demo/ORM/LoadSalesFunnelData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@
 block discarded – undo
235 235
      */
236 236
     protected function getRandomBoolean()
237 237
     {
238
-        return (bool) mt_rand(0, 1);
238
+        return (bool)mt_rand(0, 1);
239 239
     }
240 240
 
241 241
     /**
Please login to merge, or discard this patch.
src/Oro/Bundle/DemoDataBundle/Migrations/Data/Demo/ORM/LoadEmailData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function getDependencies()
48 48
     {
49
-        return ['Oro\Bundle\DemoDataBundle\Migrations\Data\Demo\ORM\LoadContactData',];
49
+        return ['Oro\Bundle\DemoDataBundle\Migrations\Data\Demo\ORM\LoadContactData', ];
50 50
     }
51 51
 
52 52
     /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             ->get('kernel')
80 80
             ->locateResource('@OroDemoDataBundle/Migrations/Data/Demo/ORM/dictionaries');
81 81
 
82
-        $handle = fopen($dictionaryDir . DIRECTORY_SEPARATOR. "emails.csv", "r");
82
+        $handle = fopen($dictionaryDir . DIRECTORY_SEPARATOR . "emails.csv", "r");
83 83
         if ($handle) {
84 84
             $headers = [];
85 85
             if (($data = fgetcsv($handle, 1000, ",")) !== false) {
Please login to merge, or discard this patch.
Bundle/DemoDataBundle/Migrations/Data/Demo/ORM/LoadECommerceDashboard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         }
59 59
 
60 60
         foreach ($this->widgets as $widgetData) {
61
-            $widgets = $dashboard->getWidgets()->filter(function (WidgetModel $widget) use ($widgetData) {
61
+            $widgets = $dashboard->getWidgets()->filter(function(WidgetModel $widget) use ($widgetData) {
62 62
                 return $widget->getName() === $widgetData['name'];
63 63
             });
64 64
 
Please login to merge, or discard this patch.
Oro/Bundle/DemoDataBundle/Migrations/Data/Demo/ORM/LoadB2bCustomerData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
             ->getArrayResult();
165 165
 
166 166
         return array_map(
167
-            function ($item) {
167
+            function($item) {
168 168
                 return $item['id'];
169 169
             },
170 170
             $items
Please login to merge, or discard this patch.
src/Oro/Bundle/DemoDataBundle/Migrations/Data/Demo/ORM/LoadContactData.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -122,16 +122,16 @@  discard block
 block discarded – undo
122 122
             ->get('kernel')
123 123
             ->locateResource('@OroDemoDataBundle/Migrations/Data/Demo/ORM/dictionaries');
124 124
 
125
-        $handle = fopen($dictionaryDir . DIRECTORY_SEPARATOR. "accounts.csv", "r");
125
+        $handle = fopen($dictionaryDir . DIRECTORY_SEPARATOR . "accounts.csv", "r");
126 126
         if ($handle) {
127 127
             $headers = array();
128 128
             if (($data = fgetcsv($handle, 1000, ",")) !== false) {
129 129
                 //read headers
130 130
                 $headers = $data;
131 131
             }
132
-            $randomUser = count($this->users)-1;
133
-            $randomContactGroup = count($this->contactGroups)-1;
134
-            $randomContactSource = count($this->contactSources)-1;
132
+            $randomUser = count($this->users) - 1;
133
+            $randomContactGroup = count($this->contactGroups) - 1;
134
+            $randomContactSource = count($this->contactSources) - 1;
135 135
             while (($data = fgetcsv($handle, 1000, ",")) !== false) {
136 136
                 $data = array_combine($headers, array_values($data));
137 137
                 //find accounts
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
                 $account = array_filter(
141 141
                     $this->accounts,
142
-                    function (Account $a) use ($company) {
142
+                    function(Account $a) use ($company) {
143 143
                         return $a->getName() == $company;
144 144
                     }
145 145
                 );
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $isoCode = $data['Country'];
213 213
         $country = array_filter(
214 214
             $this->countries,
215
-            function (Country $a) use ($isoCode) {
215
+            function(Country $a) use ($isoCode) {
216 216
                 return $a->getIso2Code() == $isoCode;
217 217
             }
218 218
         );
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         $regions = $country->getRegions();
227 227
 
228 228
         $region = $regions->filter(
229
-            function (Region $a) use ($idRegion) {
229
+            function(Region $a) use ($idRegion) {
230 230
                 return $a->getCode() == $idRegion;
231 231
             }
232 232
         );
Please login to merge, or discard this patch.
src/Oro/Bundle/DemoDataBundle/Migrations/Data/Demo/ORM/LoadTagsData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
             ->getQuery()
107 107
             ->setMaxResults(1)
108 108
             ->getSingleResult();
109
-        $token        = new UsernamePasswordOrganizationToken(
109
+        $token = new UsernamePasswordOrganizationToken(
110 110
             $adminUser,
111 111
             $adminUser->getUsername(),
112 112
             'main',
Please login to merge, or discard this patch.
src/Oro/Bundle/DemoDataBundle/Migrations/Data/Demo/ORM/LoadLeadsData.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         /** @var AbstractEnumValue[] $sources */
110 110
         $sources = $enumRepo->findAll();
111
-        $randomSource = count($sources)-1;
111
+        $randomSource = count($sources) - 1;
112 112
 
113 113
         $leads = $this->em->getRepository('OroSalesBundle:Lead')->findAll();
114 114
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             ->get('kernel')
128 128
             ->locateResource('@OroDemoDataBundle/Migrations/Data/Demo/ORM/dictionaries');
129 129
 
130
-        $handle = fopen($dictionaryDir . DIRECTORY_SEPARATOR. "leads.csv", "r");
130
+        $handle = fopen($dictionaryDir . DIRECTORY_SEPARATOR . "leads.csv", "r");
131 131
         if ($handle) {
132 132
             $headers = array();
133 133
             if (($data = fgetcsv($handle, 1000, ",")) !== false) {
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         $isoCode = $data['Country'];
211 211
         $country = array_filter(
212 212
             $this->countries,
213
-            function (Country $a) use ($isoCode) {
213
+            function(Country $a) use ($isoCode) {
214 214
                 return $a->getIso2Code() == $isoCode;
215 215
             }
216 216
         );
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         $regions = $country->getRegions();
225 225
 
226 226
         $region = $regions->filter(
227
-            function (Region $a) use ($idRegion) {
227
+            function(Region $a) use ($idRegion) {
228 228
                 return $a->getCode() == $idRegion;
229 229
             }
230 230
         );
Please login to merge, or discard this patch.
src/Oro/Bundle/AnalyticsBundle/Command/CalculateAnalyticsCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             ->addOption(
48 48
                 'ids',
49 49
                 null,
50
-                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
50
+                InputOption::VALUE_OPTIONAL|InputOption::VALUE_IS_ARRAY,
51 51
                 'Customer identity ids for given channel'
52 52
             );
53 53
     }
Please login to merge, or discard this patch.
AnalyticsBundle/Tests/Functional/Command/CalculateAnalyticsCommandTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
         /** @var Channel $channel */
32 32
         $channel = $this->getReference('Channel.CustomerChannel');
33 33
 
34
-        $result = $this->runCommand('oro:cron:analytic:calculate', ['--channel='.$channel->getId()]);
34
+        $result = $this->runCommand('oro:cron:analytic:calculate', ['--channel=' . $channel->getId()]);
35 35
 
36
-        self::assertContains('Schedule analytics calculation for "'.$channel->getId().'" channel.', $result);
36
+        self::assertContains('Schedule analytics calculation for "' . $channel->getId() . '" channel.', $result);
37 37
         self::assertContains('Completed', $result);
38 38
 
39 39
         self::assertMessageSent(
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         $result = $this->runCommand('oro:cron:analytic:calculate', ['--channel=' . $channelId]);
58 58
 
59
-        self::assertContains('Schedule analytics calculation for "'. $channelId.'" channel.', $result);
59
+        self::assertContains('Schedule analytics calculation for "' . $channelId . '" channel.', $result);
60 60
         self::assertContains(sprintf('Channel is not supposed to calculate analytics: %s', $channelId), $result);
61 61
     }
62 62
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         $result = $this->runCommand('oro:cron:analytic:calculate', ['--channel=' . $channelId]);
70 70
 
71
-        self::assertContains('Schedule analytics calculation for "'. $channelId . '" channel.', $result);
71
+        self::assertContains('Schedule analytics calculation for "' . $channelId . '" channel.', $result);
72 72
         self::assertContains(sprintf('Channel not active: %s', $channelId), $result);
73 73
     }
74 74
 
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
         $customerTwo = $this->getReference('Channel.CustomerChannel.Customer2');
106 106
 
107 107
         $result = $this->runCommand('oro:cron:analytic:calculate', [
108
-            '--channel='.$channel->getId(),
109
-            '--ids='.$customerOne->getId(),
110
-            '--ids='.$customerTwo->getId(),
108
+            '--channel=' . $channel->getId(),
109
+            '--ids=' . $customerOne->getId(),
110
+            '--ids=' . $customerTwo->getId(),
111 111
         ]);
112 112
 
113
-        self::assertContains('Schedule analytics calculation for "'.$channel->getId().'" channel.', $result);
113
+        self::assertContains('Schedule analytics calculation for "' . $channel->getId() . '" channel.', $result);
114 114
         self::assertContains('Completed', $result);
115 115
 
116 116
         self::assertMessageSent(
Please login to merge, or discard this patch.