Skip to content

Commit

Permalink
Merge pull request #1987 from jim-parry/apidocs/errors
Browse files Browse the repository at this point in the history
Correct API docblock problems for phpdocs
  • Loading branch information
jim-parry authored May 6, 2019
2 parents c4373b0 + 48e8386 commit 80cc334
Show file tree
Hide file tree
Showing 75 changed files with 641 additions and 141 deletions.
4 changes: 4 additions & 0 deletions phpdoc.dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
<ignore>vendor/*</ignore>
<ignore>tests/*</ignore>
<ignore>Kint/*</ignore>
<ignore>*.tpl.php</ignore>
<ignore>*.js.php</ignore>
<ignore>Validation/Views/*</ignore>
<ignore>Pager/Views/</ignore>
</files>

<logging>
Expand Down
4 changes: 4 additions & 0 deletions system/Autoloader/FileLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
class FileLocator
{
/**
* The Autoloader to use.
*
* @var \CodeIgniter\Autoloader\Autoloader
*/
protected $autoloader;
Expand Down Expand Up @@ -261,6 +263,8 @@ protected function ensureExt(string $path, string $ext): string
//--------------------------------------------------------------------

/**
* Return the namespace mappings we know about.
*
* @param string|null $prefix
*
* @return array|string
Expand Down
7 changes: 2 additions & 5 deletions system/CLI/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@
use CodeIgniter\CLI\Exceptions\CLIException;

/**
* Class CLI
*
* Tools to interact with that request since CLI requests are not
* static like HTTP requests might be.
* Set of static methods useful for CLI request handling.
*
* Portions of this code were initially from the FuelPHP Framework,
* version 1.7.x, and used here under the MIT license they were
Expand All @@ -61,7 +58,7 @@
* an argument of "0".
* These have been flagged to ignore for code coverage purposes.
*
* @package CodeIgniter\HTTP
* @package CodeIgniter\CLI
*/
class CLI
{
Expand Down
4 changes: 4 additions & 0 deletions system/CLI/CommandRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class CommandRunner extends Controller
protected $commands = [];

/**
* Message logger.
*
* @var \CodeIgniter\Log\Logger
*/
protected $logger;
Expand Down Expand Up @@ -85,6 +87,8 @@ public function _remap($method, ...$params)
//--------------------------------------------------------------------

/**
* Default command.
*
* @param array $params
*
* @return mixed
Expand Down
6 changes: 6 additions & 0 deletions system/Cache/Handlers/FileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ class FileHandler implements CacheInterface

//--------------------------------------------------------------------

/**
* Constructor.
*
* @param type $config
* @throws type
*/
public function __construct($config)
{
$path = ! empty($config->storePath) ? $config->storePath : WRITEPATH . 'cache';
Expand Down
6 changes: 6 additions & 0 deletions system/Cache/Handlers/MemcachedHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ class MemcachedHandler implements CacheInterface

//--------------------------------------------------------------------

/**
* Constructor.
*
* @param type $config
* @throws type
*/
public function __construct($config)
{
$config = (array)$config;
Expand Down
6 changes: 6 additions & 0 deletions system/Cache/Handlers/PredisHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ class PredisHandler implements CacheInterface

//--------------------------------------------------------------------

/**
* Constructor.
*
* @param type $config
* @throws type
*/
public function __construct($config)
{
$this->prefix = $config->prefix ?: '';
Expand Down
6 changes: 6 additions & 0 deletions system/Cache/Handlers/RedisHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ class RedisHandler implements CacheInterface

//--------------------------------------------------------------------

/**
* Constructor.
*
* @param type $config
* @throws type
*/
public function __construct($config)
{
$config = (array)$config;
Expand Down
6 changes: 6 additions & 0 deletions system/Cache/Handlers/WincacheHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ class WincacheHandler implements CacheInterface

//--------------------------------------------------------------------

/**
* Constructor.
*
* @param type $config
* @throws type
*/
public function __construct($config)
{
$this->prefix = $config->prefix ?: '';
Expand Down
5 changes: 5 additions & 0 deletions system/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ class CodeIgniter

//--------------------------------------------------------------------

/**
* Constructor.
*
* @param type $config
*/
public function __construct($config)
{
$this->startTime = microtime(true);
Expand Down
7 changes: 6 additions & 1 deletion system/Commands/Database/MigrateStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ class MigrateStatus extends BaseCommand
'-g' => 'Set database group',
];

/**
* Namespaces to ignore when looking for migrations.
*
* @var type
*/
protected $ignoredNamespaces = [
'CodeIgniter',
'Config',
Expand All @@ -118,7 +123,7 @@ public function run(array $params = [])
$runner->setGroup($group);
}

// Get all namespaces form PSR4 paths.
// Get all namespaces from PSR4 paths.
$config = new Autoload();
$namespaces = $config->psr4;

Expand Down
5 changes: 5 additions & 0 deletions system/ComposerScripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
*/
class ComposerScripts
{
/**
* Base path to use.
*
* @var type
*/
protected static $basePath = 'ThirdParty/';

/**
Expand Down
14 changes: 13 additions & 1 deletion system/Config/BaseConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,20 @@ class BaseConfig
*
* @var array
*/
public static $registrars = [];
public static $registrars = [];

/**
* Has module discovery happened yet?
*
* @var boolean
*/
protected static $didDiscovery = false;

/**
* The modules configuration.
*
* @var type
*/
protected static $moduleConfig;

/**
Expand Down
12 changes: 5 additions & 7 deletions system/Config/ForeignCharacters.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@

namespace CodeIgniter\Config;

/**
* Describes foreign characters for transliteration with the text helper.
*/
class ForeignCharacters
{
/*
| -------------------------------------------------------------------
| Foreign Characters
| -------------------------------------------------------------------
| This file contains an array of foreign characters for transliteration
| conversion used by the Text helper
|
/**
* Without further ado, the list of foreign characters.
*/

public $characterList = [
Expand Down
8 changes: 8 additions & 0 deletions system/Config/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ public static function logger(bool $getShared = true)
//--------------------------------------------------------------------

/**
* Return the appropriate igration runner.
*
* @param \CodeIgniter\Config\BaseConfig $config
* @param \CodeIgniter\Database\ConnectionInterface $db
* @param boolean $getShared
Expand Down Expand Up @@ -432,6 +434,8 @@ public static function negotiator(RequestInterface $request = null, bool $getSha
//--------------------------------------------------------------------

/**
* Return the appropriate pagination handler.
*
* @param mixed $config
* @param \CodeIgniter\View\RendererInterface $view
* @param boolean $getShared
Expand Down Expand Up @@ -684,6 +688,8 @@ public static function security(App $config = null, bool $getShared = true)
//--------------------------------------------------------------------

/**
* Return the session manager.
*
* @param \Config\App $config
* @param boolean $getShared
*
Expand Down Expand Up @@ -761,6 +767,8 @@ public static function timer(bool $getShared = true)
//--------------------------------------------------------------------

/**
* Return the debug toolbar.
*
* @param \Config\Toolbar $config
* @param boolean $getShared
*
Expand Down
17 changes: 17 additions & 0 deletions system/Config/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
class View extends BaseConfig
{

/**
* Built-in View filters.
*
* @var type
*/
protected $coreFilters = [
'abs' => '\abs',
'capitalize' => '\CodeIgniter\View\Filters::capitalize',
Expand All @@ -67,6 +72,12 @@ class View extends BaseConfig
'title' => '\CodeIgniter\View\Filters::title',
'upper' => '\strtoupper',
];

/**
* Built-in View plugins.
*
* @var type
*/
protected $corePlugins = [
'current_url' => '\CodeIgniter\View\Plugins::currentURL',
'previous_url' => '\CodeIgniter\View\Plugins::previousURL',
Expand All @@ -78,6 +89,12 @@ class View extends BaseConfig
'siteURL' => '\CodeIgniter\View\Plugins::siteURL',
];

/**
* Constructor.
*
* Merge the built-in and developer-configured filters and plugins,
* with preference to the developer ones.
*/
public function __construct()
{
$this->filters = array_merge($this->coreFilters, $this->filters);
Expand Down
2 changes: 2 additions & 0 deletions system/Database/BaseConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1808,6 +1808,8 @@ abstract protected function _foreignKeyData(string $table): array;
//--------------------------------------------------------------------

/**
* Accessor for properties if they exist.
*
* @param string $key
*
* @return mixed
Expand Down
5 changes: 5 additions & 0 deletions system/Database/BasePreparedQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ abstract class BasePreparedQuery implements PreparedQueryInterface

//--------------------------------------------------------------------

/**
* Constructor.
*
* @param \CodeIgniter\Database\ConnectionInterface $db
*/
public function __construct(ConnectionInterface $db)
{
$this->db = &$db;
Expand Down
3 changes: 3 additions & 0 deletions system/Database/MySQLi/PreparedQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
use CodeIgniter\Database\PreparedQueryInterface;
use CodeIgniter\Database\BasePreparedQuery;

/**
* Prepared query for MySQLi
*/
class PreparedQuery extends BasePreparedQuery implements PreparedQueryInterface
{

Expand Down
3 changes: 3 additions & 0 deletions system/Database/Postgre/PreparedQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
use CodeIgniter\Database\PreparedQueryInterface;
use CodeIgniter\Database\BasePreparedQuery;

/**
* Prepared query for Postgre
*/
class PreparedQuery extends BasePreparedQuery implements PreparedQueryInterface
{

Expand Down
6 changes: 3 additions & 3 deletions system/Database/SQLite3/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class Builder extends BaseBuilder
*
* Generates a platform-specific replace string from the supplied data
*
* @param string the table name
* @param array the insert keys
* @param array the insert values
* @param string $table the table name
* @param array $keys the insert keys
* @param array $values the insert values
*
* @return string
*/
Expand Down
4 changes: 4 additions & 0 deletions system/Database/SQLite3/PreparedQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
use CodeIgniter\Database\PreparedQueryInterface;
use CodeIgniter\Database\BasePreparedQuery;

/**
* Prepared query for SQLite3
*/

class PreparedQuery extends BasePreparedQuery implements PreparedQueryInterface
{

Expand Down
5 changes: 5 additions & 0 deletions system/Database/SQLite3/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,15 @@ class Table
protected $prefixedTableName;

/**
* Database connection.
*
* @var Connection
*/
protected $db;

/**
* Handle to our forge.
*
* @var Forge
*/
protected $forge;
Expand All @@ -101,6 +105,7 @@ class Table
* Table constructor.
*
* @param Connection $db
* @param Forge $forge
*/
public function __construct(Connection $db, Forge $forge)
{
Expand Down
Loading

0 comments on commit 80cc334

Please sign in to comment.