Issues (14)

config/quickbooks.php (3 issues)

Labels
Severity
1
<?php
2
3
use App\User;
0 ignored issues
show
The type App\User was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
4
5
return [
6
7
    /*
8
    |--------------------------------------------------------------------------
9
    | Properties for the QuickBooks SDK DataService
10
    |--------------------------------------------------------------------------
11
    |
12
    | The configuration keys for the SDK are inconsistent in naming convention.
13
    | We are adhering to snake_case.  We make a sensible guess for 'base_url'
14
    | using the app's env, but you can can it with 'QUICKBOOKS_API_URL'.  Also,
15
    | the 'redirect_uri' is made in the client from the 'quickbooks.token'
16
    | named route, so it cannot be configured here.
17
    |
18
    | Most of the time, only 'QUICKBOOKS_CLIENT_ID' & 'QUICKBOOKS_CLIENT_SECRET'
19
    | needs to be set.
20
    |
21
    | See: https://intuit.github.io/QuickBooks-V3-PHP-SDK/configuration.html
22
    |
23
    */
24
25
    'data_service' => [
26
        'auth_mode'     => 'oauth2',
27
        'base_url'      => env('QUICKBOOKS_API_URL', config('app.env') === 'production' ? 'Production' : 'Development'),
0 ignored issues
show
The function config was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
        'base_url'      => env('QUICKBOOKS_API_URL', /** @scrutinizer ignore-call */ config('app.env') === 'production' ? 'Production' : 'Development'),
Loading history...
28
        'client_id'     => env('QUICKBOOKS_CLIENT_ID'),
29
        'client_secret' => env('QUICKBOOKS_CLIENT_SECRET'),
30
        'scope'         => 'com.intuit.quickbooks.accounting',
31
    ],
32
33
    /*
34
    |--------------------------------------------------------------------------
35
    | Properties to control logging
36
    |--------------------------------------------------------------------------
37
    |
38
    | Configures logging to <storage_path>/logs/quickbooks.log when in debug
39
    | mode or when 'QUICKBOOKS_DEBUG' is true.
40
    |
41
    */
42
43
    'logging' => [
44
        'enabled' => env('QUICKBOOKS_DEBUG', config('app.debug')),
45
46
        'location' => storage_path('logs'),
0 ignored issues
show
The function storage_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

46
        'location' => /** @scrutinizer ignore-call */ storage_path('logs'),
Loading history...
47
    ],
48
49
    /*
50
    |--------------------------------------------------------------------------
51
    | Properties to configure the routes
52
    |--------------------------------------------------------------------------
53
    |
54
    | There are several routes that are needed for the package, so these
55
    | properties allow configuring them to fit the application as needed.
56
    |
57
    */
58
59
    'route' => [
60
        // Controls the middlewares for thr routes.  Can be a string or array of strings
61
        'middleware' => [
62
            // Added to the protected routes for the package (i.e. connect & disconnect)
63
            'authenticated' => 'auth',
64
            // Added to all of the routes for the package
65
            'default'       => 'web',
66
        ],
67
        'paths'      => [
68
            // Show forms to connect/disconnect
69
            'connect'    => 'connect',
70
            // The DELETE takes place to remove token
71
            'disconnect' => 'disconnect',
72
            // Return URI that QuickBooks sends code to allow getting OAuth token
73
            'token'      => 'token',
74
        ],
75
        'prefix'     => 'quickbooks',
76
    ],
77
78
    /*
79
    |--------------------------------------------------------------------------
80
    | Properties for control the "user" relationship in Token
81
    |--------------------------------------------------------------------------
82
    |
83
    | The Token class has a "user" relationship, and these properties allow
84
    | configuring the relationship.
85
    |
86
    */
87
88
    'user' => [
89
        'keys'  => [
90
            'foreign' => 'user_id',
91
            'owner'   => 'id',
92
        ],
93
        'model' => User::class,
94
    ],
95
96
];
97