diff options
author | Juha Sippola <juhasippola@outlook.com> | 2015-09-30 12:17:29 +0300 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@theqtcompany.com> | 2015-09-30 11:29:34 +0000 |
commit | e08a75721173b509403642f85fc00eb9800505bc (patch) | |
tree | 2c45b8d392b3fe6c658a74a756ce116b1768af2b | |
parent | 71d9450465de50e8b59c27fc98377d28df35bd65 (diff) |
Qt Metrics 2: File cleaning
Corrected timestamp parameter type in comments.
Changed '==' to '==='.
Change-Id: Ic1b552f1f2d969c687eedaca976e22d14ce3e0cd
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
22 files changed, 23 insertions, 41 deletions
diff --git a/non-puppet/qtmetrics2/.htaccess b/non-puppet/qtmetrics2/.htaccess index 85d194e..7f6aa46 100644 --- a/non-puppet/qtmetrics2/.htaccess +++ b/non-puppet/qtmetrics2/.htaccess @@ -32,7 +32,6 @@ ############################################################################# # Qt Metrics configuration -# @version 0.3 # @since 09-07-2015 # @author Juha Sippola diff --git a/non-puppet/qtmetrics2/project_search.php b/non-puppet/qtmetrics2/project_search.php index c43c431..b66dced 100644 --- a/non-puppet/qtmetrics2/project_search.php +++ b/non-puppet/qtmetrics2/project_search.php @@ -34,7 +34,6 @@ /** * Project autocomplete search - * @version 0.1 * @since 30-06-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/scripts/about.js b/non-puppet/qtmetrics2/scripts/about.js index bf0ee54..5c61bc5 100644 --- a/non-puppet/qtmetrics2/scripts/about.js +++ b/non-puppet/qtmetrics2/scripts/about.js @@ -34,7 +34,6 @@ /** * Show About window - * @version 0.2 * @since 18-06-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/scripts/loading.js b/non-puppet/qtmetrics2/scripts/loading.js index d9c62ce..0c05568 100644 --- a/non-puppet/qtmetrics2/scripts/loading.js +++ b/non-puppet/qtmetrics2/scripts/loading.js @@ -34,7 +34,6 @@ /** * Show loading progress bar - * @version 0.1 * @since 08-07-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/scripts/project_autocomplete.js b/non-puppet/qtmetrics2/scripts/project_autocomplete.js index 6970c8e..7ab9490 100644 --- a/non-puppet/qtmetrics2/scripts/project_autocomplete.js +++ b/non-puppet/qtmetrics2/scripts/project_autocomplete.js @@ -34,7 +34,6 @@ /** * Project autocomplete - * @version 0.1 * @since 30-06-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/scripts/testset_autocomplete.js b/non-puppet/qtmetrics2/scripts/testset_autocomplete.js index d561ac1..6912020 100644 --- a/non-puppet/qtmetrics2/scripts/testset_autocomplete.js +++ b/non-puppet/qtmetrics2/scripts/testset_autocomplete.js @@ -34,7 +34,6 @@ /** * Testset autocomplete - * @version 0.1 * @since 05-05-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/scripts/tooltip.js b/non-puppet/qtmetrics2/scripts/tooltip.js index 78dcfb9..27004c2 100644 --- a/non-puppet/qtmetrics2/scripts/tooltip.js +++ b/non-puppet/qtmetrics2/scripts/tooltip.js @@ -34,7 +34,6 @@ /** * Initialize Bootstrap tooltips - * @version 0.1 * @since 26-06-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/src/Conf.php b/non-puppet/qtmetrics2/src/Conf.php index 727b15a..51598fa 100644 --- a/non-puppet/qtmetrics2/src/Conf.php +++ b/non-puppet/qtmetrics2/src/Conf.php @@ -34,8 +34,7 @@ /** * Configuration class - * @version 0.1 - * @since 15-07-2015 + * @since 30-09-2015 * @author Juha Sippola */ @@ -102,19 +101,19 @@ class Conf { $statusText = ConfRun::RESULT_EMPTY; $builds = Factory::db()->getLatestConfBranchBuildResults( $this->name, $runProject, $runState); foreach ($builds as $build) { - if ($build['result'] == ConfRun::RESULT_SUCCESS AND $status <= self::STATUS_SUCCESS) { + if ($build['result'] === ConfRun::RESULT_SUCCESS AND $status <= self::STATUS_SUCCESS) { $status = self::STATUS_SUCCESS; $statusText = ConfRun::RESULT_SUCCESS; } - if ($build['result'] == ConfRun::RESULT_FAILURE AND $status <= self::STATUS_FAILURE) { + if ($build['result'] === ConfRun::RESULT_FAILURE AND $status <= self::STATUS_FAILURE) { $status = self::STATUS_FAILURE; $statusText = ConfRun::RESULT_FAILURE; } - if ($build['result'] == ConfRun::RESULT_ABORTED AND $status <= self::STATUS_ABORTED) { + if ($build['result'] === ConfRun::RESULT_ABORTED AND $status <= self::STATUS_ABORTED) { $status = self::STATUS_ABORTED; $statusText = ConfRun::RESULT_ABORTED; } - if ($build['result'] == ConfRun::RESULT_UNDEF AND $status <= self::STATUS_UNDEF) { + if ($build['result'] === ConfRun::RESULT_UNDEF AND $status <= self::STATUS_UNDEF) { $status = self::STATUS_UNDEF; $statusText = ConfRun::RESULT_UNDEF; } diff --git a/non-puppet/qtmetrics2/src/ConfRun.php b/non-puppet/qtmetrics2/src/ConfRun.php index eabefa0..513a182 100644 --- a/non-puppet/qtmetrics2/src/ConfRun.php +++ b/non-puppet/qtmetrics2/src/ConfRun.php @@ -34,7 +34,7 @@ /** * ConfRun class - * @since 17-09-2015 + * @since 30-09-2015 * @author Juha Sippola */ @@ -78,7 +78,7 @@ class ConfRun extends ProjectRun { * @param string $result * @param bool $forcesuccess (true = forcesuccess on) * @param bool $insignificant (true = insignificant) - * @param int $timestamp + * @param string $timestamp * @param int $duration */ public function __construct($name, $projectName, $branchName, $stateName, $buildKey, $result, $forcesuccess, $insignificant, $timestamp, $duration) { diff --git a/non-puppet/qtmetrics2/src/HttpBasicAuth.php b/non-puppet/qtmetrics2/src/HttpBasicAuth.php index cfe9caf..fbbfae8 100644 --- a/non-puppet/qtmetrics2/src/HttpBasicAuth.php +++ b/non-puppet/qtmetrics2/src/HttpBasicAuth.php @@ -34,7 +34,7 @@ /** * Basic HTTP authentication - * @since 06-08-2015 + * @since 30-09-2015 * @author Juha Sippola */ @@ -77,7 +77,7 @@ class HttpBasicAuth extends \Slim\Middleware // Check username and password if(isset($username) && isset($password)) { - if (($username == $ini['admin_username'] AND $password == $ini['admin_password'])) { + if (($username === $ini['admin_username'] AND $password === $ini['admin_password'])) { return true; } else { return false; diff --git a/non-puppet/qtmetrics2/src/Project.php b/non-puppet/qtmetrics2/src/Project.php index 0df5846..2ed0ae0 100644 --- a/non-puppet/qtmetrics2/src/Project.php +++ b/non-puppet/qtmetrics2/src/Project.php @@ -34,8 +34,7 @@ /** * Project class - * @version 0.2 - * @since 12-06-2015 + * @since 30-09-2015 * @author Juha Sippola */ @@ -100,18 +99,18 @@ class Project { $status = self::STATUS_EMPTY; $statusText = ProjectRun::RESULT_EMPTY; // Status for project with project_run - if ($this->name == $runProject) { + if ($this->name === $runProject) { $builds = Factory::db()->getLatestProjectBranchBuildResults($runProject, $runState); foreach ($builds as $build) { - if ($build['result'] == ProjectRun::RESULT_SUCCESS AND $status <= self::STATUS_SUCCESS) { + if ($build['result'] === ProjectRun::RESULT_SUCCESS AND $status <= self::STATUS_SUCCESS) { $status = self::STATUS_SUCCESS; $statusText = ProjectRun::RESULT_SUCCESS; } - if ($build['result'] == ProjectRun::RESULT_FAILURE AND $status <= self::STATUS_FAILURE) { + if ($build['result'] === ProjectRun::RESULT_FAILURE AND $status <= self::STATUS_FAILURE) { $status = self::STATUS_FAILURE; $statusText = ProjectRun::RESULT_FAILURE; } - if ($build['result'] == ProjectRun::RESULT_ABORTED AND $status <= self::STATUS_ABORTED) { + if ($build['result'] === ProjectRun::RESULT_ABORTED AND $status <= self::STATUS_ABORTED) { $status = self::STATUS_ABORTED; $statusText = ProjectRun::RESULT_ABORTED; } diff --git a/non-puppet/qtmetrics2/src/ProjectRun.php b/non-puppet/qtmetrics2/src/ProjectRun.php index 863d70b..593b966 100644 --- a/non-puppet/qtmetrics2/src/ProjectRun.php +++ b/non-puppet/qtmetrics2/src/ProjectRun.php @@ -34,7 +34,7 @@ /** * ProjectRun class - * @since 17-09-2015 + * @since 30-09-2015 * @author Juha Sippola */ @@ -104,7 +104,7 @@ class ProjectRun { * @param string $stateName * @param int $buildKey * @param string $result - * @param int $timestamp + * @param string $timestamp * @param int $duration */ public function __construct($projectName, $branchName, $stateName, $buildKey, $result, $timestamp, $duration) diff --git a/non-puppet/qtmetrics2/src/Testset.php b/non-puppet/qtmetrics2/src/Testset.php index ce2d543..745da3b 100644 --- a/non-puppet/qtmetrics2/src/Testset.php +++ b/non-puppet/qtmetrics2/src/Testset.php @@ -34,8 +34,7 @@ /** * Testset class - * @version 0.2 - * @since 11-06-2015 + * @since 30-09-2015 * @author Juha Sippola */ @@ -131,11 +130,11 @@ class Testset { $status = self::STATUS_EMPTY; $statusText = TestsetRun::RESULT_EMPTY; foreach ($builds as $build) { - if (TestsetRun::stripResult($build['result']) == TestsetRun::RESULT_SUCCESS AND $status <= self::STATUS_SUCCESS) { + if (TestsetRun::stripResult($build['result']) === TestsetRun::RESULT_SUCCESS AND $status <= self::STATUS_SUCCESS) { $status = self::STATUS_SUCCESS; $statusText = TestsetRun::RESULT_SUCCESS; } - if (TestsetRun::stripResult($build['result']) == TestsetRun::RESULT_FAILURE AND $status <= self::STATUS_FAILURE) { + if (TestsetRun::stripResult($build['result']) === TestsetRun::RESULT_FAILURE AND $status <= self::STATUS_FAILURE) { $status = self::STATUS_FAILURE; $statusText = TestsetRun::RESULT_FAILURE; } diff --git a/non-puppet/qtmetrics2/src/TestsetRun.php b/non-puppet/qtmetrics2/src/TestsetRun.php index 696014b..354682f 100644 --- a/non-puppet/qtmetrics2/src/TestsetRun.php +++ b/non-puppet/qtmetrics2/src/TestsetRun.php @@ -34,7 +34,7 @@ /** * TestsetRun class - * @since 24-09-2015 + * @since 30-09-2015 * @author Juha Sippola */ @@ -95,7 +95,7 @@ class TestsetRun extends ProjectRun { * @param int $run (ordinal number) * @param string $result (plain result without any possible flags) * @param bool $insignificant (true = insignificant) - * @param int $timestamp + * @param string $timestamp * @param int $duration (in deciseconds) */ public function __construct($name, $testsetProjectName, $projectName, $branchName, $stateName, $buildKey, $confName, $run, $result, $insignificant, $timestamp, $duration) { diff --git a/non-puppet/qtmetrics2/src/test/ConfTest.php b/non-puppet/qtmetrics2/src/test/ConfTest.php index 5f4383e..04172d1 100644 --- a/non-puppet/qtmetrics2/src/test/ConfTest.php +++ b/non-puppet/qtmetrics2/src/test/ConfTest.php @@ -37,7 +37,6 @@ require_once(__DIR__.'/../Factory.php'); /** * Configuration unit test class * @example To run (in qtmetrics root directory): php <path-to-phpunit>/phpunit.phar ./src/test - * @version 0.1 * @since 16-07-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/src/test/ProjectTest.php b/non-puppet/qtmetrics2/src/test/ProjectTest.php index 8ea8fed..6dc4c66 100644 --- a/non-puppet/qtmetrics2/src/test/ProjectTest.php +++ b/non-puppet/qtmetrics2/src/test/ProjectTest.php @@ -37,8 +37,7 @@ require_once(__DIR__.'/../Factory.php'); /** * Project unit test class * @example To run (in qtmetrics root directory): php <path-to-phpunit>/phpunit.phar ./src/test - * @version 0.2 - * @since 12-05-2015 + * @since 30-09-2015 * @author Juha Sippola */ @@ -70,7 +69,7 @@ class ProjectTest extends PHPUnit_Framework_TestCase public function testGetStatus($name, $runProject, $runState, $exp_build_results) { $project = new Project($name); - if ($runProject == $name) { // project with project_run data + if ($runProject === $name) { // project with project_run data $project->setStatus($runProject, $runState); $this->assertContains($project->getStatus(), $exp_build_results); } else { diff --git a/non-puppet/qtmetrics2/src/test/TestsetTest.php b/non-puppet/qtmetrics2/src/test/TestsetTest.php index dae7ce1..6a92326 100644 --- a/non-puppet/qtmetrics2/src/test/TestsetTest.php +++ b/non-puppet/qtmetrics2/src/test/TestsetTest.php @@ -37,7 +37,6 @@ require_once(__DIR__.'/../Factory.php'); /** * Testset unit test class * @example To run (in qtmetrics root directory): php <path-to-phpunit>/phpunit.phar ./src/test - * @version 0.2 * @since 11-06-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/styles/bootstrap_custom.css b/non-puppet/qtmetrics2/styles/bootstrap_custom.css index cd68a85..a67899e 100644 --- a/non-puppet/qtmetrics2/styles/bootstrap_custom.css +++ b/non-puppet/qtmetrics2/styles/bootstrap_custom.css @@ -35,7 +35,6 @@ /** * Bootstrap custom styling (from template custom css files) - * @version 0.1 * @since 30-04-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/templates/close.html b/non-puppet/qtmetrics2/templates/close.html index d10ece1..26101fc 100644 --- a/non-puppet/qtmetrics2/templates/close.html +++ b/non-puppet/qtmetrics2/templates/close.html @@ -34,7 +34,6 @@ /** * Tags to close html page - * @version 0.2 * @since 18-06-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/templates/empty.html b/non-puppet/qtmetrics2/templates/empty.html index b3e6620..2ba792d 100644 --- a/non-puppet/qtmetrics2/templates/empty.html +++ b/non-puppet/qtmetrics2/templates/empty.html @@ -34,7 +34,6 @@ /** * Empty html file with a message (for invalid routes) - * @version 0.2 * @since 18-06-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/templates/image.html b/non-puppet/qtmetrics2/templates/image.html index b8920cd..bda5285 100644 --- a/non-puppet/qtmetrics2/templates/image.html +++ b/non-puppet/qtmetrics2/templates/image.html @@ -34,7 +34,6 @@ /** * Page with an image - * @version 0.1 * @since 23-07-2015 * @author Juha Sippola */ diff --git a/non-puppet/qtmetrics2/testset_search.php b/non-puppet/qtmetrics2/testset_search.php index 0758ad1..e9d42e5 100644 --- a/non-puppet/qtmetrics2/testset_search.php +++ b/non-puppet/qtmetrics2/testset_search.php @@ -34,7 +34,6 @@ /** * Testset autocomplete search - * @version 0.2 * @since 25-06-2015 * @author Juha Sippola */ |