Completed
Branch master (a1753a)
by Mikhail
01:53
created
src/SilexDoctrineHydrationProfile/SilexDoctrineHydrationProfileProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function register(Application $app)
26 26
     {
27
-        $app["debesha.doctrine_extra_profiler.logger"] = $app->share(function () use ($app) {
27
+        $app["debesha.doctrine_extra_profiler.logger"] = $app->share(function() use ($app) {
28 28
             return new HydrationLogger($app->offsetGet("orm.em"));
29 29
         });
30
-        $app["debesha.doctrine_extra_profiler.data_collector"] = $app->share(function () use ($app) {
30
+        $app["debesha.doctrine_extra_profiler.data_collector"] = $app->share(function() use ($app) {
31 31
             return new HydrationDataCollector(
32 32
                 $app->offsetGet("debesha.doctrine_extra_profiler.logger")
33 33
             );
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
         $templates   = $app["data_collector.templates"];
64 64
         $templates[] = array("hydrations", "@DebeshaDoctrineProfileExtraBundle/Collector/hydrations.html.twig");
65 65
         $options     = array('is_safe' => array('html'));
66
-        $callable    = function ($controller, $attributes = array(), $query = array()) {
66
+        $callable    = function($controller, $attributes = array(), $query = array()) {
67 67
             return new ControllerReference($controller, $attributes, $query);
68 68
         };
69
-        $collectors["hydrations"] = $app->share(function ($app) {
69
+        $collectors["hydrations"] = $app->share(function($app) {
70 70
             return $app["debesha.doctrine_extra_profiler.data_collector"];
71 71
         });
72 72
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $app["data_collector.templates"] = $templates;
75 75
 
76 76
         $app["twig"]->addFunction(new \Twig_SimpleFunction("controller", $callable, $options));
77
-        $app['twig.loader.filesystem']->addPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . "Views", "DebeshaDoctrineProfileExtraBundle");
77
+        $app['twig.loader.filesystem']->addPath(dirname(__FILE__).DIRECTORY_SEPARATOR."Views", "DebeshaDoctrineProfileExtraBundle");
78 78
     }
79 79
 
80 80
 }
81 81
\ No newline at end of file
Please login to merge, or discard this patch.
src/SilexDoctrineHydrationProfile/Fix/FixHydrationDataCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     /**
17 17
      * @var HydrationLogger
18 18
      */
19
-    protected $hydrationLogger = array ();
19
+    protected $hydrationLogger = array();
20 20
 
21 21
     public function __construct(HydrationLogger $logger)
22 22
     {
Please login to merge, or discard this patch.
src/SilexDoctrineHydrationProfile/Fix/FixDoctrineProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                     $config = $app['orm.ems.config'][$name];
45 45
                 }
46 46
 
47
-                $ems[$name] = $app->share(function () use ($app, $options, $config) {
47
+                $ems[$name] = $app->share(function() use ($app, $options, $config) {
48 48
                     /**
49 49
                      * @var $entityManagerClassName \Doctrine\ORM\EntityManager
50 50
                      */
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                     }
103 103
 
104 104
                     if (!empty($entity['resources_namespace'])) {
105
-                        if($app->offsetExists('psr0_resource_locator')) {
105
+                        if ($app->offsetExists('psr0_resource_locator')) {
106 106
                             $entity['path'] = $app['psr0_resource_locator']->findFirstDirectory($entity['resources_namespace']);
107 107
                         } else {
108 108
                             throw new \InvalidArgumentException('Not exist psr0_resource_locator');
@@ -113,13 +113,13 @@  discard block
 block discarded – undo
113 113
                         $config->addEntityNamespace($entity['alias'], $entity['namespace']);
114 114
                     }
115 115
 
116
-                    if('annotation' === $entity['type']){
116
+                    if ('annotation' === $entity['type']) {
117 117
                         $useSimpleAnnotationReader = isset($entity['use_simple_annotation_reader'])
118 118
                             ? $entity['use_simple_annotation_reader']
119 119
                             : true;
120
-                        $driver =  $config->newDefaultAnnotationDriver((array) $entity['path'], $useSimpleAnnotationReader);
120
+                        $driver = $config->newDefaultAnnotationDriver((array) $entity['path'], $useSimpleAnnotationReader);
121 121
                     } else {
122
-                        $driver = $app['orm.driver.factory']( $entity, $options );
122
+                        $driver = $app['orm.driver.factory']($entity, $options);
123 123
                     }
124 124
                     $chain->addDriver($driver, $entity['namespace']);
125 125
                 }
@@ -140,15 +140,15 @@  discard block
 block discarded – undo
140 140
         });
141 141
 
142 142
 
143
-        $app['orm.driver.factory'] = $app->share(function(){
143
+        $app['orm.driver.factory'] = $app->share(function() {
144 144
             $simpleList = array(
145 145
                 'simple_yml',
146 146
                 'simple_xml',
147 147
             );
148
-            return function ( $entity, $options ) use ($simpleList) {
149
-                if (isset($options[ 'class.driver.' . $entity['type'] ])) {
150
-                    $className = $options[ 'class.driver.' . $entity['type'] ];
151
-                    if( in_array($entity['type'], $simpleList) ) {
148
+            return function($entity, $options) use ($simpleList) {
149
+                if (isset($options['class.driver.'.$entity['type']])) {
150
+                    $className = $options['class.driver.'.$entity['type']];
151
+                    if (in_array($entity['type'], $simpleList)) {
152 152
                         $param = array($entity['path'] => $entity['namespace']);
153 153
                     } else {
154 154
                         $param = $entity['path'];
Please login to merge, or discard this patch.