Skip to content
Permalink
Browse files

Better method signatures for controller and auth.

  • Loading branch information...
dereuromark committed Sep 5, 2014
1 parent 587617b commit 4de0bf94959445a79613192690a9d5052a10996a
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/Auth/BaseAuthenticate.php
  2. +1 −1 src/Auth/DigestAuthenticate.php
  3. +1 −1 src/Controller/Controller.php
@@ -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);
}
@@ -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([
@@ -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);

0 comments on commit 4de0bf9

Please sign in to comment.
You can’t perform that action at this time.