Skip to content

Commit

Permalink
Update PHPDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
GwendolenLynch committed May 24, 2017
1 parent 710c529 commit 86c10e5
Show file tree
Hide file tree
Showing 151 changed files with 280 additions and 309 deletions.
2 changes: 1 addition & 1 deletion src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public function __isset($name)
}

/**
* Get the Bolt version string
* Get the Bolt version string.
*
* @return string
*
Expand Down
2 changes: 1 addition & 1 deletion src/Asset/AssetInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function getPriority();
public function setPriority($priority);

/**
* Get the asset's zone. Either 'frontend' or 'backend'
* Get the asset's zone. Either 'frontend' or 'backend'.
*
* @return string|null
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Asset/AssetSortTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
trait AssetSortTrait
{
/**
* Do a Schwartzian Transform for stable sort
* Do a Schwartzian Transform for stable sort.
*
* @see http://en.wikipedia.org/wiki/Schwartzian_transform
*
Expand Down
6 changes: 2 additions & 4 deletions src/Composer/Action/CheckPackage.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ public function execute()
$json = $jsonFile->parse();
$jsonRequires = isset($json['require']) ? (array) $json['require'] : [];

/**
* @var string $packageName
* @var string $versionConstraint
*/
/** @var string $packageName */
/** @var string $versionConstraint */
foreach ($jsonRequires as $packageName => $versionConstraint) {
try {
$remote = $this->findBestVersionForPackage($packageName, $versionConstraint, true);
Expand Down
10 changes: 6 additions & 4 deletions src/Composer/Action/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function noDev()
}

/**
* Skips autoloader generation
* Skips autoloader generation.
*
* Composer parameter: --no-autoloader
*
Expand Down Expand Up @@ -124,7 +124,7 @@ public function withDependencies()
}

/**
* Ignore platform requirements (php & ext- packages)
* Ignore platform requirements (php & ext- packages).
*
* Composer parameter: --ignore-platform-reqs
*
Expand All @@ -136,7 +136,7 @@ public function ignorePlatformReqs()
}

/**
* Prefer stable versions of dependencies
* Prefer stable versions of dependencies.
*
* Composer parameter: --prefer-stable
*
Expand Down Expand Up @@ -208,7 +208,7 @@ public function update()
}

/**
* Disables the automatic update of the dependencies
* Disables the automatic update of the dependencies.
*
* Composer parameter: --no-update
*
Expand Down Expand Up @@ -244,6 +244,8 @@ public function updateWithDependencies()
}

/**
* Return the 'dev' parameter.
*
* Depending on where used:
* - Add requirement to require-dev
* - Removes a package from the require-dev section
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/EventListener/PackageEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class PackageEventListener
{
/**
* Event handler for composer package events
* Event handler for composer package events.
*
* @param PackageEvent $event
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/JsonManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class JsonManager
/** @var array */
protected $messages = [];

/** @var Application */
/** @var Application */
private $app;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/PackageManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PackageManager
/** @var boolean */
protected $useSsl;

/** @var array|null */
/** @var array|null */
private $json;
/** @var string[] */
private $messages = [];
Expand Down
4 changes: 2 additions & 2 deletions src/Composer/Satis/StatService.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class StatService
public $urls = ['install' => 'stat/install/%s/%s'];
/** @var string */
private $extendSite;
/** @var ClientInterface */
/** @var ClientInterface */
private $client;
/** @var LoggerInterface */
/** @var LoggerInterface */
private $loggerSystem;

/**
Expand Down
13 changes: 8 additions & 5 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Config
*/
public $fields;

/** @var boolean @deprecated Deprecated since 3.2, to be removed in 4.0 */
/** @var boolean @deprecated Deprecated since 3.2, to be removed in 4.0 */
public $notify_update;

/** @var array */
Expand Down Expand Up @@ -129,7 +129,7 @@ private function loadTheme()
}

/**
* Read and parse a YAML configuration file
* Read and parse a YAML configuration file.
*
* @param string $filename The name of the YAML file to read
* @param DirectoryInterface $directory The (optional) directory to the YAML file
Expand Down Expand Up @@ -200,7 +200,7 @@ public function get($path, $default = null)
}

/**
* Replaces placeholders in config values %foo% will be resolved to $app['foo'] from the container
* Replaces placeholders in config values %foo% will be resolved to $app['foo'] from the container.
*
* @internal This is only public so that it can be called from the service provider boot method.
* Do not access this directly since the API is liable to be changed at short notice.
Expand Down Expand Up @@ -556,7 +556,7 @@ protected function parseContentType($key, $contentType, $generalConfig)
}

/**
* Parse a Contenttype's filed and determine the grouping
* Parse a Contenttype's filed and determine the grouping.
*
* @param array $fields
* @param array $generalConfig
Expand Down Expand Up @@ -777,7 +777,8 @@ protected function parseSqliteOptions(array $config)
}

/**
* Parses params to valid connection parameters:
* Parses params to valid connection parameters.
*
* - Defaults are merged into the params
* - Bolt keys are converted to Doctrine keys
* - Invalid keys are filtered out
Expand Down Expand Up @@ -1334,6 +1335,8 @@ protected function checkValidCache()
/**
* Get a timestamp, corrected to the timezone.
*
* @param mixed $when
*
* @return string Timestamp
*/
public function getTimestamp($when)
Expand Down
4 changes: 1 addition & 3 deletions src/Configuration/Check/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ public function getException()
}

/**
* Valid output for json_encode()
*
* @return array
* {@inheritdoc}
*/
public function jsonSerialize()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/ConfigurationValueProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function getSubscribedEvents()
}

