浏览代码

Fix up doc blocks towards 3.x

euromark 10 年之前
父节点
当前提交
47e4596636
共有 4 个文件被更改,包括 16 次插入26 次删除
  1. 0 14
      Console/Command/MyShell.php
  2. 7 6
      Controller/Component/CommonComponent.php
  3. 3 0
      Controller/MyController.php
  4. 6 6
      phpunit.xml

+ 0 - 14
Console/Command/MyShell.php

@@ -5,18 +5,4 @@ App::uses('Shell', 'Console');
 /**
  */
 class MyShell extends Shell {
-
-	/**
-	 * MyShell::name()
-	 *
-	 * @param bool $prependPlugin
-	 * @return string
-	 */
-	public function name($prependPlugin = true) {
-		$plugin = '';
-
-		$name = $plugin . $this->name;
-		return $name;
-	}
-
 }

+ 7 - 6
Controller/Component/CommonComponent.php

@@ -375,7 +375,7 @@ class CommonComponent extends Component {
 	 * @param mixed $url
 	 * @param bool $allowSelf if redirect to the same controller/action (url) is allowed
 	 * @param int $status
-	 * @return void
+	 * @return \Cake\Network\Response|null
 	 */
 	public function autoRedirect($whereTo, $allowSelf = true, $status = null) {
 		if ($allowSelf || $this->Controller->referer(null, true) !== '/' . $this->Controller->request->url) {
@@ -393,7 +393,7 @@ class CommonComponent extends Component {
 	 * @see http://en.wikipedia.org/wiki/Post/Redirect/Get
 	 * @param mixed $url
 	 * @param int $status
-	 * @return void
+	 * @return \Cake\Network\Response|null
 	 */
 	public function postRedirect($whereTo, $status = 302) {
 		return $this->Controller->redirect($whereTo, $status);
@@ -405,7 +405,7 @@ class CommonComponent extends Component {
 	 * @param mixed $url
 	 * @param bool $conditionalAutoRedirect false to skip whitelisting
 	 * @param int $status
-	 * @return void
+	 * @return \Cake\Network\Response|null
 	 */
 	public function autoPostRedirect($whereTo, $conditionalAutoRedirect = true, $status = 302) {
 		$referer = $this->Controller->referer($whereTo, true);
@@ -454,7 +454,7 @@ class CommonComponent extends Component {
 	 * @param mixed $url
 	 * @param int $status
 	 * @param bool $exit
-	 * @return void
+	 * @return \Cake\Network\Response|null
 	 */
 	public function completeRedirect($url = null, $status = null, $exit = true) {
 		if ($url === null) {
@@ -478,7 +478,7 @@ class CommonComponent extends Component {
 	 * @see http://en.wikipedia.org/wiki/Post/Redirect/Get
 	 * TODO: change to 303 with backwardscompatability for older browsers...
 	 * @param int $status
-	 * @return void
+	 * @return \Cake\Network\Response|null
 	 */
 	public function prgRedirect($status = 302) {
 		if (!empty($_COOKIE[Configure::read('Session.cookie')])) {
@@ -670,7 +670,7 @@ class CommonComponent extends Component {
 				$this->Controller->redirect($url, 301);
 			}
 		}
-		return true;
+		return;
 		// problem with extensions (rss etc)
 
 		if (empty($this->Controller->request->params['prefix']) && ($currentUrl = $this->currentUrl(true)) != $this->Controller->here) {
@@ -694,6 +694,7 @@ class CommonComponent extends Component {
 	 * @param string $key
 	 * @param array $matching
 	 * @return string result
+	 * @deprecated
 	 */
 	public static function getGroup($multiDimArray, $key, $matching = []) {
 		if (!is_array($multiDimArray) || empty($key)) {

+ 3 - 0
Controller/MyController.php

@@ -8,6 +8,9 @@ class MyController extends ShimController {
 
 	/**
 	 * Fix for asset compress to not run into fatal error loops
+	 *
+	 * @param CakeRequest|null $request
+	 * @param CakeResponse|null $response
 	 */
 	public function __construct($request = null, $response = null) {
 		parent::__construct($request, $response);

+ 6 - 6
phpunit.xml

@@ -2,13 +2,13 @@
 <phpunit>
 	<filter>
 		<whitelist>
-			<directory suffix=".php">Plugin/Tools</directory>
+			<directory suffix=".php">./Plugin/Tools</directory>
 			<exclude>
-				<directory suffix=".php">Plugin/Tools/Vendor</directory>
-				<directory suffix=".php">Plugin/Tools/Config/Schema</directory>
-				<directory suffix=".php">Plugin/Tools/Test</directory>
-				<directory suffix=".php">Plugin/Tools/TestSuite</directory>
-				<directory suffix=".php">Plugin/Tools/Lib/Error</directory>
+				<directory suffix=".php">./Plugin/Tools/Vendor</directory>
+				<directory suffix=".php">./Plugin/Tools/Config/Schema</directory>
+				<directory suffix=".php">./Plugin/Tools/Test</directory>
+				<directory suffix=".php">./Plugin/Tools/TestSuite</directory>
+				<directory suffix=".php">./Plugin/Tools/Lib/Error</directory>
 			</exclude>
 		</whitelist>
 	</filter>