mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
php-cs-fixer
This commit is contained in:
parent
c0fbaf1e89
commit
30515c69f3
11
.php_cs.dist
11
.php_cs.dist
@ -11,7 +11,7 @@ $finder = PhpCsFixer\Finder::create()
|
||||
->ignoreVCS(true);
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRules(array(
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'binary_operator_spaces' => true,
|
||||
'blank_line_after_namespace' => true,
|
||||
@ -61,6 +61,7 @@ return PhpCsFixer\Config::create()
|
||||
'not_operator_with_successor_space' => true,
|
||||
'object_operator_without_whitespace' => true,
|
||||
'ordered_imports' => true,
|
||||
'phpdoc_add_missing_param_annotation' => true,
|
||||
'phpdoc_align' => true,
|
||||
'phpdoc_indent' => true,
|
||||
'phpdoc_inline_tag' => true,
|
||||
@ -74,10 +75,8 @@ return PhpCsFixer\Config::create()
|
||||
'phpdoc_trim' => true,
|
||||
'phpdoc_types' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
//'psr4' => true,
|
||||
'self_accessor' => true,
|
||||
'short_scalar_cast' => true,
|
||||
//'simplified_null_return' => true,
|
||||
'single_blank_line_at_eof' => true,
|
||||
'single_blank_line_before_namespace' => true,
|
||||
'single_import_per_statement' => true,
|
||||
@ -93,8 +92,6 @@ return PhpCsFixer\Config::create()
|
||||
'unary_operator_spaces' => true,
|
||||
'visibility_required' => true,
|
||||
'whitespace_after_comma_in_array' => true,
|
||||
//'strict_param' => true,
|
||||
'array_syntax' => array('syntax' => 'short'),
|
||||
))
|
||||
->setFinder($finder)
|
||||
;
|
||||
])
|
||||
->setFinder($finder);
|
||||
|
@ -26,6 +26,7 @@ class InvoiceInvitationWasEmailed extends Event
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param Invitation $invitation
|
||||
* @param mixed $notes
|
||||
*/
|
||||
public function __construct(Invitation $invitation, $notes)
|
||||
{
|
||||
|
@ -26,6 +26,7 @@ class QuoteInvitationWasEmailed extends Event
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param Invitation $invitation
|
||||
* @param mixed $notes
|
||||
*/
|
||||
public function __construct(Invitation $invitation, $notes)
|
||||
{
|
||||
|
@ -248,6 +248,7 @@ class AccountController extends BaseController
|
||||
/**
|
||||
* @param $entityType
|
||||
* @param $visible
|
||||
* @param mixed $filter
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
@ -166,6 +166,7 @@ class AccountGatewayController extends BaseController
|
||||
|
||||
/**
|
||||
* Stores new account.
|
||||
* @param mixed $accountGatewayPublicId
|
||||
*/
|
||||
public function save($accountGatewayPublicId = false)
|
||||
{
|
||||
|
@ -124,6 +124,7 @@ class ClientApiController extends BaseAPIController
|
||||
* description="an ""unexpected"" error"
|
||||
* )
|
||||
* )
|
||||
* @param mixed $publicId
|
||||
*/
|
||||
public function update(UpdateClientRequest $request, $publicId)
|
||||
{
|
||||
|
@ -103,6 +103,7 @@ class ExpenseApiController extends BaseAPIController
|
||||
* description="an ""unexpected"" error"
|
||||
* )
|
||||
* )
|
||||
* @param mixed $publicId
|
||||
*/
|
||||
public function update(UpdateExpenseRequest $request, $publicId)
|
||||
{
|
||||
|
@ -325,6 +325,7 @@ class InvoiceApiController extends BaseAPIController
|
||||
* description="an ""unexpected"" error"
|
||||
* )
|
||||
* )
|
||||
* @param mixed $publicId
|
||||
*/
|
||||
public function update(UpdateInvoiceAPIRequest $request, $publicId)
|
||||
{
|
||||
|
@ -455,6 +455,7 @@ class InvoiceController extends BaseController
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @param mixed $publicId
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
@ -469,6 +470,7 @@ class InvoiceController extends BaseController
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @param mixed $entityType
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
|
@ -62,6 +62,7 @@ class OnlinePaymentController extends BaseController
|
||||
* @param $invitationKey
|
||||
* @param bool $gatewayType
|
||||
* @param bool $sourceId
|
||||
* @param mixed $gatewayTypeAlias
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
|
@ -71,6 +71,7 @@ class PaymentApiController extends BaseAPIController
|
||||
* description="an ""unexpected"" error"
|
||||
* )
|
||||
* )
|
||||
* @param mixed $publicId
|
||||
*/
|
||||
public function update(UpdatePaymentRequest $request, $publicId)
|
||||
{
|
||||
|
@ -107,6 +107,7 @@ class ProductApiController extends BaseAPIController
|
||||
* description="an ""unexpected"" error"
|
||||
* )
|
||||
* )
|
||||
* @param mixed $publicId
|
||||
*/
|
||||
public function update(UpdateProductRequest $request, $publicId)
|
||||
{
|
||||
|
@ -104,6 +104,7 @@ class TaxRateApiController extends BaseAPIController
|
||||
* description="an ""unexpected"" error"
|
||||
* )
|
||||
* )
|
||||
* @param mixed $publicId
|
||||
*/
|
||||
public function update(UpdateTaxRateRequest $request, $publicId)
|
||||
{
|
||||
|
@ -151,6 +151,7 @@ class UserController extends BaseController
|
||||
|
||||
/**
|
||||
* Stores new account.
|
||||
* @param mixed $userPublicId
|
||||
*/
|
||||
public function save($userPublicId = false)
|
||||
{
|
||||
|
@ -109,6 +109,7 @@ class VendorApiController extends BaseAPIController
|
||||
* description="an ""unexpected"" error"
|
||||
* )
|
||||
* )
|
||||
* @param mixed $publicId
|
||||
*/
|
||||
public function update(UpdateVendorRequest $request, $publicId)
|
||||
{
|
||||
|
@ -148,6 +148,10 @@ class parseCSV
|
||||
* Constructor.
|
||||
*
|
||||
* @param input CSV file or string
|
||||
* @param null|mixed $input
|
||||
* @param null|mixed $offset
|
||||
* @param null|mixed $limit
|
||||
* @param null|mixed $conditions
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
@ -175,6 +179,10 @@ class parseCSV
|
||||
* Parse CSV file or string.
|
||||
*
|
||||
* @param input CSV file or string
|
||||
* @param null|mixed $input
|
||||
* @param null|mixed $offset
|
||||
* @param null|mixed $limit
|
||||
* @param null|mixed $conditions
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
@ -211,6 +219,10 @@ class parseCSV
|
||||
* @param data 2D array with data
|
||||
* @param append append current data to end of target CSV if exists
|
||||
* @param fields field names
|
||||
* @param null|mixed $file
|
||||
* @param mixed $data
|
||||
* @param mixed $append
|
||||
* @param mixed $fields
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
@ -233,6 +245,11 @@ class parseCSV
|
||||
* @param data 2D array with data
|
||||
* @param fields field names
|
||||
* @param delimiter delimiter used to separate data
|
||||
* @param mixed $output
|
||||
* @param null|mixed $filename
|
||||
* @param mixed $data
|
||||
* @param mixed $fields
|
||||
* @param null|mixed $delimiter
|
||||
*
|
||||
* @return CSV data using delimiter of choice, or default
|
||||
*/
|
||||
@ -259,6 +276,8 @@ class parseCSV
|
||||
*
|
||||
* @param input input character encoding, uses default if left blank
|
||||
* @param output output character encoding, uses default if left blank
|
||||
* @param null|mixed $input
|
||||
* @param null|mixed $output
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
@ -282,6 +301,11 @@ class parseCSV
|
||||
* @param search_depth number of rows to analyze
|
||||
* @param preferred preferred delimiter characters
|
||||
* @param enclosure enclosure character, default is double quote (").
|
||||
* @param null|mixed $file
|
||||
* @param mixed $parse
|
||||
* @param null|mixed $search_depth
|
||||
* @param null|mixed $preferred
|
||||
* @param null|mixed $enclosure
|
||||
*
|
||||
* @return delimiter character
|
||||
*/
|
||||
@ -382,6 +406,7 @@ class parseCSV
|
||||
* Read file to string and call parse_string().
|
||||
*
|
||||
* @param file local CSV file
|
||||
* @param null|mixed $file
|
||||
*
|
||||
* @return 2D array with CSV data, or false on failure
|
||||
*/
|
||||
@ -401,6 +426,7 @@ class parseCSV
|
||||
* Parse CSV strings to arrays.
|
||||
*
|
||||
* @param data CSV string
|
||||
* @param null|mixed $data
|
||||
*
|
||||
* @return 2D array with CSV data, or false on failure
|
||||
*/
|
||||
@ -506,6 +532,11 @@ class parseCSV
|
||||
* @param is_php if a php die() call should be put on the first
|
||||
* line of the file, this is later ignored when read.
|
||||
* @param delimiter field delimiter to use
|
||||
* @param mixed $data
|
||||
* @param mixed $fields
|
||||
* @param mixed $append
|
||||
* @param mixed $is_php
|
||||
* @param null|mixed $delimiter
|
||||
*
|
||||
* @return CSV data (text string)
|
||||
*/
|
||||
@ -549,6 +580,7 @@ class parseCSV
|
||||
* Load local file or string.
|
||||
*
|
||||
* @param input local CSV file
|
||||
* @param null|mixed $input
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
@ -593,6 +625,8 @@ class parseCSV
|
||||
*
|
||||
* @param row array with values from a row
|
||||
* @param conditions specified conditions that the row must match
|
||||
* @param mixed $row
|
||||
* @param null|mixed $conditions
|
||||
*
|
||||
* @return true of false
|
||||
*/
|
||||
@ -629,6 +663,8 @@ class parseCSV
|
||||
*
|
||||
* @param row array with values from a row
|
||||
* @param condition specified condition that the row must match
|
||||
* @param mixed $row
|
||||
* @param mixed $condition
|
||||
*
|
||||
* @return true of false
|
||||
*/
|
||||
@ -692,6 +728,7 @@ class parseCSV
|
||||
* Validates if the row is within the offset or not if sorting is disabled.
|
||||
*
|
||||
* @param current_row the current row number being processed
|
||||
* @param mixed $current_row
|
||||
*
|
||||
* @return true of false
|
||||
*/
|
||||
@ -709,6 +746,7 @@ class parseCSV
|
||||
* - only used by unparse().
|
||||
*
|
||||
* @param value string to process
|
||||
* @param null|mixed $value
|
||||
*
|
||||
* @return Processed value
|
||||
*/
|
||||
@ -730,6 +768,7 @@ class parseCSV
|
||||
* Check file data.
|
||||
*
|
||||
* @param file local filename
|
||||
* @param null|mixed $file
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
@ -751,6 +790,10 @@ class parseCSV
|
||||
* - only used by find_delimiter().
|
||||
*
|
||||
* @return special string used for delimiter selection, or false
|
||||
* @param mixed $char
|
||||
* @param mixed $array
|
||||
* @param mixed $depth
|
||||
* @param mixed $preferred
|
||||
*/
|
||||
public function _check_count($char, $array, $depth, $preferred)
|
||||
{
|
||||
@ -786,6 +829,7 @@ class parseCSV
|
||||
* Read local file.
|
||||
*
|
||||
* @param file local filename
|
||||
* @param null|mixed $file
|
||||
*
|
||||
* @return Data from file, or false on failure
|
||||
*/
|
||||
@ -811,6 +855,10 @@ class parseCSV
|
||||
* @param string data to write to file
|
||||
* @param mode fopen() mode
|
||||
* @param lock flock() mode
|
||||
* @param mixed $file
|
||||
* @param mixed $string
|
||||
* @param mixed $mode
|
||||
* @param mixed $lock
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
|
@ -37,6 +37,7 @@ class SendInvoiceEmail extends Job implements ShouldQueue
|
||||
* @param Invoice $invoice
|
||||
* @param string $pdf
|
||||
* @param bool $reminder
|
||||
* @param mixed $pdfString
|
||||
*/
|
||||
public function __construct(Invoice $invoice, $reminder = false, $pdfString = false)
|
||||
{
|
||||
|
@ -41,6 +41,10 @@ class SendNotificationEmail extends Job implements ShouldQueue
|
||||
* @param UserMailer $userMailer
|
||||
* @param ContactMailer $contactMailer
|
||||
* @param PushService $pushService
|
||||
* @param mixed $user
|
||||
* @param mixed $invoice
|
||||
* @param mixed $type
|
||||
* @param mixed $payment
|
||||
*/
|
||||
public function __construct($user, $invoice, $type, $payment)
|
||||
{
|
||||
|
@ -29,6 +29,7 @@ class SendPushNotification extends Job implements ShouldQueue
|
||||
* Create a new job instance.
|
||||
|
||||
* @param Invoice $invoice
|
||||
* @param mixed $type
|
||||
*/
|
||||
public function __construct($invoice, $type)
|
||||
{
|
||||
|
@ -494,6 +494,7 @@ class Account extends Eloquent
|
||||
* @param $amount
|
||||
* @param null $client
|
||||
* @param bool $hideSymbol
|
||||
* @param mixed $decorator
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@ -253,6 +253,7 @@ class EntityModel extends Eloquent
|
||||
/**
|
||||
* @param $data
|
||||
* @param $entityType
|
||||
* @param mixed $entity
|
||||
*
|
||||
* @return bool|string
|
||||
*/
|
||||
|
@ -467,6 +467,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
|
||||
/**
|
||||
* @param bool $notify
|
||||
* @param mixed $reminder
|
||||
*/
|
||||
public function markInvitationsSent($notify = false, $reminder = false)
|
||||
{
|
||||
@ -498,6 +499,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
* @param $invitation
|
||||
* @param bool $messageId
|
||||
* @param bool $notify
|
||||
* @param mixed $notes
|
||||
*/
|
||||
public function markInvitationSent($invitation, $messageId = false, $notify = true, $notes = false)
|
||||
{
|
||||
|
@ -117,6 +117,7 @@ trait GeneratesNumbers
|
||||
|
||||
/**
|
||||
* @param $entityType
|
||||
* @param mixed $invoice
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -129,6 +130,7 @@ trait GeneratesNumbers
|
||||
|
||||
/**
|
||||
* @param $entity
|
||||
* @param mixed $counter
|
||||
*
|
||||
* @return bool|mixed
|
||||
*/
|
||||
|
@ -342,6 +342,7 @@ class User extends Authenticatable
|
||||
*
|
||||
* @param mixed $permission Either a single permission or an array of possible permissions
|
||||
* @param bool True to require all permissions, false to require only one
|
||||
* @param mixed $requireAll
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -146,6 +146,8 @@ class BaseTransformer extends TransformerAbstract
|
||||
/**
|
||||
* @param $date
|
||||
* @param string $format
|
||||
* @param mixed $data
|
||||
* @param mixed $field
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
|
@ -143,6 +143,7 @@ class ContactMailer extends Mailer
|
||||
* @param $subject
|
||||
* @param $pdfString
|
||||
* @param $documentStrings
|
||||
* @param mixed $reminder
|
||||
*
|
||||
* @throws \Laracasts\Presenter\Exceptions\PresenterException
|
||||
*
|
||||
|
@ -45,6 +45,7 @@ class PushFactory
|
||||
*
|
||||
* @param $token - device token
|
||||
* @param $message - user specific message
|
||||
* @param mixed $device
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -35,6 +35,7 @@ class TaskPresenter extends EntityPresenter
|
||||
|
||||
/**
|
||||
* @param $account
|
||||
* @param mixed $showProject
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
@ -16,6 +16,9 @@ class DashboardRepository
|
||||
* @param $groupBy
|
||||
* @param $startDate
|
||||
* @param $endDate
|
||||
* @param mixed $account
|
||||
* @param mixed $currencyId
|
||||
* @param mixed $includeExpenses
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@ -842,6 +842,7 @@ class InvoiceRepository extends BaseRepository
|
||||
|
||||
/**
|
||||
* @param $clientId
|
||||
* @param mixed $entityType
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
@ -22,6 +22,7 @@ class AccountGatewayPolicy extends EntityPolicy
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -22,6 +22,7 @@ class BankAccountPolicy extends EntityPolicy
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -11,6 +11,7 @@ class DocumentPolicy extends EntityPolicy
|
||||
{
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -14,6 +14,7 @@ class EntityPolicy
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -8,6 +8,7 @@ class ExpenseCategoryPolicy extends EntityPolicy
|
||||
{
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -8,6 +8,7 @@ class ExpensePolicy extends EntityPolicy
|
||||
{
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -35,6 +35,7 @@ class GenericEntityPolicy
|
||||
* @param User $user
|
||||
* @param $entityTypee
|
||||
* @param $ownerUserId
|
||||
* @param mixed $entityType
|
||||
*
|
||||
* @return bool|mixed
|
||||
*/
|
||||
|
@ -22,6 +22,7 @@ class PaymentTermPolicy extends EntityPolicy
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -8,6 +8,7 @@ class QuotePolicy extends EntityPolicy
|
||||
{
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -8,6 +8,7 @@ class TaskPolicy extends EntityPolicy
|
||||
{
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -19,6 +19,7 @@ class TaxRatePolicy extends EntityPolicy
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -8,6 +8,7 @@ class VendorPolicy extends EntityPolicy
|
||||
{
|
||||
/**
|
||||
* @param User $user
|
||||
* @param mixed $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -44,6 +44,7 @@ class CreditService extends BaseService
|
||||
|
||||
/**
|
||||
* @param $data
|
||||
* @param null|mixed $credit
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
|
@ -41,6 +41,7 @@ class ProductService extends BaseService
|
||||
|
||||
/**
|
||||
* @param $accountId
|
||||
* @param mixed $search
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
|
@ -43,6 +43,7 @@ class ProjectService extends BaseService
|
||||
|
||||
/**
|
||||
* @param $data
|
||||
* @param mixed $project
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
@ -58,6 +59,7 @@ class ProjectService extends BaseService
|
||||
/**
|
||||
* @param $clientPublicId
|
||||
* @param $search
|
||||
* @param mixed $userId
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
|
@ -55,6 +55,7 @@ class PushService
|
||||
* @param Invoice $invoice
|
||||
* @param $token
|
||||
* @param $type
|
||||
* @param mixed $device
|
||||
*/
|
||||
private function pushMessage(Invoice $invoice, $token, $type, $device)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user