Skip to content

Commit 04be8d9

Browse files
committed
Updated phpdoc to be more precise about return values
1 parent 8651a82 commit 04be8d9

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

Controller/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Controller
5151
/**
5252
* Default constructor.
5353
*
54-
* @param mixed $serializer Any object with a serialize($data, $format) method
54+
* @param object $serializer Any object with a serialize($data, $format) method
5555
* @param ExposedRoutesExtractorInterface $exposedRoutesExtractor The extractor service.
5656
* @param array $cacheControl
5757
* @param boolean $debug

Extractor/ExposedRoutesExtractorInterface.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
namespace FOS\JsRoutingBundle\Extractor;
1313

14-
use Symfony\Component\HttpFoundation\Request;
14+
use Symfony\Component\Config\Resource\ResourceInterface;
15+
use Symfony\Component\Routing\Route;
1516

1617
/**
1718
* ExposedRoutesExtractorInterface interface.
@@ -23,7 +24,7 @@ interface ExposedRoutesExtractorInterface
2324
/**
2425
* Returns an array of exposed routes where keys are the route names.
2526
*
26-
* @return array
27+
* @return ExtractedRoute[]
2728
*/
2829
public function getRoutes();
2930

@@ -37,7 +38,9 @@ public function getBaseUrl();
3738
/**
3839
* Get the route prefix to use, i.e. the language if JMSI18nRoutingBundle is active
3940
*
40-
* @var string $locale the request locale
41+
* @param string $locale the request locale
42+
*
43+
* @return string
4144
*/
4245
public function getPrefix($locale);
4346

@@ -58,21 +61,23 @@ public function getScheme();
5861
/**
5962
* Get the cache path for this request
6063
*
61-
* @var string $locale the request locale
64+
* @param string $locale the request locale
65+
*
66+
* @return string
6267
*/
6368
public function getCachePath($locale);
6469

6570
/**
6671
* Returns an array of routing resources.
6772
*
68-
* @return array
73+
* @return ResourceInterface[]
6974
*/
7075
public function getResources();
7176

7277
/**
7378
* Returns an array of all exposed Route objects.
7479
*
75-
* @return array
80+
* @return Route[]
7681
*/
7782
public function getExposedRoutes();
7883
}

Tests/Controller/ControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ public static function dataProviderForTestGenerateWithCallback()
7979
}
8080

8181
/**
82-
* @expectedException Symfony\Component\HttpKernel\Exception\HttpException
82+
* @expectedException \Symfony\Component\HttpKernel\Exception\HttpException
8383
*/
8484
public function testGenerateWithInvalidCallback()
8585
{
8686
$controller = new Controller($this->getSerializer(), $this->getExtractor());
87-
$response = $controller->indexAction($this->getRequest('/', 'GET', array('callback' => '(function xss(x){evil()})')), 'json');
87+
$controller->indexAction($this->getRequest('/', 'GET', array('callback' => '(function xss(x){evil()})')), 'json');
8888
}
8989

9090
public function testIndexActionWithoutRoutes()

0 commit comments

Comments
 (0)