Skip to content

Commit

Permalink
Merge pull request #27 from jobee/update
Browse files Browse the repository at this point in the history
TASK: support Neos 7
  • Loading branch information
bwaidelich authored Oct 19, 2021
2 parents d4e913d + 95fabfd commit b40624c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
26 changes: 13 additions & 13 deletions Classes/Wwwision/Neos/MailChimp/Domain/Dto/CallbackQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public function __construct(\Closure $resultCallback, \Closure $countCallback =
*
* @return string
*/
public function getType()
public function getType(): string
{
return null;
return '';
}

/**
Expand All @@ -63,7 +63,7 @@ public function getType()
* @param boolean $cacheResult If the result cache should be used
* @return QueryResultInterface The query result
*/
public function execute($cacheResult = false)
public function execute($cacheResult = false): QueryResultInterface
{
return new CallbackQueryResult($this);
}
Expand All @@ -81,7 +81,7 @@ public function getResult(): array
*
* @return integer The query result count
*/
public function count()
public function count(): int
{
if ($this->countCallback !== null) {
return call_user_func_array($this->countCallback, [$this]);
Expand All @@ -99,7 +99,7 @@ public function count()
* @param array $orderings The property names to order by
* @return QueryInterface
*/
public function setOrderings(array $orderings)
public function setOrderings(array $orderings): QueryInterface
{
$this->orderings = $orderings;
return $this;
Expand All @@ -114,7 +114,7 @@ public function setOrderings(array $orderings)
*
* @return array
*/
public function getOrderings()
public function getOrderings(): array
{
return $this->orderings;
}
Expand All @@ -126,7 +126,7 @@ public function getOrderings()
* @param integer $limit
* @return QueryInterface
*/
public function setLimit($limit)
public function setLimit($limit): QueryInterface
{
$this->limit = $limit;
return $this;
Expand All @@ -137,7 +137,7 @@ public function setLimit($limit)
*
* @return integer
*/
public function getLimit()
public function getLimit(): ?int
{
return $this->limit;
}
Expand All @@ -149,7 +149,7 @@ public function getLimit()
* @param integer $offset
* @return QueryInterface
*/
public function setOffset($offset)
public function setOffset($offset): QueryInterface
{
$this->offset = $offset;
return $this;
Expand All @@ -160,15 +160,15 @@ public function setOffset($offset)
*
* @return integer
*/
public function getOffset()
public function getOffset(): ?int
{
return $this->offset;
}

/**
* @param object $constraint Some constraint, depending on the backend
*/
public function matching($constraint)
public function matching($constraint): QueryInterface
{
throw new \BadMethodCallException('This method is not implemented in this query implementation.');
}
Expand Down Expand Up @@ -290,14 +290,14 @@ public function greaterThanOrEqual($propertyName, $operand)
/**
* @param boolean $distinct
*/
public function setDistinct($distinct = true)
public function setDistinct($distinct = true): QueryInterface
{
throw new \BadMethodCallException('This method is not implemented in this query implementation.');
}

/**
*/
public function isDistinct()
public function isDistinct(): bool
{
throw new \BadMethodCallException('This method is not implemented in this query implementation.');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Wwwision\Neos\MailChimp\Domain\Dto;

use Neos\Flow\Persistence\QueryInterface;
use Neos\Flow\Persistence\QueryResultInterface;

/**
Expand Down Expand Up @@ -45,7 +46,7 @@ protected function initialize(): void
*
* @return CallbackQuery
*/
public function getQuery()
public function getQuery(): QueryInterface
{
return clone $this->query;
}
Expand Down Expand Up @@ -83,7 +84,7 @@ public function count()
*
* @return array
*/
public function toArray()
public function toArray(): array
{
$this->initialize();
return $this->results;
Expand Down
14 changes: 11 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Flow package that integrates MailChimp into your Neos site / Flow Application",
"license": "GPL-3.0+",
"require": {
"neos/neos": "^5.0"
"neos/neos": "^5.0 || ^7.0"
},
"autoload": {
"psr-0": {
Expand Down Expand Up @@ -85,7 +85,15 @@
"Neos.Fusion-20180211184832",
"Neos.Flow-20180415105700",
"Neos.Neos-20180907103800",
"Neos.Neos.Ui-20190319094900"
"Neos.Neos.Ui-20190319094900",
"Neos.ContentRepository.Search-20161210231100",
"Neos.Flow-20190425144900",
"Neos.Flow-20190515215000",
"Neos.Flow-20200813181400",
"Neos.Flow-20201003165200",
"Neos.Flow-20201109224100",
"Neos.Flow-20201205172733",
"Neos.Flow-20201207104500"
]
}
}
}

0 comments on commit b40624c

Please sign in to comment.