Skip to content

Commit 946d3d9

Browse files
committed
fixed previous commit
1 parent f1dd3f2 commit 946d3d9

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

src/Symfony/Bundle/TwigBundle/GlobalVariables.php

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function __construct(ContainerInterface $container)
2828
}
2929

3030
/**
31-
* Returns security context service
32-
*
31+
* Returns the security context service.
32+
*
3333
* @return Symfony\Component\Security\Core\SecurityContext|void The security context
3434
*/
3535
public function getSecurity()
@@ -40,9 +40,10 @@ public function getSecurity()
4040
}
4141

4242
/**
43-
* Returns current user
44-
*
43+
* Returns the current user.
44+
*
4545
* @return mixed|void
46+
*
4647
* @see Symfony\Component\Security\Core\Authentication\Token\TokenInterface::getUser()
4748
*/
4849
public function getUser()
@@ -64,8 +65,8 @@ public function getUser()
6465
}
6566

6667
/**
67-
* Returns security context service
68-
*
68+
* Returns the security context service.
69+
*
6970
* @return Symfony\Component\HttpFoundation\Request|void The http request object
7071
*/
7172
public function getRequest()
@@ -76,8 +77,8 @@ public function getRequest()
7677
}
7778

7879
/**
79-
* Returns security context service
80-
*
80+
* Returns the security context service.
81+
*
8182
* @return Symfony\Component\HttpFoundation\Session|void The session
8283
*/
8384
public function getSession()
@@ -86,28 +87,24 @@ public function getSession()
8687
return $request->getSession();
8788
}
8889
}
89-
90+
9091
/**
91-
* Returns current app environment
92-
*
93-
* @return string|void The current environment string (e.g 'dev')
92+
* Returns the current app environment.
93+
*
94+
* @return string The current environment string (e.g 'dev')
9495
*/
9596
public function getEnvironment()
9697
{
97-
if ($this->container->hasParameter('kernel.environment')) {
98-
return $this->container->getParameter('kernel.environment');
99-
}
98+
return $this->container->getParameter('kernel.environment');
10099
}
101-
100+
102101
/**
103-
* Returns current app debug mode
104-
*
105-
* @return boolean|void The current debug mode
102+
* Returns the current app debug mode.
103+
*
104+
* @return Boolean The current debug mode
106105
*/
107106
public function getDebug()
108107
{
109-
if ($this->container->hasParameter('kernel.debug')) {
110-
return (bool)$this->container->getParameter('kernel.debug');
111-
}
108+
return (bool) $this->container->getParameter('kernel.debug');
112109
}
113110
}

0 commit comments

Comments
 (0)