/**
* Get the data of the loaded config
* Get the data of the loaded config.
*
* @return array
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Configuration/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function syncAssetsDirectory($dir)
}

/**
* Check if the cache version matches Bolt's current version
* Check if the cache version matches Bolt's current version.
*
* @return boolean TRUE - versions match
* FALSE - versions don't match
Expand Down Expand Up @@ -166,7 +166,7 @@ protected function updateAutoloader()
}

/**
* Write our version string out to given cache directory
* Write our version string out to given cache directory.
*/
protected function updateCacheVersion()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/LowlevelChecks.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function removeCheck($check)
}

/**
* Add a check
* Add a check.
*
* @param string $check
* @param boolean $top
Expand Down
8 changes: 4 additions & 4 deletions src/Configuration/ResourceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,11 @@ public function getPathObject($name)
}

/**
* Checks if the given name has a path associated with it
* Checks if the given name has a path associated with it.
*
* @param string $name of path
*
* @return Boolean
* @return boolean
*/
public function hasPath($name)
{
Expand Down Expand Up @@ -420,8 +420,8 @@ public function getUrl($name, $includeBasePath = true)
}

/**
* Set a parameter that describes the request.
* e.g. 'hostname', 'protocol' or 'canonical'
* Set a parameter that describes the request,
* e.g. 'hostname', 'protocol' or 'canonical'.
*
* @param string $name
* @param string $value
Expand Down
2 changes: 2 additions & 0 deletions src/Configuration/YamlUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ public function change($key, $value, $backup = true)

/**
* @deprecated Deprecated since 3.3, to be remove in v4.
*
* @param mixed $value
*/
public function prepareValue($value)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/Async/FilesystemManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,12 @@ private function isMatchingExtension($oldName, $newName)
}

/**
* Log an exception to the system log
* Log an exception to the system log.
*
* @param string $message A formatted error message
* @param \Exception $exception The exception that has been thrown
*
* @return Boolean Whether the record has been processed
* @return boolean Whether the record has been processed
*/
private function logException($message, $exception)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Async/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function latestActivity()
}

/**
* Generate a URI based on request parameters
* Generate a URI based on request parameters.
*
* @param Request $request
*
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Backend/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function changeRecordListing(Request $request, $contenttype, $contentid)
}

/**
* System log overview route
* System log overview route.
*
* @param Request $request
*
Expand Down
10 changes: 5 additions & 5 deletions src/Controller/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected function abort($statusCode, $message = '', array $headers = [])
}

/**
* Renders a template
* Renders a template.
*
* @param string|string[] $template Template name(s)
* @param array $context Context variables
Expand Down Expand Up @@ -147,7 +147,7 @@ protected function createFormBuilder($type = FormType::class, $data = null, arra
}

/**
* Shortcut for {@see UrlGeneratorInterface::generate}
* Shortcut for {@see UrlGeneratorInterface::generate}.
*
* @param string $name The name of the route
* @param array $params An array of parameters
Expand Down Expand Up @@ -211,7 +211,7 @@ protected function session()
}

/**
* Gets the flash logger
* Gets the flash logger.
*
* @return \Bolt\Logger\FlashLoggerInterface
*/
Expand Down Expand Up @@ -333,7 +333,7 @@ protected function getUser($userId = null)
}

/**
* Shortcut for {@see \Bolt\AccessControl\Permissions::isAllowed}
* Shortcut for {@see \Bolt\AccessControl\Permissions::isAllowed}.
*
* @param string $what
* @param mixed $user The user to check permissions against.
Expand Down Expand Up @@ -365,7 +365,7 @@ protected function getRepository($repository)
}

/**
* Shortcut for {@see \Bolt\Legacy\Storage::getContent()}
* Shortcut for {@see \Bolt\Legacy\Storage::getContent()}.
*
* @param string $textquery
* @param array $parameters
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/ConfigurableBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected function resolveAfter($after)

/**
* Returns a closure that will resolve the class to use
* in middleware callback if one isn't specified
* in middleware callback if one isn't specified.
*
* @param array|string|null $callback
*
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Requirement.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Bolt\Config;

/**
* Defines route requirements from content types / taxonomy configurations
* Defines route requirements from content types / taxonomy configurations.
*
* @author Carson Full <[email protected]>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Cron extends Event
private $output;
/** @var array Passed in console paramters. */
private $param;
/** @var \DateTime The start of the execution time for this cron instance.*/
/** @var \DateTime The start of the execution time for this cron instance. */
private $runtime;
/** @var \DateTime */
private $cronHour;
Expand Down
2 changes: 1 addition & 1 deletion src/Debug/Caster/TransparentProxyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function setTransparent($bool = true)
public static function registerCaster(AbstractCloner $cloner)
{
/**
* Don't want this to be publicly accessible ;)
* Don't want this to be publicly accessible.
*
* @param TransparentProxyTrait $obj
* @param array $a
Expand Down
5 changes: 2 additions & 3 deletions src/Embed/GuzzleDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Embed\Http\Response;
use Embed\Http\Url;
use GuzzleHttp\Client;
use GuzzleHttp\Handler\CurlHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use GuzzleHttp\Promise;
Expand Down Expand Up @@ -43,7 +42,7 @@ public function __construct(Client $client, HandlerStack $handlerStack)
}

/**
* @inheritDoc
* {@inheritdoc}
*/
public function dispatch(Url $url)
{
Expand All @@ -61,7 +60,7 @@ public function dispatch(Url $url)
}

/**
* @inheritDoc
* {@inheritdoc}
*/
public function dispatchImages(array $urls)
{
Expand Down
Loading

0 comments on commit 86c10e5

Please sign in to comment.