Skip to content

Commit

Permalink
Merge branch 'release/1.3.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 28, 2024
2 parents 7f905a7 + a0fd81d commit e2956d3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.3.7
## 10/28/2023

1. [](#improved)
* PHP 8.4 fixes - Implicitly nullable parameter declarations deprecate

# v1.3.6
## 10/11/2023

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Flex Objects
slug: flex-objects
type: plugin
version: 1.3.6
version: 1.3.7
description: Flex Objects plugin allows you to manage Flex Objects in Grav Admin.
icon: list-alt
author:
Expand Down
8 changes: 4 additions & 4 deletions classes/Admin/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ public function isFormSubmit(): bool
* @param FlexObjectInterface|null $object
* @return FlexFormInterface
*/
public function getForm(FlexObjectInterface $object = null): FlexFormInterface
public function getForm(?FlexObjectInterface $object = null): FlexFormInterface
{
$object = $object ?? $this->getObject();
if (!$object) {
Expand Down Expand Up @@ -1508,7 +1508,7 @@ public function getForm(FlexObjectInterface $object = null): FlexFormInterface
* @param FlexDirectoryInterface|null $directory
* @return FlexFormInterface
*/
public function getDirectoryForm(FlexDirectoryInterface $directory = null): FlexFormInterface
public function getDirectoryForm(?FlexDirectoryInterface $directory = null): FlexFormInterface
{
$directory = $directory ?? $this->getDirectory();
if (!$directory) {
Expand Down Expand Up @@ -1541,7 +1541,7 @@ public function getDirectoryForm(FlexDirectoryInterface $directory = null): Flex
* @param string|null $key
* @return FlexObjectInterface|null
*/
public function getObject(string $key = null): ?FlexObjectInterface
public function getObject(?string $key = null): ?FlexObjectInterface
{
if (null === $this->object) {
$key = $key ?? $this->id;
Expand Down Expand Up @@ -1588,7 +1588,7 @@ public function getObject(string $key = null): ?FlexObjectInterface
* @param string|null $type
* @return FlexDirectoryInterface|null
*/
public function getDirectory(string $type = null): ?FlexDirectoryInterface
public function getDirectory(?string $type = null): ?FlexDirectoryInterface
{
$type = $type ?? $this->target;

Expand Down
4 changes: 2 additions & 2 deletions classes/Controllers/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function getRequest(): ServerRequestInterface
* @param mixed $default
* @return mixed
*/
public function getPost(string $name = null, $default = null)
public function getPost(?string $name = null, $default = null)
{
$body = $this->request->getParsedBody();

Expand All @@ -176,7 +176,7 @@ public function isFormSubmit(): bool
* @param string|null $type
* @return FlexForm
*/
public function getForm(string $type = null): FlexFormInterface
public function getForm(?string $type = null): FlexFormInterface
{
$object = $this->getObject();
if (!$object) {
Expand Down
2 changes: 1 addition & 1 deletion classes/Controllers/ObjectController.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ public function actionDisplayPreview(): ResponseInterface
* @return void
* @throws RuntimeException
*/
public function checkAuthorization(string $action, string $scope = null): void
public function checkAuthorization(string $action, ?string $scope = null): void
{
$object = $this->getObject();

Expand Down
6 changes: 3 additions & 3 deletions classes/Flex.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function hasDirectory(string $type): bool
* @param bool $keepMissing
* @return array<FlexDirectoryInterface|null>
*/
public function getDirectories(array $types = null, bool $keepMissing = false): array
public function getDirectories(?array $types = null, bool $keepMissing = false): array
{
return $this->flex->getDirectories($types, $keepMissing);
}
Expand Down Expand Up @@ -147,7 +147,7 @@ public function getDirectory(string $type): ?FlexDirectory
* @param string|null $keyField
* @return FlexCollectionInterface|null
*/
public function getCollection(string $type, array $keys = null, string $keyField = null): ?FlexCollectionInterface
public function getCollection(string $type, ?array $keys = null, ?string $keyField = null): ?FlexCollectionInterface
{
return $this->flex->getCollection($type, $keys, $keyField);
}
Expand Down Expand Up @@ -185,7 +185,7 @@ public function getObjects(array $keys, array $options = []): array
* @param string|null $keyField
* @return FlexObjectInterface|null
*/
public function getObject(string $key, string $type = null, string $keyField = null): ?FlexObjectInterface
public function getObject(string $key, ?string $type = null, ?string $keyField = null): ?FlexObjectInterface
{
return $this->flex->getObject($key, $type, $keyField);
}
Expand Down

0 comments on commit e2956d3

Please sign in to comment.