X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FAction.php;h=dff3803348f861ba33b6111b9636ed68658bf8bf;hb=2849d8a6b3542795d230515a600670533adb2692;hp=40ce478c2c193f31f00fbfffabe3ea0d7cf43ce2;hpb=2fc769f823f5ce94e4d2f1ea1a54221c5ef719c8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Action.php b/includes/Action.php index 40ce478c2c..dff3803348 100644 --- a/includes/Action.php +++ b/includes/Action.php @@ -32,7 +32,7 @@ * * Actions generally fall into two groups: the show-a-form-then-do-something-with-the-input * format (protect, delete, move, etc), and the just-do-something format (watch, rollback, - * patrol, etc). The FormAction and FormlessAction classes respresent these two groups. + * patrol, etc). The FormAction and FormlessAction classes represent these two groups. */ abstract class Action { @@ -147,7 +147,7 @@ abstract class Action { /** * Check if a given action is recognised, even if it's disabled * - * @param $name String: name of an action + * @param string $name name of an action * @return Bool */ final public static function exists( $name ) { @@ -374,21 +374,26 @@ abstract class FormAction extends Action { * Add pre- or post-text to the form * @return String HTML which will be sent to $form->addPreText() */ - protected function preText() { return ''; } + protected function preText() { + return ''; + } /** * @return string */ - protected function postText() { return ''; } + protected function postText() { + return ''; + } /** * Play with the HTMLForm if you need to more substantially * @param $form HTMLForm */ - protected function alterForm( HTMLForm $form ) {} + protected function alterForm( HTMLForm $form ) { + } /** - * Get the HTMLForm to control behaviour + * Get the HTMLForm to control behavior * @return HTMLForm|null */ protected function getForm() { @@ -439,7 +444,7 @@ abstract class FormAction extends Action { * some stuff underneath (history etc); to do some processing on submission of that * form (delete, protect, etc) and to do something exciting on 'success', be that * display something new or redirect to somewhere. Some actions have more exotic - * behaviour, but that's what subclassing is for :D + * behavior, but that's what subclassing is for :D */ public function show() { $this->setHeaders(); @@ -545,8 +550,8 @@ abstract class FormlessAction extends Action { /** * Execute the action silently, not giving any output. Since these actions don't have * forms, they probably won't have any data, but some (eg rollback) may do - * @param $data Array values that would normally be in the GET request - * @param $captureErrors Bool whether to catch exceptions and just return false + * @param array $data values that would normally be in the GET request + * @param bool $captureErrors whether to catch exceptions and just return false * @throws ErrorPageError|Exception * @return Bool whether execution was successful */