浏览代码

Fix for PHP7

Mark Scherer 9 年之前
父节点
当前提交
09bb66ed71
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Console/Command/CodeShell.php

+ 4 - 1
Console/Command/CodeShell.php

@@ -43,12 +43,15 @@ class CodeShell extends AppShell {
 		}
 		}
 	}
 	}
 
 
+	/**
+	 * @return void
+	 */
 	protected function _correctFile($file) {
 	protected function _correctFile($file) {
 		$fileContent = $content = file_get_contents($file);
 		$fileContent = $content = file_get_contents($file);
 
 
 		preg_match_all('/class \w+ extends (.+)\s*{/', $fileContent, $matches);
 		preg_match_all('/class \w+ extends (.+)\s*{/', $fileContent, $matches);
 		if (empty($matches)) {
 		if (empty($matches)) {
-			continue;
+			return;
 		}
 		}
 
 
 		$excludes = ['Fixture', 'Exception', 'TestSuite', 'CakeTestModel'];
 		$excludes = ['Fixture', 'Exception', 'TestSuite', 'CakeTestModel'];