mirror of
https://github.com/Mibew/mibew.git
synced 2025-03-03 02:18:31 +03:00
Fix codding style
This commit is contained in:
parent
e6c055e782
commit
c7d87ac5c8
@ -81,7 +81,7 @@ class Application
|
|||||||
|
|
||||||
// Execute the controller's action and get response.
|
// Execute the controller's action and get response.
|
||||||
$response = call_user_func($controller, $request);
|
$response = call_user_func($controller, $request);
|
||||||
} catch(AccessDeniedException $e) {
|
} catch (AccessDeniedException $e) {
|
||||||
return new Response('Forbidden', 403);
|
return new Response('Forbidden', 403);
|
||||||
} catch (ResourceNotFoundException $e) {
|
} catch (ResourceNotFoundException $e) {
|
||||||
return new Response('Not Found', 404);
|
return new Response('Not Found', 404);
|
||||||
|
@ -91,7 +91,7 @@ class ButtonController extends AbstractController
|
|||||||
$response = new Response($content, 200);
|
$response = new Response($content, 200);
|
||||||
|
|
||||||
// Set correct content info
|
// Set correct content info
|
||||||
$response->headers->set('Content-Type' ,'image/gif');
|
$response->headers->set('Content-Type', 'image/gif');
|
||||||
$response->headers->set('Content-Length', $file_size);
|
$response->headers->set('Content-Length', $file_size);
|
||||||
} else {
|
} else {
|
||||||
$response = new Response('Not found', 404);
|
$response = new Response('Not found', 404);
|
||||||
|
@ -77,7 +77,7 @@ class ControllerResolver
|
|||||||
*/
|
*/
|
||||||
protected function createController($controller)
|
protected function createController($controller)
|
||||||
{
|
{
|
||||||
if (strpos($controller, '::') === FALSE) {
|
if (strpos($controller, '::') === false) {
|
||||||
throw new \InvalidArgumentException(sprintf(
|
throw new \InvalidArgumentException(sprintf(
|
||||||
'Unable to find controller "%s".',
|
'Unable to find controller "%s".',
|
||||||
$controller
|
$controller
|
||||||
|
@ -114,7 +114,8 @@ class EventDispatcher
|
|||||||
* @param string $listener Plugins method, that handles the event
|
* @param string $listener Plugins method, that handles the event
|
||||||
* @return boolean true on success or false on failure.
|
* @return boolean true on success or false on failure.
|
||||||
*/
|
*/
|
||||||
public function detachListener($event_name, PluginInterface $plugin, $listener) {
|
public function detachListener($event_name, PluginInterface $plugin, $listener)
|
||||||
|
{
|
||||||
// Check event exists
|
// Check event exists
|
||||||
if (!array_key_exists($event_name, $this->events)) {
|
if (!array_key_exists($event_name, $this->events)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -132,7 +132,8 @@ class Router implements RouterInterface, RequestMatcherInterface
|
|||||||
*
|
*
|
||||||
* @return UrlMatcher
|
* @return UrlMatcher
|
||||||
*/
|
*/
|
||||||
public function getMatcher() {
|
public function getMatcher()
|
||||||
|
{
|
||||||
if (is_null($this->matcher)) {
|
if (is_null($this->matcher)) {
|
||||||
$this->matcher = new UrlMatcher($this->getRouteCollection(), $this->getContext());
|
$this->matcher = new UrlMatcher($this->getRouteCollection(), $this->getContext());
|
||||||
}
|
}
|
||||||
@ -145,7 +146,8 @@ class Router implements RouterInterface, RequestMatcherInterface
|
|||||||
*
|
*
|
||||||
* @return UrlGenerator
|
* @return UrlGenerator
|
||||||
*/
|
*/
|
||||||
public function getGenerator() {
|
public function getGenerator()
|
||||||
|
{
|
||||||
if (is_null($this->generator)) {
|
if (is_null($this->generator)) {
|
||||||
$this->generator = new UrlGenerator($this->getRouteCollection(), $this->getContext());
|
$this->generator = new UrlGenerator($this->getRouteCollection(), $this->getContext());
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
use Mibew\Settings;
|
use Mibew\Settings;
|
||||||
use Mibew\Style\ChatStyle;
|
use Mibew\Style\ChatStyle;
|
||||||
use Mibew\Style\InvitationStyle;
|
use Mibew\Style\InvitationStyle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return chat button code.
|
* Return chat button code.
|
||||||
*
|
*
|
||||||
|
@ -74,7 +74,7 @@ if ($op) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$page['permissionsList'] = array();
|
$page['permissionsList'] = array();
|
||||||
foreach(get_permission_list() as $perm) {
|
foreach (get_permission_list() as $perm) {
|
||||||
$perm['checked'] = in_array($perm['id'], $checked_permissions);
|
$perm['checked'] = in_array($perm['id'], $checked_permissions);
|
||||||
$page['permissionsList'][] = $perm;
|
$page['permissionsList'][] = $perm;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user