Code optimisations.

This commit is contained in:
James Cole
2018-07-22 18:50:27 +02:00
parent ea2c48bca5
commit ca096852a5
56 changed files with 221 additions and 427 deletions

View File

@@ -52,6 +52,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property Carbon lastActivityDate
* @property Collection accountMeta
* @property bool encrypted
* @property int account_type_id
* @property Collection piggyBanks
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/

View File

@@ -27,6 +27,7 @@ use FireflyIII\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
@@ -37,7 +38,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property bool $active
* @property int $user_id
* @property-read string $email
* @property bool encrypted
* @property bool encrypted
* @property Collection budgetlimits
*/
class Budget extends Model
{

View File

@@ -32,7 +32,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property User $user
* @property string $key
* @property int $user_id
* @property mixed status
* @property string status
* @property int id
*/
class ExportJob extends Model
{
@@ -53,7 +54,7 @@ class ExportJob extends Model
public static function routeBinder(string $value): ExportJob
{
if (auth()->check()) {
$key = trim($value);
$key = trim($value);
/** @var User $user */
$user = auth()->user();
/** @var ExportJob $exportJob */

View File

@@ -41,6 +41,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property int $tag_id
* @property Tag $tag
* @property array $errors
* @property array extended_status
* @property int id
*/
class ImportJob extends Model
{

View File

@@ -41,6 +41,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property int $id
* @property int $order
* @property Collection $rules
* @property string description
*/
class RuleGroup extends Model
{

View File

@@ -36,6 +36,12 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property string $tag
* @property int $id
* @property \Carbon\Carbon $date
* @property int zoomLevel
* @property float longitude
* @property float latitude
* @property string description
* @property string amount_sum
* @property string tagMode
*/
class Tag extends Model
{

View File

@@ -89,6 +89,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property string $after // used in audit reports.
* @property int $opposing_id // ID of the opposing transaction, used in collector
* @property bool $encrypted // is the journal encrypted
* @property bool reconciled
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
*/
class Transaction extends Model

View File

@@ -53,6 +53,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property Carbon book_date
* @property Carbon process_date
* @property bool encrypted
* @property int order
* @property int budget_id
* @property string period_marker
*
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)