Completed
Push — master ( 051826...bdcfe3 )
by Alessandro
06:32
created
src/Paraunit/Lifecycle/CompilerPass.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function process(ContainerBuilder $container)
41 41
     {
42
-        if ( ! $container->hasDefinition($this->dispatcherService) && ! $container->hasAlias($this->dispatcherService)) {
42
+        if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) {
43 43
             return;
44 44
         }
45 45
         $definition = $container->findDefinition($this->dispatcherService);
46 46
         foreach ($container->findTaggedServiceIds($this->listenerTag) as $id => $events) {
47 47
             $def = $container->getDefinition($id);
48
-            if ( ! $def->isPublic()) {
48
+            if (!$def->isPublic()) {
49 49
                 throw new \InvalidArgumentException(sprintf('The service "%s" must be public as event listeners are lazy-loaded.', $id));
50 50
             }
51 51
             if ($def->isAbstract()) {
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
             }
54 54
             foreach ($events as $event) {
55 55
                 $priority = isset($event['priority']) ? $event['priority'] : 0;
56
-                if ( ! isset($event['event'])) {
56
+                if (!isset($event['event'])) {
57 57
                     throw new \InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag));
58 58
                 }
59
-                if ( ! isset($event['method'])) {
59
+                if (!isset($event['method'])) {
60 60
                     $event['method'] = 'on' . preg_replace_callback(array(
61 61
                             '/(?<=\b)[a-z]/i',
62 62
                             '/[^a-z0-9]/i',
63
-                        ), function ($matches) {
63
+                        ), function($matches) {
64 64
                             return strtoupper($matches[0]);
65 65
                         }, $event['event']);
66 66
                     $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         }
71 71
         foreach ($container->findTaggedServiceIds($this->subscriberTag) as $id => $attributes) {
72 72
             $def = $container->getDefinition($id);
73
-            if ( ! $def->isPublic()) {
73
+            if (!$def->isPublic()) {
74 74
                 throw new \InvalidArgumentException(sprintf('The service "%s" must be public as event subscribers are lazy-loaded.', $id));
75 75
             }
76 76
             if ($def->isAbstract()) {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $class = $container->getParameterBag()->resolveValue($def->getClass());
81 81
             $refClass = new \ReflectionClass($class);
82 82
             $interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface';
83
-            if ( ! $refClass->implementsInterface($interface)) {
83
+            if (!$refClass->implementsInterface($interface)) {
84 84
                 throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface));
85 85
             }
86 86
             $definition->addMethodCall('addSubscriberService', array($id, $class));
Please login to merge, or discard this patch.
src/Paraunit/Tests/Functional/RunnerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     {
135 135
         $phpunitVersion = new \PHPUnit_Runner_Version();
136 136
 
137
-        if ( ! preg_match('/^5\./', $phpunitVersion->id())) {
137
+        if (!preg_match('/^5\./', $phpunitVersion->id())) {
138 138
             $this->markTestSkipped('PHPUnit < 5 in this env, warnings are not present.');
139 139
         }
140 140
 
Please login to merge, or discard this patch.