Navigation Menu

Skip to content

Commit

Permalink
Better method signatures for controller and auth.
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Sep 5, 2014
1 parent 587617b commit 4de0bf9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Auth/BaseAuthenticate.php
Expand Up @@ -81,7 +81,7 @@ abstract class BaseAuthenticate {
* @param \Cake\Controller\ComponentRegistry $registry The Component registry used on this request.
* @param array $config Array of config to use.
*/
public function __construct(ComponentRegistry $registry, $config) {
public function __construct(ComponentRegistry $registry, array $config = []) {
$this->_registry = $registry;
$this->config($config);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/DigestAuthenticate.php
Expand Up @@ -77,7 +77,7 @@ class DigestAuthenticate extends BasicAuthenticate {
* used on this request.
* @param array $config Array of config to use.
*/
public function __construct(ComponentRegistry $registry, $config) {
public function __construct(ComponentRegistry $registry, array $config = []) {
$this->_registry = $registry;

$this->config([
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Controller.php
Expand Up @@ -234,7 +234,7 @@ class Controller implements EventListener {
* @param \Cake\Network\Response $response Response object for this controller.
* @param string $name Override the name useful in testing when using mocks.
*/
public function __construct($request = null, $response = null, $name = null) {
public function __construct(Request $request = null, Response $response = null, $name = null) {
if ($this->name === null && $name === null) {
list(, $name) = namespaceSplit(get_class($this));
$name = substr($name, 0, -10);
Expand Down

0 comments on commit 4de0bf9

Please sign in to comment.