From 04869c6fccdd9e0b3f296da8829ec3a8d3daa97b Mon Sep 17 00:00:00 2001 From: Anh Nhan Nguyen Date: Tue, 19 Mar 2013 06:04:43 -0700 Subject: [PATCH] Made declaration of ReleephRequestDifferentialCreateController::willProcessRequest() consistent with AphrontController::willProcessRequest(array $uri_data) Summary: When submitting a diff I noticed that the unit test `testEverythingImplemented` threw an error that did not fail a test. ``` [2013-03-18 16:35:16] ERROR 2048: Declaration of ReleephRequestDifferentialCreateController::willProcessRequest() should be compatible with AphrontController::willProcessRequest(array $uri_data) at [/home/anhnhan/dev/vanilla/phabricator/src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php:99] #0 PhutilBootloader::executeInclude called at [/home/anhnhan/dev/vanilla/libphutil/src/__phutil_library_init__.php:203] #1 PhutilBootloader::executeInclude(/home/anhnhan/dev/vanilla/phabricator/src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php) called at [/home/anhnhan/dev/vanilla/libphutil/src/__phutil_library_init__.php:193] #2 PhutilBootloader::loadLibrarySource(phabricator, applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php) called at [/home/anhnhan/dev/vanilla/libphutil/src/symbols/PhutilSymbolLoader.php:341] #3 PhutilSymbolLoader::loadSymbol(Array of size 4 starting with: { type => class }) called at [/home/anhnhan/dev/vanilla/libphutil/src/symbols/PhutilSymbolLoader.php:246] #4 PhutilSymbolLoader::selectAndLoadSymbols() called at [/home/anhnhan/dev/vanilla/phabricator/src/infrastructure/__tests__/PhabricatorInfrastructureTestCase.php:15] #5 PhabricatorInfrastructureTestCase::testEverythingImplemented() #6 call_user_func_array(Array of size 2 starting with: { 0 => Object PhabricatorInfrastructureTestCase }, Array ) called at [/home/anhnhan/dev/vanilla/arcanist/src/unit/engine/phutil/ArcanistPhutilTestCase.php:441] #7 ArcanistPhutilTestCase::run() called at [/home/anhnhan/dev/vanilla/arcanist/src/unit/engine/PhutilUnitTestEngine.php:60] #8 PhutilUnitTestEngine::run() called at [/home/anhnhan/dev/vanilla/arcanist/src/workflow/ArcanistUnitWorkflow.php:160] #9 ArcanistUnitWorkflow::run() called at [/home/anhnhan/dev/vanilla/arcanist/scripts/arcanist.php:271] ``` Test Plan: `arc unit --everything` before this change gave error. applied this change. Re-ran `arc unit --everything`, no error. Reviewers: edward Reviewed By: edward CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D5373 --- .../request/ReleephRequestDifferentialCreateController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php b/src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php index 9da50fa846..881bdf807e 100644 --- a/src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php +++ b/src/applications/releeph/controller/request/ReleephRequestDifferentialCreateController.php @@ -5,7 +5,7 @@ final class ReleephRequestDifferentialCreateController private $revision; - public function willProcessRequest($data) { + public function willProcessRequest(array $data) { $diff_rev_id = $data['diffRevID']; $diff_rev = id(new DifferentialRevision())->load($diff_rev_id); if (!$diff_rev) {