Skip to content

Commit

Permalink
Fixing phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dcaswel committed Jan 8, 2021
1 parent 3e05689 commit 7a26aad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ parameters:
- '#Access to an undefined property CodeIgniter\\Database\\Forge::\$dropConstraintStr#'
- '#Access to an undefined property CodeIgniter\\Database\\BaseConnection::\$mysqli|\$schema#'
- '#Access to an undefined property CodeIgniter\\Database\\ConnectionInterface::(\$DBDriver|\$connID|\$likeEscapeStr|\$likeEscapeChar|\$escapeChar|\$protectIdentifiers|\$schema)#'
- '#Access to an undefined property CodeIgniter\\HTTP\\Request::\$uri#'
- '#Access to protected property CodeIgniter\\Database\\BaseConnection::(\$DBDebug|\$DBPrefix|\$swapPre|\$charset|\$DBCollat|\$database)#'
- '#Call to an undefined method CodeIgniter\\Database\\BaseConnection::_(disable|enable)ForeignKeyChecks\(\)#'
- '#Call to an undefined method CodeIgniter\\Database\\BaseConnection::supportsForeignKeys\(\)#'
- '#Call to an undefined method CodeIgniter\\Database\\ConnectionInterface::(tableExists|protectIdentifiers|setAliasedTables|escapeIdentifiers|affectedRows|addTableAlias|getIndexData)\(\)#'
- '#Call to an undefined method CodeIgniter\\HTTP\\Request::(getPath|getSegments|getMethod|setLocale|getPost)\(\)#'
- '#Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface::(getDefaultNamespace|isFiltered|getFilterForRoute|getRoutesOptions)\(\)#'
- '#Cannot access property [\$a-z_]+ on ((bool\|)?object\|resource)#'
- '#Cannot call method [a-zA-Z_]+\(\) on ((bool\|)?object\|resource)#'
Expand Down
4 changes: 1 addition & 3 deletions system/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class CodeIgniter
/**
* Current request.
*
* @var HTTP\Request|HTTP\IncomingRequest|CLIRequest|RequestInterface
* @var HTTP\Request|HTTP\IncomingRequest|CLIRequest
*/
protected $request;

Expand Down Expand Up @@ -581,7 +581,6 @@ protected function getRequestObject()
return;
}

// @phpstan-ignore-next-line
if (is_cli() && ENVIRONMENT !== 'testing')
{
// @codeCoverageIgnoreStart
Expand Down Expand Up @@ -842,7 +841,6 @@ protected function determinePath()
return $this->path;
}

// @phpstan-ignore-next-line
return (is_cli() && ! (ENVIRONMENT === 'testing')) ? $this->request->getPath() : $this->request->uri->getPath();
}

Expand Down

0 comments on commit 7a26aad

Please sign in to comment.