3
3
4
4
use PHP_Parallel_Lint \PhpParallelLint \Contracts \SyntaxErrorCallback ;
5
5
use PHP_Parallel_Lint \PhpParallelLint \Errors \SyntaxError ;
6
- use PHP_Parallel_Lint \PhpParallelLint \Exceptions \NotExistsClassException ;
7
- use PHP_Parallel_Lint \PhpParallelLint \Exceptions \NotExistsPathException ;
8
- use PHP_Parallel_Lint \PhpParallelLint \Exceptions \NotImplementCallbackException ;
6
+ use PHP_Parallel_Lint \PhpParallelLint \Exceptions \ClassNotFoundException ;
7
+ use PHP_Parallel_Lint \PhpParallelLint \Exceptions \PathNotFoundException ;
8
+ use PHP_Parallel_Lint \PhpParallelLint \Exceptions \CallbackNotImplementedException ;
9
9
use PHP_Parallel_Lint \PhpParallelLint \Exceptions \ParallelLintException ;
10
10
use PHP_Parallel_Lint \PhpParallelLint \Iterators \RecursiveDirectoryFilterIterator ;
11
11
use PHP_Parallel_Lint \PhpParallelLint \Outputs \CheckstyleOutput ;
@@ -146,7 +146,7 @@ protected function gitBlame(Result $result, Settings $settings)
146
146
* @param array $extensions
147
147
* @param array $excluded
148
148
* @return array
149
- * @throws NotExistsPathException
149
+ * @throws PathNotFoundException
150
150
*/
151
151
protected function getFilesFromPaths (array $ paths , array $ extensions , array $ excluded = array ())
152
152
{
@@ -175,7 +175,7 @@ protected function getFilesFromPaths(array $paths, array $extensions, array $exc
175
175
$ files [] = (string ) $ directoryFile ;
176
176
}
177
177
} else {
178
- throw new NotExistsPathException ($ path );
178
+ throw new PathNotFoundException ($ path );
179
179
}
180
180
}
181
181
@@ -192,20 +192,20 @@ protected function createSyntaxErrorCallback(Settings $settings)
192
192
193
193
$ fullFilePath = realpath ($ settings ->syntaxErrorCallbackFile );
194
194
if ($ fullFilePath === false ) {
195
- throw new NotExistsPathException ($ settings ->syntaxErrorCallbackFile );
195
+ throw new PathNotFoundException ($ settings ->syntaxErrorCallbackFile );
196
196
}
197
197
198
198
require_once $ fullFilePath ;
199
199
200
200
$ expectedClassName = basename ($ fullFilePath , '.php ' );
201
201
if (!class_exists ($ expectedClassName )) {
202
- throw new NotExistsClassException ($ expectedClassName , $ settings ->syntaxErrorCallbackFile );
202
+ throw new ClassNotFoundException ($ expectedClassName , $ settings ->syntaxErrorCallbackFile );
203
203
}
204
204
205
205
$ callbackInstance = new $ expectedClassName ;
206
206
207
207
if (!($ callbackInstance instanceof SyntaxErrorCallback)) {
208
- throw new NotImplementCallbackException ($ expectedClassName );
208
+ throw new CallbackNotImplementedException ($ expectedClassName );
209
209
}
210
210
211
211
return $ callbackInstance ;
0 commit comments