Upgrade CakePHP from 2.2.5 to 2.9.5

This commit is contained in:
Brm Ko 2017-02-26 15:29:44 +01:00
parent 5a580df460
commit 235a541597
793 changed files with 60746 additions and 23753 deletions

View file

@ -6,18 +6,22 @@
* PHP5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.TestSuite.Coverage
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
App::uses('Inflector', 'Utility');
App::uses('CakePlugin', 'Core');
/**
* Abstract class for common CoverageReport methods.
* Provides several template methods for custom output.
@ -48,7 +52,7 @@ abstract class BaseCoverageReport {
public $pluginTest = false;
/**
* Array of test case file names. Used to do basename() matching with
* Array of test case file names. Used to do basename() matching with
* files that have coverage to decide which results to show on page load.
*
* @var array
@ -60,7 +64,6 @@ abstract class BaseCoverageReport {
*
* @param array $coverage Array of coverage data from PHPUnit_Test_Result
* @param CakeBaseReporter $reporter A reporter to use for the coverage report.
* @return void
*/
public function __construct($coverage, CakeBaseReporter $reporter) {
$this->_rawCoverage = $coverage;
@ -95,14 +98,14 @@ abstract class BaseCoverageReport {
/**
* Gets the base path that the files we are interested in live in.
*
* @return void
* @return string Path
*/
public function getPathFilter() {
$path = ROOT . DS;
if ($this->appTest) {
$path .= APP_DIR . DS;
} elseif ($this->pluginTest) {
$path = App::pluginPath($this->pluginTest);
$path = CakePlugin::path($this->pluginTest);
} else {
$path = CAKE;
}
@ -110,7 +113,7 @@ abstract class BaseCoverageReport {
}
/**
* Filters the coverage data by path. Files not in the provided path will be removed.
* Filters the coverage data by path. Files not in the provided path will be removed.
*
* @param string $path Path to filter files by.
* @return array Array of coverage data for files that match the given path.
@ -134,9 +137,9 @@ abstract class BaseCoverageReport {
* 3.5 uses -1 for uncovered, and -2 for dead.
* 3.6 uses array() for uncovered and null for dead.
*
* @param array $fileLines
* @param array $coverageData
* @return array. Array of covered, total lines.
* @param array $fileLines The lines in the file.
* @param array $coverageData The raw coverage data.
* @return array Array of covered, total lines.
*/
protected function _calculateCoveredLines($fileLines, $coverageData) {
$covered = $total = 0;