1 | <?php |
||||
2 | /** |
||||
3 | * StupidlySimple - A PHP Framework For Lazy Developers. |
||||
4 | * |
||||
5 | * @author Fariz Luqman <[email protected]> |
||||
6 | * @copyright 2017 Fariz Luqman |
||||
7 | * @license MIT |
||||
8 | * |
||||
9 | * @link https://stupidlysimple.github.io/ |
||||
10 | */ |
||||
11 | |||||
12 | /* |
||||
13 | |-------------------------------------------------------------------------- |
||||
14 | | Setup Aliases |
||||
15 | |-------------------------------------------------------------------------- |
||||
16 | | |
||||
17 | | Reads the configuration file (config/aliases.php) and create aliases |
||||
18 | | |
||||
19 | */ |
||||
20 | Core\Alias::init(); |
||||
21 | |||||
22 | /* |
||||
23 | |-------------------------------------------------------------------------- |
||||
24 | | Set the default timezone |
||||
25 | |-------------------------------------------------------------------------- |
||||
26 | | |
||||
27 | | Reads the configuration file (config/datetime.php) and set timezone |
||||
28 | | |
||||
29 | */ |
||||
30 | TimeTrackr::init(); |
||||
0 ignored issues
–
show
|
|||||
31 | |||||
32 | /* |
||||
33 | |-------------------------------------------------------------------------- |
||||
34 | | Creating the Singleton |
||||
35 | |-------------------------------------------------------------------------- |
||||
36 | | |
||||
37 | | Damn Stupid Simple uses the Singleton to simplify coordination, while |
||||
38 | | maintaining only one instantiation of a class. |
||||
39 | | |
||||
40 | */ |
||||
41 | $app = new App(); |
||||
42 | |||||
43 | /* |
||||
44 | |-------------------------------------------------------------------------- |
||||
45 | | Linking to the Database Connector |
||||
46 | |-------------------------------------------------------------------------- |
||||
47 | | |
||||
48 | | Connect the database for only once. Save the planet. |
||||
49 | | |
||||
50 | */ |
||||
51 | $app->link('database', Database::connect()); |
||||
0 ignored issues
–
show
The method
link() does not exist on Illuminate\Support\Facades\App .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() The type
Database 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||
52 | |||||
53 | /* |
||||
54 | |-------------------------------------------------------------------------- |
||||
55 | | Starting the Caching Engine |
||||
56 | |-------------------------------------------------------------------------- |
||||
57 | | |
||||
58 | | This is our favourite part. Minimize the resource usage, maximize our |
||||
59 | | capabilities. |
||||
60 | | |
||||
61 | */ |
||||
62 | $app->link('cachemanager', Cache::init()); |
||||
63 | |||||
64 | /* |
||||
65 | |-------------------------------------------------------------------------- |
||||
66 | | Load Services |
||||
67 | |-------------------------------------------------------------------------- |
||||
68 | | |
||||
69 | | This is where all of your applications in /app/Service are loaded. |
||||
70 | | |
||||
71 | */ |
||||
72 | $service = Service::loadServices(); |
||||
73 | /* |
||||
74 | |-------------------------------------------------------------------------- |
||||
75 | | Share the Singleton $app and $service |
||||
76 | |-------------------------------------------------------------------------- |
||||
77 | | |
||||
78 | | Eliminate complexity, get the job done. Our Dependency Injection (DI) is |
||||
79 | | here! |
||||
80 | | |
||||
81 | */ |
||||
82 | Sharer::share('app', $app); |
||||
0 ignored issues
–
show
The type
Sharer 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||
83 | Sharer::share('service', $service); |
||||
84 | |||||
85 | /* |
||||
86 | |-------------------------------------------------------------------------- |
||||
87 | | Dispatch the Router |
||||
88 | |-------------------------------------------------------------------------- |
||||
89 | | |
||||
90 | | Ta Da! We can see something now! |
||||
91 | | |
||||
92 | */ |
||||
93 | |||||
94 | Router::start(); |
||||
0 ignored issues
–
show
The type
Router 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||
95 | Router::dispatch(); |
||||
96 | |||||
97 | /* |
||||
98 | |-------------------------------------------------------------------------- |
||||
99 | | Display the Execution Time |
||||
100 | |-------------------------------------------------------------------------- |
||||
101 | | |
||||
102 | | Show the time taken to complete execution up till this far. (See the file |
||||
103 | | config/env.php) |
||||
104 | | |
||||
105 | */ |
||||
106 | if (getenv('SHOW_EXECUTION_TIME')) { |
||||
107 | Debugger::exec_time(); |
||||
0 ignored issues
–
show
The type
Debugger 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||
108 | } |
||||
109 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths