@@ -65,12 +65,12 @@ public static function identify(\SplFileInfo $file): string|null
6565 return null ;
6666 }
6767
68- protected function inDir (string $ dir )
68+ protected function inDir (string $ dir ): bool
6969 {
7070 return Str::contains ($ this ->file ->getPath (), $ dir );
7171 }
7272
73- protected function inheritsFrom (string $ parent )
73+ protected function inheritsFrom (string $ parent ): bool
7474 {
7575 $ reflectionClass = $ this ->class ;
7676
@@ -85,7 +85,7 @@ protected function inheritsFrom(string $parent)
8585 return false ;
8686 }
8787
88- protected function uses (string $ trait )
88+ protected function uses (string $ trait ): bool
8989 {
9090 $ reflectionClass = $ this ->class ;
9191
@@ -100,72 +100,72 @@ protected function uses(string $trait)
100100 return false ;
101101 }
102102
103- public function isCommand ()
103+ public function isCommand (): bool
104104 {
105105 return $ this ->inheritsFrom (\Illuminate \Console \Command::class);
106106 }
107107
108- public function isController ()
108+ public function isController (): bool
109109 {
110110 return $ this ->inheritsFrom (\Illuminate \Routing \Controller::class);
111111 }
112112
113- public function isEvent ()
113+ public function isEvent (): bool
114114 {
115115 return $ this ->inDir ('Events ' ) && $ this ->uses (\Illuminate \Foundation \Events \Dispatchable::class);
116116 }
117117
118- public function isException ()
118+ public function isException (): bool
119119 {
120120 return $ this ->inheritsFrom (\Exception::class);
121121 }
122122
123- public function isFactory ()
123+ public function isFactory (): bool
124124 {
125125 return $ this ->inheritsFrom (\Illuminate \Database \Eloquent \Factories \Factory::class);
126126 }
127127
128- public function isFormRequest ()
128+ public function isFormRequest (): bool
129129 {
130130 return $ this ->inheritsFrom (\Illuminate \Foundation \Http \FormRequest::class);
131131 }
132132
133- public function isJob ()
133+ public function isJob (): bool
134134 {
135135 return $ this ->inDir ('Jobs ' ) && $ this ->class ->hasMethod ('handle ' );
136136 }
137137
138- public function isListener ()
138+ public function isListener (): bool
139139 {
140140 return $ this ->inDir ('Listeners ' ) && $ this ->class ->hasMethod ('handle ' );
141141 }
142142
143- public function isMailable ()
143+ public function isMailable (): bool
144144 {
145145 return $ this ->inheritsFrom (\Illuminate \Mail \Mailable::class);
146146 }
147147
148- public function isMiddleware ()
148+ public function isMiddleware (): bool
149149 {
150150 return $ this ->inDir ('Middleware ' ) && $ this ->class ->hasMethod ('handle ' );
151151 }
152152
153- public function isModel ()
153+ public function isModel (): bool
154154 {
155155 return $ this ->inheritsFrom (\Illuminate \Database \Eloquent \Model::class);
156156 }
157157
158- public function isNotification ()
158+ public function isNotification (): bool
159159 {
160160 return $ this ->inheritsFrom (\Illuminate \Notifications \Notification::class);
161161 }
162162
163- public function isProvider ()
163+ public function isProvider (): bool
164164 {
165165 return $ this ->inheritsFrom (\Illuminate \Support \ServiceProvider::class);
166166 }
167167
168- public function isResource ()
168+ public function isResource (): bool
169169 {
170170 return $ this ->inheritsFrom (\Illuminate \Http \Resources \Json \JsonResource::class);
171171 }
0 commit comments