@@ -28,7 +28,7 @@ |
||
28 | 28 | public function testControllerAsClosure() |
29 | 29 | { |
30 | 30 | $request = new Request(); |
31 | - $request->attributes->set('_controller', function () { |
|
31 | + $request->attributes->set('_controller', function() { |
|
32 | 32 | }); |
33 | 33 | |
34 | 34 | $strategy = new ControllerNamingStrategy(); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | new InputOption('foo'), |
43 | 43 | new InputOption('foobar', 'fb', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY), |
44 | 44 | new InputArgument('name', InputArgument::REQUIRED), |
45 | - ]); |
|
45 | + ]); |
|
46 | 46 | |
47 | 47 | $interactor = $this->getMockBuilder(NewRelicInteractorInterface::class)->getMock(); |
48 | 48 | $interactor->expects($this->once())->method('setTransactionName')->with($this->equalTo('test:newrelic')); |
@@ -43,9 +43,9 @@ |
||
43 | 43 | { |
44 | 44 | return [ |
45 | 45 | KernelEvents::REQUEST => [ |
46 | - ['setApplicationName', 255], |
|
47 | - ['setIgnoreTransaction', 31], |
|
48 | - ['setTransactionName', -10], |
|
46 | + ['setApplicationName', 255], |
|
47 | + ['setIgnoreTransaction', 31], |
|
48 | + ['setTransactionName', -10], |
|
49 | 49 | ], |
50 | 50 | ]; |
51 | 51 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | if (\is_object($controller)) { |
34 | 34 | if (\method_exists($controller, '__invoke')) { |
35 | - return 'Callback controller: '.\get_class($controller).'::__invoke()'; |
|
35 | + return 'Callback controller: ' . \get_class($controller) . '::__invoke()'; |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $controller = \implode('::', $controller); |
46 | 46 | } |
47 | 47 | |
48 | - return 'Callback contoller: '.$controller.'()'; |
|
48 | + return 'Callback contoller: ' . $controller . '()'; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $controller; |
@@ -33,7 +33,7 @@ |
||
33 | 33 | } |
34 | 34 | $this->isRegistered = true; |
35 | 35 | |
36 | - $prevErrorHandler = \set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler) { |
|
36 | + $prevErrorHandler = \set_error_handler(function($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler) { |
|
37 | 37 | if (E_USER_DEPRECATED === $type) { |
38 | 38 | $this->interactor->noticeThrowable(new DeprecationException($msg, 0, $type, $file, $line)); |
39 | 39 | } |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | |
62 | 62 | // send parameters to New Relic |
63 | 63 | foreach ($input->getOptions() as $key => $value) { |
64 | - $key = '--'.$key; |
|
64 | + $key = '--' . $key; |
|
65 | 65 | if (\is_array($value)) { |
66 | 66 | foreach ($value as $k => $v) { |
67 | - $this->interactor->addCustomParameter($key.'['.$k.']', $v); |
|
67 | + $this->interactor->addCustomParameter($key . '[' . $k . ']', $v); |
|
68 | 68 | } |
69 | 69 | } else { |
70 | 70 | $this->interactor->addCustomParameter($key, $value); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | foreach ($input->getArguments() as $key => $value) { |
75 | 75 | if (\is_array($value)) { |
76 | 76 | foreach ($value as $k => $v) { |
77 | - $this->interactor->addCustomParameter($key.'['.$k.']', $v); |
|
77 | + $this->interactor->addCustomParameter($key . '[' . $k . ']', $v); |
|
78 | 78 | } |
79 | 79 | } else { |
80 | 80 | $this->interactor->addCustomParameter($key, $value); |
@@ -88,11 +88,11 @@ |
||
88 | 88 | $response->setContent(''); // free the memory |
89 | 89 | |
90 | 90 | if (null === $this->newRelicTwigExtension || false === $this->newRelicTwigExtension->isHeaderCalled()) { |
91 | - $responseContent = \preg_replace('|<head>|i', '$0'.$this->interactor->getBrowserTimingHeader(), $responseContent); |
|
91 | + $responseContent = \preg_replace('|<head>|i', '$0' . $this->interactor->getBrowserTimingHeader(), $responseContent); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | if (null === $this->newRelicTwigExtension || false === $this->newRelicTwigExtension->isFooterCalled()) { |
95 | - $responseContent = \preg_replace('|</body>|i', $this->interactor->getBrowserTimingFooter().'$0', $responseContent); |
|
95 | + $responseContent = \preg_replace('|</body>|i', $this->interactor->getBrowserTimingFooter() . '$0', $responseContent); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | $response->setContent($responseContent); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | $listener = new DeprecationListener($interactor); |
29 | 29 | |
30 | - \set_error_handler(function () { |
|
30 | + \set_error_handler(function() { |
|
31 | 31 | return false; |
32 | 32 | }); |
33 | 33 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | $listener = new DeprecationListener($interactor); |
49 | 49 | |
50 | - \set_error_handler(function () { |
|
50 | + \set_error_handler(function() { |
|
51 | 51 | return false; |
52 | 52 | }); |
53 | 53 | $e = \error_reporting(0); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | $listener = new DeprecationListener($interactor); |
71 | 71 | |
72 | - \set_error_handler(function () { |
|
72 | + \set_error_handler(function() { |
|
73 | 73 | return false; |
74 | 74 | }); |
75 | 75 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | $listener = new DeprecationListener($interactor); |
112 | 112 | |
113 | - \set_error_handler(function () { |
|
113 | + \set_error_handler(function() { |
|
114 | 114 | return false; |
115 | 115 | }); |
116 | 116 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | continue; |
51 | 51 | } |
52 | 52 | |
53 | - $arguments = \array_map(function (\ReflectionParameter $parameter) { |
|
53 | + $arguments = \array_map(function(\ReflectionParameter $parameter) { |
|
54 | 54 | return $this->getTypeStub($parameter->getType()); |
55 | 55 | }, $method->getParameters()); |
56 | 56 | |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | case 'Throwable': |
81 | 81 | return new \Exception(); |
82 | 82 | case 'callable': |
83 | - return function () { |
|
83 | + return function() { |
|
84 | 84 | }; |
85 | 85 | case 'array': |
86 | 86 | return \array_fill(0, 2, \uniqid('', true)); |
87 | 87 | default: |
88 | - throw new \UnexpectedValueException('Unknow type. '.$type->getName()); |
|
88 | + throw new \UnexpectedValueException('Unknow type. ' . $type->getName()); |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | } |