Skip to content

Commit

Permalink
Added type hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Feb 9, 2013
1 parent 0e0f521 commit a9bbfd8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/BaseAuthenticate.php
Expand Up @@ -151,7 +151,7 @@ public function logout($user) {
* @param CakeRequest $request Request object.
* @return mixed Either false or an array of user information
*/
public function getUser($request) {
public function getUser(CakeRequest $request) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/BaseAuthorize.php
Expand Up @@ -109,7 +109,7 @@ public function controller(Controller $controller = null) {
* @param string $path
* @return string the action path for the given request.
*/
public function action($request, $path = '/:plugin/:controller/:action') {
public function action(CakeRequest $request, $path = '/:plugin/:controller/:action') {
$plugin = empty($request['plugin']) ? null : Inflector::camelize($request['plugin']) . '/';
$path = str_replace(
array(':controller', ':action', ':plugin/'),
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/BasicAuthenticate.php
Expand Up @@ -107,7 +107,7 @@ public function authenticate(CakeRequest $request, CakeResponse $response) {
* @param CakeRequest $request Request object.
* @return mixed Either false or an array of user information
*/
public function getUser($request) {
public function getUser(CakeRequest $request) {
$username = env('PHP_AUTH_USER');
$pass = env('PHP_AUTH_PW');

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/DigestAuthenticate.php
Expand Up @@ -134,7 +134,7 @@ public function authenticate(CakeRequest $request, CakeResponse $response) {
* @param CakeRequest $request Request object.
* @return mixed Either false or an array of user information
*/
public function getUser($request) {
public function getUser(CakeRequest $request) {
$digest = $this->_getDigest();
if (empty($digest)) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -393,7 +393,7 @@ protected function _setDefaults() {
* @param CakeRequest $request The request to authenticate for. If empty, the current request will be used.
* @return boolean True if $user is authorized, otherwise false
*/
public function isAuthorized($user = null, $request = null) {
public function isAuthorized($user = null, CakeRequest $request = null) {
if (empty($user) && !$this->user()) {
return false;
}
Expand Down

0 comments on commit a9bbfd8

Please sign in to comment.