Completed
Push — master ( 760e28...f96294 )
by Simonas
49:59
created
DependencyInjection/ONGRSettingsExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         // Set profiles.
41 41
         $container->setParameter('ongr_settings.settings_container.profiles', $config['profiles']);
42 42
 
43
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
43
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
44 44
         $loader->load('services/twig_extension.yml');
45 45
         $loader->load('services/personal_settings.yml');
46 46
         $loader->load('services/general_settings.yml');
Please login to merge, or discard this patch.
Tests/app/AppKernel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,6 +46,6 @@
 block discarded – undo
46 46
      */
47 47
     public function registerContainerConfiguration(LoaderInterface $loader)
48 48
     {
49
-        $loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
49
+        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
Controller/ProfilesController.php 1 patch
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -14,11 +14,7 @@
 block discarded – undo
14 14
 use ONGR\ElasticsearchBundle\Result\DocumentIterator;
15 15
 use ONGR\ElasticsearchBundle\Service\Repository;
16 16
 use ONGR\ElasticsearchDSL\Aggregation\TermsAggregation;
17
-use ONGR\ElasticsearchDSL\Aggregation\TopHitsAggregation;
18
-use ONGR\ElasticsearchDSL\Search;
19 17
 use ONGR\ElasticsearchBundle\Result\Aggregation\AggregationValue;
20
-use ONGR\SettingsBundle\Document\Setting;
21
-use ONGR\SettingsBundle\Service\SettingsManager;
22 18
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
23 19
 use Symfony\Component\HttpFoundation\JsonResponse;
24 20
 use Symfony\Component\HttpFoundation\Request;
Please login to merge, or discard this patch.
Controller/SettingsController.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,6 @@
 block discarded – undo
71 71
     /**
72 72
      * Returns a json list of profiles
73 73
      *
74
-     * @param Request $request
75 74
      *
76 75
      * @return Response
77 76
      */
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -11,9 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace ONGR\SettingsBundle\Controller;
13 13
 
14
-use ONGR\ElasticsearchBundle\Result\Aggregation\AggregationValue;
15
-use ONGR\ElasticsearchBundle\Service\Repository;
16
-use ONGR\ElasticsearchDSL\Aggregation\TermsAggregation;
17 14
 use ONGR\SettingsBundle\Document\Setting;
18 15
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
19 16
 use Symfony\Component\HttpFoundation\JsonResponse;
Please login to merge, or discard this patch.
Document/Setting.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
     /**
151 151
      * Set profile.
152 152
      *
153
-     * @param string|array $profile
153
+     * @param string[] $profile
154 154
      */
155 155
     public function setProfile($profile)
156 156
     {
Please login to merge, or discard this patch.
Tests/Unit/Service/SettingsManagerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             'value' => 'foo',
125 125
         ];
126 126
 
127
-        $this->manager->expects($this->once())->method('persist')->with($this->callback(function ($obj) {
127
+        $this->manager->expects($this->once())->method('persist')->with($this->callback(function($obj) {
128 128
             return $obj instanceof Setting;
129 129
         }))->willReturn(null);
130 130
         $this->manager->expects($this->once())->method('persist')->willReturn(null);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $document = $manager->create($data);
137 137
 
138 138
         foreach ($data as $key => $value) {
139
-            $this->assertEquals($value, $document->{'get' . ucfirst($key)}());
139
+            $this->assertEquals($value, $document->{'get'.ucfirst($key)}());
140 140
         }
141 141
     }
142 142
 
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
         $activeProfilesSetting = 'active_profiles';
435 435
 
436 436
         $this->repository->expects($this->any())->method('findOneBy')->willReturnCallback(
437
-            function ($arg) use ($activeProfilesSetting) {
437
+            function($arg) use ($activeProfilesSetting) {
438 438
                 $settingName = $arg['name'];
439 439
                 $setting = new Setting();
440 440
                 switch ($settingName) {
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
         $this->cookie->expects($this->any())->method('getValue')->willReturn(['foo']);
481 481
         $this->cache->expects($this->any())->method('contains')->willReturn(true);
482 482
         $this->cache->expects($this->any())->method('fetch')->willReturnCallback(
483
-            function ($arg) use ($activeProfilesSetting) {
483
+            function($arg) use ($activeProfilesSetting) {
484 484
                 if ($arg == $activeProfilesSetting) {
485 485
                     return ['foo'];
486 486
                 }
Please login to merge, or discard this patch.