@@ -104,7 +104,7 @@ |
||
| 104 | 104 | $api = $this->getMockBuilder(PermissionApiInterface::class) |
| 105 | 105 | ->getMock(); |
| 106 | 106 | $api->method('hasPermission')->will($this->returnCallback( |
| 107 | - function ($component = null, $instance = null, $level = ACCESS_NONE, $user = null) { |
|
| 107 | + function($component = null, $instance = null, $level = ACCESS_NONE, $user = null) { |
|
| 108 | 108 | list($regId, $catId) = explode('::', $instance); |
| 109 | 109 | |
| 110 | 110 | return $catId % 2 == 0; |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | /** |
| 48 | 48 | * Returns a list of functions to add to the existing list. |
| 49 | 49 | * |
| 50 | - * @return array An array of functions |
|
| 50 | + * @return \Twig_SimpleFunction[] An array of functions |
|
| 51 | 51 | */ |
| 52 | 52 | public function getFunctions() |
| 53 | 53 | { |
@@ -95,6 +95,9 @@ |
||
| 95 | 95 | $this->assertNull($api->uname()); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | + /** |
|
| 99 | + * @param integer $uid |
|
| 100 | + */ |
|
| 98 | 101 | private function getApi($uid = null) |
| 99 | 102 | { |
| 100 | 103 | $this->session->method('get')->with('uid')->willReturn($uid); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $this->userRepo |
| 54 | 54 | ->method('find') |
| 55 | 55 | ->with($this->logicalNot($this->isNull())) |
| 56 | - ->will($this->returnCallback(function ($uid) { |
|
| 56 | + ->will($this->returnCallback(function($uid) { |
|
| 57 | 57 | $this->user->setUid($uid); |
| 58 | 58 | |
| 59 | 59 | return $this->user; |
@@ -103,9 +103,9 @@ |
||
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | // ensure proper variable types |
| 106 | - $value = (string) $value; |
|
| 107 | - $type = (string) $type; |
|
| 108 | - $weight = (int) $weight; |
|
| 106 | + $value = (string)$value; |
|
| 107 | + $type = (string)$type; |
|
| 108 | + $weight = (int)$weight; |
|
| 109 | 109 | |
| 110 | 110 | // @todo remove this code block at Core-2.0 because all themes are twig based |
| 111 | 111 | $themeBundle = $this->engine->getTheme(); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function load(array $configs, ContainerBuilder $container) |
| 25 | 25 | { |
| 26 | - $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config'))); |
|
| 26 | + $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config'))); |
|
| 27 | 27 | |
| 28 | 28 | $loader->load('services.yml'); |
| 29 | 29 | $loader->load('twig.yml'); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function load(array $configs, ContainerBuilder $container) |
| 28 | 28 | { |
| 29 | - $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config'))); |
|
| 29 | + $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config'))); |
|
| 30 | 30 | |
| 31 | 31 | $loader->load('services.yml'); |
| 32 | 32 | $loader->load('helpers.yml'); |
@@ -131,8 +131,8 @@ |
||
| 131 | 131 | { |
| 132 | 132 | $string = preg_replace_callback( |
| 133 | 133 | '/(.)@(.)/s', |
| 134 | - function ($m) { |
|
| 135 | - return "&#" . sprintf("%03d", ord($m[1])) . ";@&#" .sprintf("%03d", ord($m[2])) . ";"; |
|
| 134 | + function($m) { |
|
| 135 | + return "&#" . sprintf("%03d", ord($m[1])) . ";@&#" . sprintf("%03d", ord($m[2])) . ";"; |
|
| 136 | 136 | }, |
| 137 | 137 | $string |
| 138 | 138 | ); |