Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
middleware fixes
  • Loading branch information
valentint committed Feb 20, 2017
commit 1e3af3a6eec8bf7b95d1389a8bb0f80576c7764c
11 changes: 2 additions & 9 deletions Server/App/Registry/HandshakeMiddlewareRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,11 @@ public function __construct()
}

/**
* @param array $middleware
* @param HandshakeMiddlewareInterface $middleware
* @throws \Exception
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where?

*/
public function addMiddleware($middleware)
public function addMiddleware(HandshakeMiddlewareInterface $middleware)
{
$interfaces = class_implements($middleware);

if (!isset($interfaces['Gos\Bundle\WebSocketBundle\Server\App\Stack\HandshakeMiddlewareInterface'])) {
$className = get_class($middleware);
throw new \Exception('"Gos\Bundle\WebSocketBundle\Server\App\Stack\HandshakeMiddlewareInterface" in not implemented by "' . $className . '"');
}

$this->middlewares[] = $middleware;
}

Expand Down
2 changes: 1 addition & 1 deletion Server/App/Stack/Factory/Middleware.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace WebSocketBundle\Server\Middleware;
namespace Gos\Bundle\WebSocketBundle\Server\App\Stack\Factory;

use Gos\Bundle\WebSocketBundle\Event\ClientRejectedEvent;
use Gos\Bundle\WebSocketBundle\Event\Events;
Expand Down