diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index a040953f73..d29f0afde4 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -477,8 +477,8 @@ abstract class PhabricatorApplication * To check if an application is installed at all, use * @{method:isClassInstalled}. * - * @param string Application class name. - * @param PhabricatorUser|null Viewing user. + * @param string $class Application class name. + * @param PhabricatorUser|null $viewer Viewing user. * @return bool True if the class is installed or if the installed class is * available to the viewer when a viewer is given. * @task meta diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php index 3c6342296f..3bcd48b9de 100644 --- a/src/applications/base/controller/PhabricatorController.php +++ b/src/applications/base/controller/PhabricatorController.php @@ -454,6 +454,9 @@ abstract class PhabricatorController extends AphrontController { ->setViewer($this->getViewer()); } + /** + * @return PHUICurtainView + */ public function newCurtainView($object = null) { $viewer = $this->getViewer(); diff --git a/src/applications/config/option/PhabricatorApplicationConfigOptions.php b/src/applications/config/option/PhabricatorApplicationConfigOptions.php index babe52341c..c7b7d15215 100644 --- a/src/applications/config/option/PhabricatorApplicationConfigOptions.php +++ b/src/applications/config/option/PhabricatorApplicationConfigOptions.php @@ -5,6 +5,9 @@ abstract class PhabricatorApplicationConfigOptions extends Phobject { abstract public function getName(); abstract public function getDescription(); abstract public function getGroup(); + /** + * @return array + */ abstract public function getOptions(); public function getIcon() { diff --git a/src/applications/herald/storage/HeraldRule.php b/src/applications/herald/storage/HeraldRule.php index c489ee61f8..297dba33d6 100644 --- a/src/applications/herald/storage/HeraldRule.php +++ b/src/applications/herald/storage/HeraldRule.php @@ -353,6 +353,9 @@ final class HeraldRule extends HeraldDAO ); } + /** + * @return string String like 'public', 'users', 'admin', or a User PHID + */ public function getPolicy($capability) { if ($capability == PhabricatorPolicyCapability::CAN_VIEW) { return PhabricatorPolicies::getMostOpenPolicy(); @@ -374,6 +377,9 @@ final class HeraldRule extends HeraldDAO return false; } + /** + * @return string|null + */ public function describeAutomaticCapability($capability) { if ($capability == PhabricatorPolicyCapability::CAN_VIEW) { return null; diff --git a/src/applications/policy/interface/PhabricatorPolicyInterface.php b/src/applications/policy/interface/PhabricatorPolicyInterface.php index df93512f2f..64045b9418 100644 --- a/src/applications/policy/interface/PhabricatorPolicyInterface.php +++ b/src/applications/policy/interface/PhabricatorPolicyInterface.php @@ -2,8 +2,25 @@ interface PhabricatorPolicyInterface extends PhabricatorPHIDInterface { + /** + * @return array + */ public function getCapabilities(); + + /** + * @param PhabricatorPolicyCapability $capability + * @return string A PhabricatorPolicyConstant + */ public function getPolicy($capability); + + /** + * Whether an object provides automatic capability grants to a user (e.g. the + * owner of an object can always see it even if a capability is set to NOONE) + * + * @param PhabricatorPolicyCapability $capability + * @param PhabricatorUser $viewer + * @return bool + */ public function hasAutomaticCapability($capability, PhabricatorUser $viewer); } diff --git a/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php index 23d5ad3f30..aaba6de1a8 100644 --- a/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php +++ b/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php @@ -34,6 +34,10 @@ final class PhabricatorEditEngineProfileMenuItem return $form; } + /** + * Attach forms to menu items shown in top bar Favorites dropdown + * @param array $items + */ public function willGetMenuItemViewList(array $items) { $viewer = $this->getViewer(); $engines = PhabricatorEditEngine::getAllEditEngines(); diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php index 3b2f7fc495..5520647bcd 100644 --- a/src/applications/transactions/editengine/PhabricatorEditEngine.php +++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php @@ -78,6 +78,12 @@ abstract class PhabricatorEditEngine return true; } + /** + * Whether this EditEngine creates by default an entry in the Favorites + * dropdown in the top bar to use the Default Form for this EditEngine + * + * @return bool + */ public function isDefaultQuickCreateEngine() { return false; } diff --git a/src/infrastructure/daemon/workers/clock/PhabricatorDailyRoutineTriggerClock.php b/src/infrastructure/daemon/workers/clock/PhabricatorDailyRoutineTriggerClock.php index 7b1041cf1b..98f2f88da6 100644 --- a/src/infrastructure/daemon/workers/clock/PhabricatorDailyRoutineTriggerClock.php +++ b/src/infrastructure/daemon/workers/clock/PhabricatorDailyRoutineTriggerClock.php @@ -47,8 +47,7 @@ final class PhabricatorDailyRoutineTriggerClock $next = new DateTime("{$ymd} {$hms} UTC"); // Add a day. - // NOTE: DateInterval doesn't exist until PHP 5.3.0, and we currently - // target PHP 5.2.3. + // TODO: Use PHP's DateInterval instead which exists since PHP 5.3.0 $next->modify('+1 day'); return (int)$next->format('U'); diff --git a/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php b/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php index a0c24cdc07..656a4903bc 100644 --- a/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php +++ b/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php @@ -475,7 +475,7 @@ abstract class PhabricatorPolicyAwareQuery extends PhabricatorOffsetPagedQuery { * automatically populated as a side effect of objects surviving policy * filtering. * - * @param array $objects Objects to add to + * @param array $objects Objects to add to * the query workspace. * @return $this * @task workspace diff --git a/src/view/form/control/AphrontFormTextAreaControl.php b/src/view/form/control/AphrontFormTextAreaControl.php index d83edeb0d1..8b75925f8d 100644 --- a/src/view/form/control/AphrontFormTextAreaControl.php +++ b/src/view/form/control/AphrontFormTextAreaControl.php @@ -32,6 +32,10 @@ class AphrontFormTextAreaControl extends AphrontFormControl { return $this->placeHolder; } + /** + * @param string $height One of the AphrontFormTextAreaControl::HEIGHT_* + * variables + */ public function setHeight($height) { $this->height = $height; return $this; @@ -55,6 +59,9 @@ class AphrontFormTextAreaControl extends AphrontFormControl { return $this; } + /** + * @return PhutilSafeHTML HTML textarea element + */ protected function renderInput() { $height_class = null; diff --git a/src/view/phui/PHUIInfoView.php b/src/view/phui/PHUIInfoView.php index 2ab16ce105..89288fbd73 100644 --- a/src/view/phui/PHUIInfoView.php +++ b/src/view/phui/PHUIInfoView.php @@ -31,7 +31,8 @@ final class PHUIInfoView extends AphrontTagView { } /** - * @param string One of the SEVERITY_* constants defined in PHUIInfoView + * @param string $severity One of the SEVERITY_* constants defined in + * PHUIInfoView * @return $this */ public function setSeverity($severity) {