Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Issue 490 #513

Merged
merged 109 commits into from
May 21, 2017
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
c03534a
fixes #493
Apr 10, 2017
d22e3c1
Apply fixes from StyleCI
prisis Apr 10, 2017
28adabb
fix tests
Apr 10, 2017
3ecf239
Apply fixes from StyleCI
prisis Apr 10, 2017
cb67324
fix names
Apr 10, 2017
0301503
fix names
Apr 10, 2017
0b59739
phpstan is happy
prisis Apr 10, 2017
466eb17
Apply fixes from StyleCI
prisis Apr 10, 2017
c7c590e
profiler fixes
prisis Apr 10, 2017
c8bb66f
working on profiler
prisis Apr 10, 2017
9947520
Apply fixes from StyleCI
prisis Apr 10, 2017
cdb996f
Added new Event | Changed config names
Apr 11, 2017
63ec0ac
Merge branch 'develop' into issue-490
prisis Apr 20, 2017
4f5c799
Merge branch 'develop' into issue-490
prisis Apr 20, 2017
1e6d812
changes
prisis Apr 23, 2017
0812775
Apply fixes from StyleCI
prisis Apr 23, 2017
797c823
changes
prisis Apr 23, 2017
54a2b91
fixed getCollectors
prisis Apr 23, 2017
33b408e
Apply fixes from StyleCI
prisis Apr 23, 2017
f5c24b1
improving profiler css
prisis Apr 24, 2017
0becee2
more changes
prisis Apr 24, 2017
05c0bc3
Apply fixes from StyleCI
prisis Apr 24, 2017
1b05fd0
changes
prisis Apr 23, 2017
96edddb
Apply fixes from StyleCI
prisis Apr 23, 2017
752505a
Merge branch 'develop' into issue-490
prisis Apr 25, 2017
f83b117
readme update
prisis Apr 25, 2017
70f9316
remove stopwatch
prisis Apr 25, 2017
ef8cb1f
using given server request
prisis Apr 25, 2017
1bd1769
added tfold | rename all.sh to before_install.sh (#524)
prisis May 4, 2017
9e06550
Merge branch 'develop' into issue-490
prisis May 4, 2017
bd23448
fix wrong dispatcher call in http kernel
prisis May 4, 2017
08f21b0
fix datacollector
prisis May 4, 2017
641dcca
Apply fixes from StyleCI
prisis May 4, 2017
f1845e0
fix wrong dispatcher call in http kernel
prisis May 4, 2017
1477710
Merge branch 'develop' into issue-490
prisis May 5, 2017
90b7049
working on monolog profiler support
prisis May 6, 2017
65c5b68
added monologer collector
prisis May 7, 2017
5e74fc7
Apply fixes from StyleCI
prisis May 7, 2017
75042a5
change static to self in tests
prisis May 7, 2017
5bb6993
cs fixes
prisis May 7, 2017
b69fbe9
wrap script code in a try (#529)
prisis May 8, 2017
c68a0ac
fix kernel test
May 9, 2017
db4149d
Apply fixes from StyleCI
prisis May 9, 2017
bea1f84
Merge branch 'develop' into issue-490
May 9, 2017
92b828d
Merge branch 'develop' into issue-490
May 15, 2017
ed8e7e1
added response time (in miliseconds)
May 15, 2017
54ba2bb
Merge branch 'develop' into issue-490
prisis May 15, 2017
5aaa959
Working on session middleware
prisis May 15, 2017
59d1b10
Apply fixes from StyleCI
prisis May 15, 2017
ffe3ed3
working on session
prisis May 16, 2017
42e566b
working on session
prisis May 16, 2017
577bcf3
working on session can cookie tab
prisis May 17, 2017
80b77a9
Apply fixes from StyleCI
prisis May 17, 2017
1bb5ad9
fixed session bug
prisis May 18, 2017
4f38e93
fixed session bug
prisis May 18, 2017
7ee451c
Apply fixes from StyleCI
prisis May 18, 2017
5cd9937
Apply fixes from StyleCI
prisis May 18, 2017
f777ec5
fixed some session bugs
prisis May 18, 2017
4ed8ee0
fixed some session bugs
prisis May 18, 2017
219d68b
Apply fixes from StyleCI
prisis May 18, 2017
0bfb9c4
Apply fixes from StyleCI
prisis May 18, 2017
6d324a8
some changes on http panel
prisis May 18, 2017
63223f8
cs fix
prisis May 18, 2017
10912b2
cs fix
prisis May 18, 2017
2b32393
and more session work
May 19, 2017
9146679
and more session work
May 19, 2017
6e1bee8
Apply fixes from StyleCI
prisis May 19, 2017
21d22c5
small cookie changes
May 19, 2017
ae947ca
Apply fixes from StyleCI
prisis May 19, 2017
0fc434c
Added tests for client ip
prisis May 19, 2017
7584619
and more work
prisis May 19, 2017
805fe12
Apply fixes from StyleCI
prisis May 19, 2017
fa571a5
fix composer
prisis May 19, 2017
96bf858
Merge branch 'refactor-session' into issue-490
prisis May 19, 2017
b6890ab
some sessions changes
prisis May 19, 2017
b808c4a
Apply fixes from StyleCI
prisis May 19, 2017
644f351
working on session can cookie tab
prisis May 17, 2017
40a4862
Apply fixes from StyleCI
prisis May 17, 2017
99f7127
Apply fixes from StyleCI
prisis May 18, 2017
591a58e
fixed some session bugs
prisis May 18, 2017
c420073
Apply fixes from StyleCI
prisis May 18, 2017
79c75e1
some changes on http panel
prisis May 18, 2017
f0e4a6e
cs fix
prisis May 18, 2017
d67bc03
working on session
prisis May 16, 2017
05a9eb1
fixed session bug
prisis May 20, 2017
0537020
Apply fixes from StyleCI
prisis May 18, 2017
7514d7f
fixed some session bugs
prisis May 18, 2017
fc9a2ca
Apply fixes from StyleCI
prisis May 18, 2017
e19e95e
cs fix
prisis May 18, 2017
5517c0c
and more session work
May 19, 2017
30b6f23
Apply fixes from StyleCI
prisis May 19, 2017
2cfbcb4
Apply fixes from StyleCI
prisis May 19, 2017
8e58f51
Added tests for client ip
prisis May 19, 2017
ed292e0
and more work
prisis May 19, 2017
30e5f64
Apply fixes from StyleCI
prisis May 19, 2017
5e5d85a
fix composer
prisis May 19, 2017
08a2d94
Merge branch 'refactor-session' into issue-490
prisis May 19, 2017
6f53c0a
some sessions changes
prisis May 19, 2017
dd01bb6
Apply fixes from StyleCI
prisis May 19, 2017
e5ba2d1
fixed some tests
prisis May 20, 2017
9219c83
Apply fixes from StyleCI
prisis May 20, 2017
602d145
added new datacollectors
prisis May 20, 2017
3166e1f
Apply fixes from StyleCI
prisis May 20, 2017
627e1d8
fix tests
prisis May 20, 2017
b63bb9e
small changes
prisis May 20, 2017
7cc5db3
Apply fixes from StyleCI
prisis May 20, 2017
55b35a7
Added check for phpcache classes
prisis May 20, 2017
45b2836
Apply fixes from StyleCI
prisis May 20, 2017
719086c
happy phpstan
prisis May 21, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"symfony/polyfill-mbstring" : "^1.0",
"symfony/polyfill-intl-icu" : "^1.0",
"symfony/process" : "^3.2",
"symfony/stopwatch" : "^3.2",
"symfony/var-dumper" : "^3.2",
"swiftmailer/swiftmailer" : "^5.4",
"vlucas/phpdotenv" : "^2.3"
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ parameters:
- '#Method Viserio\\Component\\Cookie\\AbstractCookieCollector::forget#'

# Wrapper
- '#Viserio\\Component\\WebProfiler\\DataCollectors\\Bridge\\PDO\\TraceablePDODecorater::__construct#'
- '#Viserio\\Component\\Profiler\\DataCollectors\\Bridge\\PDO\\TraceablePDODecorater::__construct#'

# Ignore missing container property for ConfigurationTrait
- '#Access to an undefined property Viserio\\Component\\Exception\\Displayers\\HtmlDisplayer::\$container#'
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@
<testsuite name="Narrowspark View Component Test Suite">
<directory>./src/Viserio/Component/View/Tests</directory>
</testsuite>
<testsuite name="Narrowspark WebProfiler Component Test Suite">
<directory>./src/Viserio/Component/WebProfiler/Tests</directory>
<testsuite name="Narrowspark Profiler Component Test Suite">
<directory>./src/Viserio/Component/Profiler/Tests</directory>
</testsuite>
</testsuites>

Expand Down
10 changes: 5 additions & 5 deletions src/Viserio/Bridge/Twig/DataCollector/Resources/css/twig.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
.webprofiler-panel.webprofiler-panel-twig-data-collector.active .twig-graph {
.profiler-panel.profiler-panel-twig-data-collector.active .twig-graph {
margin-top: 25px;
}
.webprofiler-panel.webprofiler-panel-twig-data-collector.active .twig-graph pre {
.profiler-panel.profiler-panel-twig-data-collector.active .twig-graph pre {
font-size: 14px;
color: #2B2A28;
padding: 10px;
background-color: #fff;
}
.webprofiler-panel.webprofiler-panel-twig-data-collector.active .twig-graph pre .status-success {
.profiler-panel.profiler-panel-twig-data-collector.active .twig-graph pre .status-success {
color: #4F805D;
}
.webprofiler-panel.webprofiler-panel-twig-data-collector.active .twig-graph pre .status-warning {
.profiler-panel.profiler-panel-twig-data-collector.active .twig-graph pre .status-warning {
background-color: #A46A1F;
color: #FFF;
padding: 0px 5px;
}
.webprofiler-panel.webprofiler-panel-twig-data-collector.active .twig-graph pre .status-error {
.profiler-panel.profiler-panel-twig-data-collector.active .twig-graph pre .status-error {
color: #B0413E;
}
8 changes: 4 additions & 4 deletions src/Viserio/Bridge/Twig/DataCollector/TwigDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
use Twig_Markup;
use Twig_Profiler_Dumper_Html;
use Twig_Profiler_Profile;
use Viserio\Component\Contracts\WebProfiler\AssetAware as AssetAwareContract;
use Viserio\Component\Contracts\WebProfiler\PanelAware as PanelAwareContract;
use Viserio\Component\Contracts\WebProfiler\TooltipAware as TooltipAwareContract;
use Viserio\Component\WebProfiler\DataCollectors\AbstractDataCollector;
use Viserio\Component\Contracts\Profiler\AssetAware as AssetAwareContract;
use Viserio\Component\Contracts\Profiler\PanelAware as PanelAwareContract;
use Viserio\Component\Contracts\Profiler\TooltipAware as TooltipAwareContract;
use Viserio\Component\Profiler\DataCollectors\AbstractDataCollector;

class TwigDataCollector extends AbstractDataCollector implements
PanelAwareContract,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testGetTooltip()
$this->mock(ResponseInterface::class)
);

static::assertSame('<div class="webprofiler-menu-tooltip-group"><div class="webprofiler-menu-tooltip-group-piece"><b>Template calls</b><span>1</span></div><div class="webprofiler-menu-tooltip-group-piece"><b>Block calls</b><span>0</span></div><div class="webprofiler-menu-tooltip-group-piece"><b>Macro calls</b><span>0</span></div></div>', $collect->getTooltip());
static::assertSame('<div class="profiler-menu-tooltip-group"><div class="profiler-menu-tooltip-group-piece"><b>Template calls</b><span>1</span></div><div class="profiler-menu-tooltip-group-piece"><b>Block calls</b><span>0</span></div><div class="profiler-menu-tooltip-group-piece"><b>Macro calls</b><span>0</span></div></div>', $collect->getTooltip());
}

public function testGetPanel()
Expand All @@ -56,7 +56,7 @@ public function testGetPanel()
$this->mock(ResponseInterface::class)
);

$expect = preg_replace('/(\r\n|\n\r|\r)/', "\n", '<div class="webprofiler-tabs row"><div class="webprofiler-tabs-tab col span_6"><input type="radio" name="tabgroup" id="tab-0-58a60028922b9"><label for="tab-0-58a60028922b9">Twig <span class="counter">1</span></label><div class="webprofiler-tabs-tab-content"><h3>Twig Metrics</h3><ul class="metrics"><li class="metric"><span class="value">' . $this->formatDuration($collect->getTime()) . '</span><span class="label">Render time</span></li><li class="metric"><span class="value">1</span><span class="label">Template calls</span></li><li class="metric"><span class="value">0</span><span class="label">Block calls</span></li><li class="metric"><span class="value">0</span><span class="label">Macro calls</span></li></ul><h3>Rendered Templates</h3><table class="row"><thead><tr><th scope="col" class="Template Name">Template Name</th><th scope="col" class="Render Count">Render Count</th></tr></thead><tbody><tr><th>test.twig</th><td>1</td></tr></tbody></table><div class="twig-graph"><h3>Rendering Call Graph</h3>' . $collect->getHtmlCallGraph() . '</div></div></div><div class="webprofiler-tabs-tab col span_6"><input type="radio" name="tabgroup" id="tab-1-58a60028922c0"><label for="tab-1-58a60028922c0">Twig Extensions <span class="counter">4</span></label><div class="webprofiler-tabs-tab-content"><table class="row"><thead><tr><th scope="col" class="Extension">Extension</th></tr></thead><tbody><tr><td>Twig_Extension_Core</td></tr><tr><td>Twig_Extension_Escaper</td></tr><tr><td>Twig_Extension_Optimizer</td></tr><tr><td>Twig_Extension_Profiler</td></tr></tbody></table></div></div></div>');
$expect = preg_replace('/(\r\n|\n\r|\r)/', "\n", '<div class="profiler-tabs row"><div class="profiler-tabs-tab col span_6"><input type="radio" name="tabgroup" id="tab-0-58a60028922b9"><label for="tab-0-58a60028922b9">Twig <span class="counter">1</span></label><div class="profiler-tabs-tab-content"><h3>Twig Metrics</h3><ul class="metrics"><li class="metric"><span class="value">' . $this->formatDuration($collect->getTime()) . '</span><span class="label">Render time</span></li><li class="metric"><span class="value">1</span><span class="label">Template calls</span></li><li class="metric"><span class="value">0</span><span class="label">Block calls</span></li><li class="metric"><span class="value">0</span><span class="label">Macro calls</span></li></ul><h3>Rendered Templates</h3><table class="row"><thead><tr><th scope="col" class="Template Name">Template Name</th><th scope="col" class="Render Count">Render Count</th></tr></thead><tbody><tr><th>test.twig</th><td>1</td></tr></tbody></table><div class="twig-graph"><h3>Rendering Call Graph</h3>' . $collect->getHtmlCallGraph() . '</div></div></div><div class="profiler-tabs-tab col span_6"><input type="radio" name="tabgroup" id="tab-1-58a60028922c0"><label for="tab-1-58a60028922c0">Twig Extensions <span class="counter">4</span></label><div class="profiler-tabs-tab-content"><table class="row"><thead><tr><th scope="col" class="Extension">Extension</th></tr></thead><tbody><tr><td>Twig_Extension_Core</td></tr><tr><td>Twig_Extension_Escaper</td></tr><tr><td>Twig_Extension_Optimizer</td></tr><tr><td>Twig_Extension_Profiler</td></tr></tbody></table></div></div></div>');

static::assertSame($this->removeTabId($expect), $this->removeTabId(preg_replace('/(\r\n|\n\r|\r)/', "\n", $collect->getPanel())));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
use Viserio\Bridge\Twig\Providers\TwigBridgeDataCollectorsServiceProvider;
use Viserio\Bridge\Twig\Providers\TwigBridgeServiceProvider;
use Viserio\Component\Container\Container;
use Viserio\Component\Contracts\WebProfiler\WebProfiler as WebProfilerContract;
use Viserio\Component\Contracts\Profiler\Profiler as ProfilerContract;
use Viserio\Component\Filesystem\Providers\FilesServiceProvider;
use Viserio\Component\HttpFactory\Providers\HttpFactoryServiceProvider;
use Viserio\Component\OptionsResolver\Providers\OptionsResolverServiceProvider;
use Viserio\Component\Profiler\Providers\ProfilerServiceProvider;
use Viserio\Component\View\Providers\ViewServiceProvider;
use Viserio\Component\WebProfiler\Providers\WebProfilerServiceProvider;

/**
* @runTestsInSeparateProcesses
Expand All @@ -29,13 +29,13 @@ public function testGetServices()
$container->register(new FilesServiceProvider());
$container->register(new ViewServiceProvider());
$container->register(new HttpFactoryServiceProvider());
$container->register(new WebProfilerServiceProvider());
$container->register(new ProfilerServiceProvider());
$container->register(new TwigBridgeServiceProvider());
$container->register(new TwigBridgeDataCollectorsServiceProvider());

$container->instance('config', [
'viserio' => [
'webprofiler' => [
'profiler' => [
'enable' => true,
'collector' => [
'twig' => true,
Expand All @@ -61,9 +61,9 @@ public function testGetServices()
],
]);

$profiler = $container->get(WebProfilerContract::class);
$profiler = $container->get(ProfilerContract::class);

static::assertInstanceOf(WebProfilerContract::class, $profiler);
static::assertInstanceOf(ProfilerContract::class, $profiler);

static::assertTrue(array_key_exists('time-data-collector', $profiler->getCollectors()));
static::assertTrue(array_key_exists('memory-data-collector', $profiler->getCollectors()));
Expand Down
2 changes: 1 addition & 1 deletion src/Viserio/Bridge/Twig/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"viserio/session" : "self.version",
"viserio/support" : "self.version",
"viserio/translation" : "self.version",
"viserio/web-profiler" : "self.version"
"viserio/profiler" : "self.version"
},
"autoload": {
"psr-4": {
Expand Down
36 changes: 11 additions & 25 deletions src/Viserio/Component/Container/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function __construct()
/**
* {@inheritdoc}
*/
public function bind($abstract, $concrete = null)
public function bind($abstract, $concrete = null): void
{
$concrete = ($concrete) ? $concrete : $abstract;

Expand All @@ -121,7 +121,7 @@ public function bind($abstract, $concrete = null)
*
* @codeCoverageIgnore
*/
public function bindIf(string $abstract, $concrete = null)
public function bindIf(string $abstract, $concrete = null): void
{
if (! $this->has($abstract)) {
$this->bind($abstract, $concrete);
Expand All @@ -131,15 +131,15 @@ public function bindIf(string $abstract, $concrete = null)
/**
* {@inheritdoc}
*/
public function instance(string $abstract, $instance)
public function instance(string $abstract, $instance): void
{
$this->bindPlain($abstract, $instance);
}

/**
* {@inheritdoc}
*/
public function singleton(string $abstract, $concrete = null)
public function singleton(string $abstract, $concrete = null): void
{
$concrete = ($concrete) ? $concrete : $abstract;

Expand All @@ -149,17 +149,17 @@ public function singleton(string $abstract, $concrete = null)
/**
* {@inheritdoc}
*/
public function alias(string $abstract, string $alias)
public function alias(string $abstract, string $alias): void
{
$this->bindings[$alias] = &$this->bindings[$abstract];
}

/**
* {@inheritdoc}
*/
public function extend(string $abstract, Closure $closure)
public function extend(string $abstract, Closure $closure): void
{
$this->extendAbstract($abstract, $closure);
$this->extenders[$abstract][] = $closure;
}

/**
Expand Down Expand Up @@ -189,7 +189,7 @@ public function hasInDelegate(string $abstract): bool
/**
* {@inheritdoc}
*/
public function forget(string $abstract)
public function forget(string $abstract): void
{
unset($this->bindings[$abstract]);
}
Expand Down Expand Up @@ -399,19 +399,16 @@ public function call($callable, array $parameters = [])
*/
public function register(ServiceProvider $provider, array $parameters = []): ContainerContract
{
$entries = $provider->getServices();
$container = $this;

foreach ($entries as $key => $callable) {
foreach ($provider->getServices() as $key => $callable) {
if ($this->has($key)) {
$this->extend($key, function ($previous, $container) use ($callable) {
// Extend a previous entry
$this->extend($key, function ($previous) use ($container, $callable) {
return $callable($container, function () use ($previous) {
return $previous;
});
});
} else {
$this->singleton($key, function () use ($container, $callable) {
$this->singleton($key, function ($container) use ($callable) {
return $callable($container, null);
});
}
Expand Down Expand Up @@ -655,17 +652,6 @@ protected function extendResolved($abstract, &$resolved)
}
}

/**
* "Extend" an abstract type in the container.
*
* @param string $abstract
* @param \Closure $closure
*/
protected function extendAbstract(string $abstract, Closure $closure)
{
$this->extenders[$abstract][] = $closure;
}

/**
* Call the given closure.
*
Expand Down
3 changes: 3 additions & 0 deletions src/Viserio/Component/Container/Tests/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,11 @@ public function testExtendIsLazyInitialized()

return $obj;
});

self::assertFalse(ContainerLazyExtendFixture::$initialized);

$container->resolve(ContainerLazyExtendFixture::class);

self::assertTrue(ContainerLazyExtendFixture::$initialized);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public static function getParam()

public static function getPrevious(ContainerInterface $container, callable $getPrevious = null)
{
return $getPrevious;
return $getPrevious . 'bar';
}
}
28 changes: 21 additions & 7 deletions src/Viserio/Component/Contracts/Container/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,50 @@ interface Container extends ContainerInterface, Factory, ArrayAccess
*
* @param string $abstract
* @param string $alias
*
* @return void
*/
public function alias(string $abstract, string $alias);
public function alias(string $abstract, string $alias): void;

/**
* Register a binding with the container.
*
* @param string|array $abstract
* @param \Closure|string|null $concrete
*
* @return void
*/
public function bind($abstract, $concrete = null);
public function bind($abstract, $concrete = null): void;

/**
* Register a binding if it hasn't already been registered.
*
* @param string $abstract
* @param \Closure|string|null $concrete
*
* @return void
*/
public function bindIf(string $abstract, $concrete = null);
public function bindIf(string $abstract, $concrete = null): void;

/**
* Register a shared binding in the container.
*
* @param string $abstract
* @param \Closure|string|null $concrete
*
* @return void
*/
public function singleton(string $abstract, $concrete = null);
public function singleton(string $abstract, $concrete = null): void;

/**
* Register an existing instance as shared in the container.
*
* @param string $abstract
* @param mixed $instance
*
* @return void
*/
public function instance(string $abstract, $instance);
public function instance(string $abstract, $instance): void;

/**
* Delegate a backup container to be checked for services if it
Expand All @@ -72,16 +82,20 @@ public function hasInDelegate(string $abstract): bool;
* Removes an entry from the container.
*
* @param string $abstract Identifier of the entry to remove
*
* @return void
*/
public function forget(string $abstract);
public function forget(string $abstract): void;

/**
* "Extend" an abstract type in the container.
*
* @param string $binding
* @param \Closure $closure
*
* @return void
*/
public function extend(string $binding, Closure $closure);
public function extend(string $binding, Closure $closure): void;

/**
* Resolve a bound type from container.
Expand Down
6 changes: 4 additions & 2 deletions src/Viserio/Component/Contracts/Events/EventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ interface EventManager
* @param string $eventName
* @param mixed $listener
* @param int $priority
*
* @return void
*/
public function attach(string $eventName, $listener, int $priority = 0);
public function attach(string $eventName, $listener, int $priority = 0): void;

/**
* Removes a specific listener from an event.
Expand All @@ -32,7 +34,7 @@ public function detach(string $eventName, $listener): bool;
* If the eventName argument is specified, all listeners for that event are
* removed.
*
* @param string|null $eventName
* @param string $eventName
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
declare(strict_types=1);
namespace Viserio\Component\Contracts\WebProfiler;
namespace Viserio\Component\Contracts\Profiler;

interface AssetAware extends DataCollector
{
Expand Down
Loading