mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +00:00
Add openstreetmap with a mapbox.com layer. #420
This commit is contained in:
@@ -187,6 +187,14 @@ class TagRepository implements TagRepositoryInterface
|
||||
return new Carbon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Tag
|
||||
*/
|
||||
public function oldestTag(): ?Tag
|
||||
{
|
||||
return $this->user->tags()->whereNotNull('date')->orderBy('date', 'ASC')->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*/
|
||||
@@ -330,7 +338,6 @@ class TagRepository implements TagRepositoryInterface
|
||||
Log::debug(sprintf('Found %d tags', $tags->count()));
|
||||
/** @var Tag $tag */
|
||||
foreach ($tags as $tag) {
|
||||
|
||||
$amount = floatval($this->sumOfTag($tag, null, null));
|
||||
$min = $amount < $min || is_null($min) ? $amount : $min;
|
||||
$max = $amount > $max ? $amount : $max;
|
||||
@@ -356,7 +363,6 @@ class TagRepository implements TagRepositoryInterface
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
* @param array $data
|
||||
|
||||
@@ -103,6 +103,11 @@ interface TagRepositoryInterface
|
||||
*/
|
||||
public function lastUseDate(Tag $tag): Carbon;
|
||||
|
||||
/**
|
||||
* @return Tag|null
|
||||
*/
|
||||
public function oldestTag(): ?Tag;
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*/
|
||||
@@ -117,17 +122,6 @@ interface TagRepositoryInterface
|
||||
*/
|
||||
public function spentInPeriod(Tag $tag, Carbon $start, Carbon $end): string;
|
||||
|
||||
/**
|
||||
* Calculates various amounts in tag.
|
||||
*
|
||||
* @param Tag $tag
|
||||
* @param Carbon|null $start
|
||||
* @param Carbon|null $end
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function sumsOfTag(Tag $tag, ?Carbon $start, ?Carbon $end): array;
|
||||
|
||||
/**
|
||||
* This method stores a tag.
|
||||
*
|
||||
@@ -146,6 +140,17 @@ interface TagRepositoryInterface
|
||||
*/
|
||||
public function sumOfTag(Tag $tag, ?Carbon $start, ?Carbon $end): string;
|
||||
|
||||
/**
|
||||
* Calculates various amounts in tag.
|
||||
*
|
||||
* @param Tag $tag
|
||||
* @param Carbon|null $start
|
||||
* @param Carbon|null $end
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function sumsOfTag(Tag $tag, ?Carbon $start, ?Carbon $end): array;
|
||||
|
||||
/**
|
||||
* Generates a tag cloud.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user