mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-28 09:51:21 -06:00
No more PHP 5.6 tests.
This commit is contained in:
parent
78bcd3e1bb
commit
0bad227548
@ -3,7 +3,6 @@ sudo: false
|
|||||||
|
|
||||||
|
|
||||||
php:
|
php:
|
||||||
- 5.6
|
|
||||||
- 7
|
- 7
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
@ -443,7 +443,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
|||||||
*
|
*
|
||||||
* @return LengthAwarePaginator
|
* @return LengthAwarePaginator
|
||||||
*/
|
*/
|
||||||
public function getJournals(Budget $budget, LimitRepetition $repetition, int $take)
|
public function getJournals(Budget $budget, LimitRepetition $repetition = null, int $take = 50)
|
||||||
{
|
{
|
||||||
$offset = intval(Input::get('page')) > 0 ? intval(Input::get('page')) * $take : 0;
|
$offset = intval(Input::get('page')) > 0 ? intval(Input::get('page')) * $take : 0;
|
||||||
$setQuery = $budget->transactionJournals()->withRelevantData()->take($take)->offset($offset)
|
$setQuery = $budget->transactionJournals()->withRelevantData()->take($take)->offset($offset)
|
||||||
|
@ -168,7 +168,7 @@ interface BudgetRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @return LengthAwarePaginator
|
* @return LengthAwarePaginator
|
||||||
*/
|
*/
|
||||||
public function getJournals(Budget $budget, LimitRepetition $repetition, int $take);
|
public function getJournals(Budget $budget, LimitRepetition $repetition = null, int $take = 50);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
|
@ -291,7 +291,7 @@ class ExpandedForm
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function staticText($name, $value, array $options = [])
|
public function staticText(string $name, $value, array $options = [])
|
||||||
{
|
{
|
||||||
$label = $this->label($name, $options);
|
$label = $this->label($name, $options);
|
||||||
$options = $this->expandOptionArray($name, $label, $options);
|
$options = $this->expandOptionArray($name, $label, $options);
|
||||||
@ -310,7 +310,7 @@ class ExpandedForm
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function tags($name, $value = null, array $options = [])
|
public function tags(string $name, $value = null, array $options = [])
|
||||||
{
|
{
|
||||||
$label = $this->label($name, $options);
|
$label = $this->label($name, $options);
|
||||||
$options = $this->expandOptionArray($name, $label, $options);
|
$options = $this->expandOptionArray($name, $label, $options);
|
||||||
@ -329,7 +329,7 @@ class ExpandedForm
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function text($name, $value = null, array $options = [])
|
public function text(string $name, $value = null, array $options = [])
|
||||||
{
|
{
|
||||||
$label = $this->label($name, $options);
|
$label = $this->label($name, $options);
|
||||||
$options = $this->expandOptionArray($name, $label, $options);
|
$options = $this->expandOptionArray($name, $label, $options);
|
||||||
@ -348,7 +348,7 @@ class ExpandedForm
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function textarea($name, $value = null, array $options = [])
|
public function textarea(string $name, $value = null, array $options = [])
|
||||||
{
|
{
|
||||||
$label = $this->label($name, $options);
|
$label = $this->label($name, $options);
|
||||||
$options = $this->expandOptionArray($name, $label, $options);
|
$options = $this->expandOptionArray($name, $label, $options);
|
||||||
@ -368,7 +368,7 @@ class ExpandedForm
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function expandOptionArray($name, $label, array $options)
|
protected function expandOptionArray(string $name, $label, array $options)
|
||||||
{
|
{
|
||||||
$options['class'] = 'form-control';
|
$options['class'] = 'form-control';
|
||||||
$options['id'] = 'ffInput_' . $name;
|
$options['id'] = 'ffInput_' . $name;
|
||||||
@ -384,7 +384,7 @@ class ExpandedForm
|
|||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
protected function fillFieldValue($name, $value)
|
protected function fillFieldValue(string $name, $value)
|
||||||
{
|
{
|
||||||
if (Session::has('preFilled')) {
|
if (Session::has('preFilled')) {
|
||||||
$preFilled = session('preFilled');
|
$preFilled = session('preFilled');
|
||||||
@ -409,7 +409,7 @@ class ExpandedForm
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getHolderClasses($name)
|
protected function getHolderClasses(string $name)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Get errors from session:
|
* Get errors from session:
|
||||||
@ -431,7 +431,7 @@ class ExpandedForm
|
|||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
protected function label($name, $options)
|
protected function label(string $name, array $options)
|
||||||
{
|
{
|
||||||
if (isset($options['label'])) {
|
if (isset($options['label'])) {
|
||||||
return $options['label'];
|
return $options['label'];
|
||||||
|
@ -22,7 +22,7 @@ class Navigation
|
|||||||
* @return \Carbon\Carbon
|
* @return \Carbon\Carbon
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function addPeriod(Carbon $theDate, $repeatFreq, $skip)
|
public function addPeriod(Carbon $theDate, string $repeatFreq, int $skip)
|
||||||
{
|
{
|
||||||
$date = clone $theDate;
|
$date = clone $theDate;
|
||||||
$add = ($skip + 1);
|
$add = ($skip + 1);
|
||||||
@ -61,7 +61,7 @@ class Navigation
|
|||||||
* @return \Carbon\Carbon
|
* @return \Carbon\Carbon
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function endOfPeriod(Carbon $theCurrentEnd, $repeatFreq)
|
public function endOfPeriod(Carbon $theCurrentEnd, string $repeatFreq)
|
||||||
{
|
{
|
||||||
$currentEnd = clone $theCurrentEnd;
|
$currentEnd = clone $theCurrentEnd;
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ class Navigation
|
|||||||
*
|
*
|
||||||
* @return \Carbon\Carbon
|
* @return \Carbon\Carbon
|
||||||
*/
|
*/
|
||||||
public function endOfX(Carbon $theCurrentEnd, $repeatFreq, Carbon $maxDate = null)
|
public function endOfX(Carbon $theCurrentEnd, string $repeatFreq, Carbon $maxDate = null)
|
||||||
{
|
{
|
||||||
$functionMap = [
|
$functionMap = [
|
||||||
'1D' => 'endOfDay',
|
'1D' => 'endOfDay',
|
||||||
@ -161,7 +161,7 @@ class Navigation
|
|||||||
* @return string
|
* @return string
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function periodShow(Carbon $date, $repeatFrequency)
|
public function periodShow(Carbon $date, string $repeatFrequency)
|
||||||
{
|
{
|
||||||
$formatMap = [
|
$formatMap = [
|
||||||
'1D' => '%e %B %Y',
|
'1D' => '%e %B %Y',
|
||||||
@ -196,7 +196,7 @@ class Navigation
|
|||||||
* @return \Carbon\Carbon
|
* @return \Carbon\Carbon
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function startOfPeriod(Carbon $theDate, $repeatFreq)
|
public function startOfPeriod(Carbon $theDate, string $repeatFreq)
|
||||||
{
|
{
|
||||||
$date = clone $theDate;
|
$date = clone $theDate;
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ class Navigation
|
|||||||
* @return \Carbon\Carbon
|
* @return \Carbon\Carbon
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function subtractPeriod(Carbon $theDate, $repeatFreq, $subtract = 1)
|
public function subtractPeriod(Carbon $theDate, string $repeatFreq, int $subtract = 1)
|
||||||
{
|
{
|
||||||
$date = clone $theDate;
|
$date = clone $theDate;
|
||||||
// 1D 1W 1M 3M 6M 1Y
|
// 1D 1W 1M 3M 6M 1Y
|
||||||
@ -286,13 +286,14 @@ class Navigation
|
|||||||
// a custom range requires the session start
|
// a custom range requires the session start
|
||||||
// and session end to calculate the difference in days.
|
// and session end to calculate the difference in days.
|
||||||
// this is then subtracted from $theDate (* $subtract).
|
// this is then subtracted from $theDate (* $subtract).
|
||||||
if($repeatFreq === 'custom') {
|
if ($repeatFreq === 'custom') {
|
||||||
/** @var Carbon $tStart */
|
/** @var Carbon $tStart */
|
||||||
$tStart = session('start', Carbon::now()->startOfMonth());
|
$tStart = session('start', Carbon::now()->startOfMonth());
|
||||||
/** @var Carbon $tEnd */
|
/** @var Carbon $tEnd */
|
||||||
$tEnd = session('end', Carbon::now()->endOfMonth());
|
$tEnd = session('end', Carbon::now()->endOfMonth());
|
||||||
$diffInDays = $tStart->diffInDays($tEnd);
|
$diffInDays = $tStart->diffInDays($tEnd);
|
||||||
$date->subDays($diffInDays * $subtract);
|
$date->subDays($diffInDays * $subtract);
|
||||||
|
|
||||||
return $date;
|
return $date;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,7 +307,7 @@ class Navigation
|
|||||||
* @return \Carbon\Carbon
|
* @return \Carbon\Carbon
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function updateEndDate($range, Carbon $start)
|
public function updateEndDate(string $range, Carbon $start)
|
||||||
{
|
{
|
||||||
$functionMap = [
|
$functionMap = [
|
||||||
'1D' => 'endOfDay',
|
'1D' => 'endOfDay',
|
||||||
@ -342,7 +343,7 @@ class Navigation
|
|||||||
* @return \Carbon\Carbon
|
* @return \Carbon\Carbon
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function updateStartDate($range, Carbon $start)
|
public function updateStartDate(string $range, Carbon $start)
|
||||||
{
|
{
|
||||||
$functionMap = [
|
$functionMap = [
|
||||||
'1D' => 'startOfDay',
|
'1D' => 'startOfDay',
|
||||||
|
Loading…
Reference in New Issue
Block a user