Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Console/QtCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function __construct()
* @param string|null $key
* @return mixed|string
*/
public function getArgument(string $key = null)
public function getArgument(?string $key = null)
{
return $this->input->getArgument($key) ?? '';
}
Expand All @@ -101,7 +101,7 @@ public function getArgument(string $key = null)
* @param string|null $key
* @return mixed|string
*/
public function getOption(string $key = null)
public function getOption(?string $key = null)
{
return $this->input->getOption($key) ?? '';
}
Expand Down
2 changes: 1 addition & 1 deletion src/Debugger/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function __construct(DebuggerStore $store, DebugBar $debugBar, array $col
* @return Debugger
* @throws DebugBarException
*/
public static function getInstance(DebuggerStore $store = null, DebugBar $debugBar = null, ?array $collectors = []): Debugger
public static function getInstance(?DebuggerStore $store = null, ?DebugBar $debugBar = null, ?array $collectors = []): Debugger
{
if (self::$instance === null) {
$debugBar ??= new DebugBar();
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/Archive/Adapters/PharAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function addEmptyDir(string $directory): bool
* @inheritDoc
* @throws BaseException
*/
public function addFile(string $filePath, string $entryName = null): bool
public function addFile(string $filePath, ?string $entryName = null): bool
{
$this->ensureArchiveOpen();

Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/Archive/Adapters/ZipAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function addEmptyDir(string $directory): bool
* @inheritDoc
* @throws BaseException
*/
public function addFile(string $filePath, string $entryName = null): bool
public function addFile(string $filePath, ?string $entryName = null): bool
{
$this->ensureArchiveOpen();

Expand Down
6 changes: 3 additions & 3 deletions src/Libraries/Database/Adapters/Idiorm/IdiormPatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function use(object $ormModel): IdiormPatch
* @param string|null $table_alias
* @return object
*/
public function leftJoin(string $table, array $constraint, string $table_alias = null): object
public function leftJoin(string $table, array $constraint, ?string $table_alias = null): object
{
return $this->addJoin('LEFT', $table, $constraint, $table_alias);
}
Expand All @@ -75,7 +75,7 @@ public function leftJoin(string $table, array $constraint, string $table_alias =
* @param string|null $table_alias
* @return object
*/
public function rightJoin(string $table, array $constraint, string $table_alias = null): object
public function rightJoin(string $table, array $constraint, ?string $table_alias = null): object
{
return $this->addJoin('RIGHT', $table, $constraint, $table_alias);
}
Expand All @@ -88,7 +88,7 @@ public function rightJoin(string $table, array $constraint, string $table_alias
* @param string|null $table_alias
* @return object
*/
public function addJoin(string $operator, string $table, array $constraint, string $table_alias = null): object
public function addJoin(string $operator, string $table, array $constraint, ?string $table_alias = null): object
{
return $this->ormModel->_add_join_source($operator, $table, $constraint, $table_alias);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function criterias(...$criterias): DbalInterface
* @inheritDoc
* @throws DatabaseException
*/
public function having(string $column, string $operator, string $value = null): DbalInterface
public function having(string $column, string $operator, ?string $value = null): DbalInterface
{
if (!in_array($operator, $this->operators)) {
throw DatabaseException::operatorNotSupported($operator);
Expand Down
12 changes: 6 additions & 6 deletions src/Libraries/Database/Schemas/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class Column
* @param string|null $type
* @param mixed $constraint
*/
public function __construct(string $name, string $type = null, $constraint = null)
public function __construct(string $name, ?string $type = null, $constraint = null)
{
$this->name = $name;

Expand Down Expand Up @@ -226,7 +226,7 @@ public function indexDrop(string $indexName): Column
* @param string|null $action
* @return mixed
*/
public function get(string $property, string $action = null)
public function get(string $property, ?string $action = null)
{
return (isset($this->$property) && $action != self::RENAME && $action != self::DROP) ? $this->$property : null;
}
Expand All @@ -252,7 +252,7 @@ public function primary()
* Adds an index key to the column
* @param string|null $name
*/
public function index(string $name = null)
public function index(?string $name = null)
{
$this->indexKey = Key::INDEX;

Expand All @@ -265,7 +265,7 @@ public function index(string $name = null)
* Adds unique key to the column
* @param string|null $name
*/
public function unique(string $name = null)
public function unique(?string $name = null)
{
$this->indexKey = Key::UNIQUE;

Expand All @@ -278,7 +278,7 @@ public function unique(string $name = null)
* Adds a fulltext key the column
* @param string|null $name
*/
public function fulltext(string $name = null)
public function fulltext(?string $name = null)
{
$this->indexKey = Key::FULLTEXT;

Expand All @@ -291,7 +291,7 @@ public function fulltext(string $name = null)
* Adds a spatial key the column
* @param string|null $name
*/
public function spatial(string $name = null)
public function spatial(?string $name = null)
{
$this->indexKey = Key::SPATIAL;

Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/Database/Schemas/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function dropColumn(string $name)
* @param string $indexType
* @param string|null $indexName
*/
public function addIndex(string $columnName, string $indexType, string $indexName = null)
public function addIndex(string $columnName, string $indexType, ?string $indexName = null)
{
if ($this->action == self::ALTER) {
$this->columns[] = [
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/Database/Traits/TableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ protected function columnsSql(): string
* @param string|null $action
* @return string
*/
protected function composeColumn(Column $column, string $action = null): string
protected function composeColumn(Column $column, ?string $action = null): string
{
return
$this->columnAttrSql($column->get(Column::NAME), '`', '`') .
Expand Down
8 changes: 4 additions & 4 deletions src/Libraries/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function start(): HttpClient
* @return mixed|null
* @throws BaseException
*/
public function getRequestHeaders(string $header = null)
public function getRequestHeaders(?string $header = null)
{
$this->ensureSingleRequest();

Expand All @@ -223,7 +223,7 @@ public function getRequestHeaders(string $header = null)
* @return mixed|null
* @throws BaseException
*/
public function getResponseHeaders(string $header = null)
public function getResponseHeaders(?string $header = null)
{
$this->ensureSingleRequest();

Expand All @@ -242,7 +242,7 @@ public function getResponseHeaders(string $header = null)
* @return mixed|null
* @throws BaseException
*/
public function getResponseCookies(string $cookie = null)
public function getResponseCookies(?string $cookie = null)
{
$this->ensureSingleRequest();

Expand Down Expand Up @@ -291,7 +291,7 @@ public function getErrors(): array
* @return mixed
* @throws BaseException
*/
public function info(int $option = null)
public function info(?int $option = null)
{
$this->ensureSingleRequest();

Expand Down
4 changes: 2 additions & 2 deletions src/Libraries/Jwt/JwtToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class JwtToken extends JWT
* @param string|null $key
* @throws EnvException
*/
public function __construct(string $key = null)
public function __construct(?string $key = null)
{
$this->key = $key ?? env('APP_KEY');
}
Expand Down Expand Up @@ -124,7 +124,7 @@ public function setData(array $data): JwtToken
* @return string
* @throws JwtException
*/
public function compose($keyId = null, array $head = null): string
public function compose($keyId = null, ?array $head = null): string
{
if (empty($this->payload)) {
throw JwtException::payloadNotFound();
Expand Down
2 changes: 1 addition & 1 deletion src/Paginator/Contracts/PaginatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,5 @@ public function links(bool $withBaseUrl = false): array;
* @param int|null $pageItemsCount
* @return string|null
*/
public function getPagination(bool $withBaseUrl = false, int $pageItemsCount = null): ?string;
public function getPagination(bool $withBaseUrl = false, ?int $pageItemsCount = null): ?string;
}