Skip to content

Commit

Permalink
Use (only) "@return $this" in fluent interfaces' documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov committed Apr 7, 2015
1 parent 6b63f3d commit 967a2e8
Show file tree
Hide file tree
Showing 57 changed files with 160 additions and 159 deletions.
2 changes: 1 addition & 1 deletion application/forms/Config/Authentication/DbBackendForm.php
Expand Up @@ -34,7 +34,7 @@ public function init()
*
* @param array $resources The resources to choose from
*
* @return self
* @return $this
*/
public function setResources(array $resources)
{
Expand Down
Expand Up @@ -35,7 +35,7 @@ public function init()
*
* @param array $resources The resources to choose from
*
* @return self
* @return $this
*/
public function setResources(array $resources)
{
Expand Down
6 changes: 3 additions & 3 deletions application/forms/Config/AuthenticationBackendConfigForm.php
Expand Up @@ -38,7 +38,7 @@ public function init()
*
* @param Config $resources The resource configuration
*
* @return self
* @return $this
*/
public function setResourceConfig(Config $resourceConfig)
{
Expand Down Expand Up @@ -82,7 +82,7 @@ public function getBackendForm($type)
*
* @param array $values The values to extend the configuration with
*
* @return self
* @return $this
*
* @throws InvalidArgumentException In case the backend does already exist
*/
Expand Down Expand Up @@ -159,7 +159,7 @@ public function remove($name)
* @param string $name The name of the backend to be moved
* @param int $position The new (absolute) position of the backend
*
* @return self
* @return $this
*
* @throws InvalidArgumentException In case the backend does not exist
*/
Expand Down
2 changes: 1 addition & 1 deletion application/forms/Config/ResourceConfigForm.php
Expand Up @@ -53,7 +53,7 @@ public function getResourceForm($type)
*
* @param array $values The values to extend the configuration with
*
* @return self
* @return $this
*
* @thrwos InvalidArgumentException In case the resource does already exist
*/
Expand Down
2 changes: 1 addition & 1 deletion application/forms/ConfigForm.php
Expand Up @@ -25,7 +25,7 @@ class ConfigForm extends Form
*
* @param Config $config The configuration to use
*
* @return self
* @return $this
*/
public function setIniConfig(Config $config)
{
Expand Down
7 changes: 4 additions & 3 deletions application/forms/PreferenceForm.php
Expand Up @@ -48,7 +48,7 @@ public function init()
*
* @param Preferences $preferences The preferences to work with
*
* @return self
* @return $this
*/
public function setPreferences(Preferences $preferences)
{
Expand All @@ -61,17 +61,18 @@ public function setPreferences(Preferences $preferences)
*
* @param PreferencesStore $store The preference store to use
*
* @return self
* @return $this
*/
public function setStore(PreferencesStore $store)
{
$this->store = $store;
return $this;
}

/**
* Persist preferences
*
* @return self
* @return $this
*/
public function save()
{
Expand Down
2 changes: 1 addition & 1 deletion application/views/helpers/DateFormat.php
Expand Up @@ -37,7 +37,7 @@ public function __construct(Zend_Controller_Request_Abstract $request = null)
/**
* Helper entry point
*
* @return self
* @return $this
*/
public function dateFormat()
{
Expand Down
6 changes: 3 additions & 3 deletions library/Icinga/Application/Config.php
Expand Up @@ -77,7 +77,7 @@ public function getConfigFile()
*
* @param string $filepath The path to the ini file
*
* @return self
* @return $this
*/
public function setConfigFile($filepath)
{
Expand Down Expand Up @@ -223,7 +223,7 @@ public function getSection($name)
* @param string $name
* @param array|ConfigObject $config
*
* @return self
* @return $this
*/
public function setSection($name, $config = null)
{
Expand All @@ -242,7 +242,7 @@ public function setSection($name, $config = null)
*
* @param string $name
*
* @return self
* @return $this
*/
public function removeSection($name)
{
Expand Down
2 changes: 1 addition & 1 deletion library/Icinga/Application/EmbeddedWeb.php
Expand Up @@ -20,7 +20,7 @@ class EmbeddedWeb extends ApplicationBootstrap
* Embedded bootstrap parts
*
* @see ApplicationBootstrap::bootstrap
* @return self
* @return $this
*/
protected function bootstrap()
{
Expand Down
10 changes: 5 additions & 5 deletions library/Icinga/Application/Modules/Manager.php
Expand Up @@ -156,7 +156,7 @@ private function detectEnabledModules()
/**
* Try to set all enabled modules in loaded sate
*
* @return self
* @return $this
* @see Manager::loadModule()
*/
public function loadEnabledModules()
Expand All @@ -173,7 +173,7 @@ public function loadEnabledModules()
* @param string $name The name of the module to load
* @param mixed $basedir Optional module base directory
*
* @return self
* @return $this
*/
public function loadModule($name, $basedir = null)
{
Expand All @@ -197,7 +197,7 @@ public function loadModule($name, $basedir = null)
*
* @param string $name The module to enable
*
* @return self
* @return $this
* @throws ConfigurationError When trying to enable a module that is not installed
* @throws NotFoundError In case the "enabledModules" directory does not exist
* @throws SystemPermissionException When insufficient permissions for the application exist
Expand Down Expand Up @@ -256,7 +256,7 @@ public function enableModule($name)
*
* @param string $name The name of the module to disable
*
* @return self
* @return $this
*
* @throws ConfigurationError When the module is not installed or it's not a symlink
* @throws SystemPermissionException When the module can't be disabled
Expand Down Expand Up @@ -491,7 +491,7 @@ public function listInstalledModules()
*
* @param array $availableDirs Installed modules location
*
* @return self
* @return $this
*/
public function detectInstalledModules(array $availableDirs = null)
{
Expand Down
20 changes: 10 additions & 10 deletions library/Icinga/Application/Modules/Module.php
Expand Up @@ -752,7 +752,7 @@ protected function provideRestriction($name, $description)
* @param string $name Unique tab name
* @param string $config Tab config
*
* @return self
* @return $this
*/
protected function provideConfigTab($name, $config = array())
{
Expand All @@ -769,7 +769,7 @@ protected function provideConfigTab($name, $config = array())
*
* @param string $className The name of the class
*
* @return self
* @return $this
*/
protected function provideSetupWizard($className)
{
Expand All @@ -780,7 +780,7 @@ protected function provideSetupWizard($className)
/**
* Register new namespaces on the autoloader
*
* @return self
* @return $this
*/
protected function registerAutoloader()
{
Expand All @@ -802,7 +802,7 @@ protected function registerAutoloader()
/**
* Bind text domain for i18n
*
* @return self
* @return $this
*/
protected function registerLocales()
{
Expand Down Expand Up @@ -849,7 +849,7 @@ public function listLocales()
*
* Add controller directory to mvc
*
* @return self
* @return $this
*/
protected function registerWebIntegration()
{
Expand All @@ -872,7 +872,7 @@ protected function registerWebIntegration()
/**
* Add routes for static content and any route added via addRoute() to the route chain
*
* @return self
* @return $this
* @see addRoute()
*/
protected function registerRoutes()
Expand Down Expand Up @@ -912,7 +912,7 @@ protected function registerRoutes()
/**
* Run module bootstrap script
*
* @return self
* @return $this
*/
protected function launchRunScript()
{
Expand All @@ -924,7 +924,7 @@ protected function launchRunScript()
*
* @param string $file File to include
*
* @return self
* @return $this
*/
protected function includeScript($file)
{
Expand Down Expand Up @@ -958,7 +958,7 @@ protected function launchConfigScript()
* @param string $class
* @param string $key
*
* @return self
* @return $this
*/
protected function registerHook($name, $class, $key = null)
{
Expand All @@ -977,7 +977,7 @@ protected function registerHook($name, $class, $key = null)
* @param string $name Name of the route
* @param Zend_Controller_Router_Route_Abstract $route Instance of the route
*
* @return self
* @return $this
* @see registerRoutes()
*/
protected function addRoute($name, Zend_Controller_Router_Route_Abstract $route)
Expand Down
2 changes: 1 addition & 1 deletion library/Icinga/Authentication/UserBackend.php
Expand Up @@ -26,7 +26,7 @@ abstract class UserBackend implements Countable
*
* @param string $name
*
* @return self
* @return $this
*/
public function setName($name)
{
Expand Down
14 changes: 7 additions & 7 deletions library/Icinga/Chart/Axis.php
Expand Up @@ -115,7 +115,7 @@ public function addDataset(array $dataset)
*
* @param AxisUnit $unit The AxisUnit implementation to use for the x axis
*
* @return self This Axis Object
* @return $this This Axis Object
* @see Axis::CalendarUnit
* @see Axis::LinearUnit
*/
Expand All @@ -130,7 +130,7 @@ public function setUnitForXAxis(AxisUnit $unit)
*
* @param AxisUnit $unit The AxisUnit implementation to use for the y axis
*
* @return self This Axis Object
* @return $this This Axis Object
* @see Axis::CalendarUnit
* @see Axis::LinearUnit
*/
Expand Down Expand Up @@ -331,7 +331,7 @@ public function setXLabel($label)
*
* @param string $label The label to use for the y axis
*
* @return self Fluid interface
* @return $this Fluid interface
*/
public function setYLabel($label)
{
Expand All @@ -346,7 +346,7 @@ public function setYLabel($label)
*
* @param int $xMin The minimum value to use for the x axis
*
* @return self Fluid interface
* @return $this Fluid interface
*/
public function setXMin($xMin)
{
Expand All @@ -361,7 +361,7 @@ public function setXMin($xMin)
*
* @param int $yMin The minimum value to use for the x axis
*
* @return self Fluid interface
* @return $this Fluid interface
*/
public function setYMin($yMin)
{
Expand All @@ -376,7 +376,7 @@ public function setYMin($yMin)
*
* @param int $xMax The minimum value to use for the x axis
*
* @return self Fluid interface
* @return $this Fluid interface
*/
public function setXMax($xMax)
{
Expand All @@ -391,7 +391,7 @@ public function setXMax($xMax)
*
* @param int $yMax The minimum value to use for the y axis
*
* @return self Fluid interface
* @return $this Fluid interface
*/
public function setYMax($yMax)
{
Expand Down

0 comments on commit 967a2e8

Please sign in to comment.