Fix some issues that triggered in scrutinizer.

This commit is contained in:
James Cole
2018-07-22 21:32:58 +02:00
parent 67ea825d4a
commit 4fa5f4e5a3
42 changed files with 81 additions and 80 deletions

View File

@@ -43,11 +43,11 @@ final class AmountExactly extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
return false;

View File

@@ -43,11 +43,11 @@ final class AmountLess extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
return false;

View File

@@ -43,11 +43,11 @@ final class AmountMore extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = 0 === bccomp('0', (string)$value);

View File

@@ -43,11 +43,11 @@ final class BudgetIs extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
return false;

View File

@@ -43,11 +43,11 @@ final class CategoryIs extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
return false;

View File

@@ -44,11 +44,11 @@ final class CurrencyIs extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
return false;

View File

@@ -42,11 +42,11 @@ final class DescriptionContains extends AbstractTrigger implements TriggerInterf
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -42,11 +42,11 @@ final class DescriptionEnds extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -42,11 +42,11 @@ final class DescriptionIs extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
return false;

View File

@@ -42,11 +42,11 @@ final class DescriptionStarts extends AbstractTrigger implements TriggerInterfac
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class FromAccountContains extends AbstractTrigger implements TriggerInterf
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class FromAccountEnds extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class FromAccountIs extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class FromAccountStarts extends AbstractTrigger implements TriggerInterfac
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class HasAnyBudget extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
return false;
}

View File

@@ -43,11 +43,11 @@ final class HasAnyCategory extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
return false;
}

View File

@@ -42,11 +42,11 @@ final class HasAnyTag extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
return false;
}

View File

@@ -42,11 +42,11 @@ class HasAttachment extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
$value = (int)$value;

View File

@@ -43,11 +43,11 @@ final class HasNoBudget extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
return false;
}

View File

@@ -43,11 +43,11 @@ final class HasNoCategory extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
return false;
}

View File

@@ -42,11 +42,11 @@ final class HasNoTag extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
return false;
}

View File

@@ -43,11 +43,11 @@ final class NotesAny extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
return false;
}

View File

@@ -43,11 +43,11 @@ final class NotesAre extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
return false;

View File

@@ -43,11 +43,11 @@ final class NotesContain extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class NotesEmpty extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
return false;
}

View File

@@ -43,11 +43,11 @@ final class NotesEnd extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class NotesStart extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class TagIs extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
return false;

View File

@@ -43,11 +43,11 @@ final class ToAccountContains extends AbstractTrigger implements TriggerInterfac
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class ToAccountEnds extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class ToAccountIs extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -43,11 +43,11 @@ final class ToAccountStarts extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
$res = '' === (string)$value;

View File

@@ -42,11 +42,11 @@ final class TransactionType extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
if (null !== $value) {
return false;

View File

@@ -41,11 +41,11 @@ interface TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @return bool
*/
public static function willMatchEverything($value = null);
public static function willMatchEverything($value = null): bool;
/**
* Triggers on a value and journal.

View File

@@ -42,13 +42,13 @@ final class UserAction extends AbstractTrigger implements TriggerInterface
* (even if it will still include 99.9% of the users transactions), this method MUST return
* false.
*
* @param null $value
* @param mixed $value
*
* @codeCoverageIgnore
*
* @return bool
*/
public static function willMatchEverything($value = null)
public static function willMatchEverything($value = null): bool
{
return true;
}