upgraded to phpunit 8 (#1155)
This commit is contained in:
@@ -144,10 +144,6 @@ class TimesheetQuery extends ActivityQuery
|
||||
*/
|
||||
public function setState($state)
|
||||
{
|
||||
if (!is_int($state) && $state !== (int) $state) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$state = (int) $state;
|
||||
if (in_array($state, [self::STATE_ALL, self::STATE_RUNNING, self::STATE_STOPPED], true)) {
|
||||
$this->state = $state;
|
||||
@@ -170,10 +166,6 @@ class TimesheetQuery extends ActivityQuery
|
||||
*/
|
||||
public function setExported($exported)
|
||||
{
|
||||
if (!is_int($exported) && $exported !== (int) $exported) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$exported = (int) $exported;
|
||||
if (in_array($exported, [self::STATE_ALL, self::STATE_EXPORTED, self::STATE_NOT_EXPORTED], true)) {
|
||||
$this->exported = $exported;
|
||||
@@ -182,10 +174,7 @@ class TimesheetQuery extends ActivityQuery
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getBegin()
|
||||
public function getBegin(): ?\DateTime
|
||||
{
|
||||
return $this->dateRange->getBegin();
|
||||
}
|
||||
@@ -201,10 +190,7 @@ class TimesheetQuery extends ActivityQuery
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getEnd()
|
||||
public function getEnd(): ?\DateTime
|
||||
{
|
||||
return $this->dateRange->getEnd();
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class UserQuery extends VisibilityQuery
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $role;
|
||||
private $role;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -37,12 +37,12 @@ class UserQuery extends VisibilityQuery
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $role
|
||||
* @param string|null $role
|
||||
* @return UserQuery
|
||||
*/
|
||||
public function setRole($role)
|
||||
{
|
||||
if (false !== strpos($role, 'ROLE_') || null === $role) {
|
||||
if (null === $role || false !== strpos($role, 'ROLE_')) {
|
||||
$this->role = $role;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,10 +43,6 @@ class VisibilityQuery extends BaseQuery
|
||||
*/
|
||||
public function setVisibility($visibility)
|
||||
{
|
||||
if (!is_int($visibility) && $visibility != (int) $visibility) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$visibility = (int) $visibility;
|
||||
if (in_array($visibility, self::ALLOWED_VISIBILITY_STATES, true)) {
|
||||
$this->visibility = $visibility;
|
||||
|
||||
Reference in New Issue
Block a user