1414
1515namespace Humbug \PhpScoper ;
1616
17+ use function array_key_exists ;
1718use Closure ;
1819use InvalidArgumentException ;
1920use Iterator ;
@@ -140,11 +141,10 @@ public static function load(string $path = null, array $paths = []): self
140141 /**
141142 * @param string|null $path Absolute path to the configuration file loaded.
142143 * @param string|null $prefix The prefix applied.
143- * @param [ string, string ][] $filesWithContents Array of tuple with the first argument being the file path and the second its contents
144+ * @param string[ ][] $filesWithContents Array of tuple with the first argument being the file path and the second its contents
144145 * @param callable[] $patchers List of closures which can alter the content of the files being
145146 * scoped.
146147 * @param Whitelist $whitelist List of classes that will not be scoped.
147- * @param Closure $globalNamespaceWhitelisters Closure taking a class name from the global namespace as an argument and
148148 * returning a boolean which if `true` means the class should be scoped
149149 * (i.e. is ignored) or scoped otherwise.
150150 * @param string[] $whitelistedFiles List of absolute paths of files to completely ignore
@@ -238,7 +238,7 @@ public function getWhitelistedFiles(): array
238238 private static function validateConfigKeys (array $ config ): void
239239 {
240240 array_map (
241- [ ' self ' , ' validateConfigKey '] ,
241+ self ::class. ' :: validateConfigKey ' ,
242242 array_keys ($ config )
243243 );
244244 }
@@ -263,7 +263,7 @@ private static function validateConfigKey(string $key): void
263263 */
264264 private static function retrievePrefix (array $ config ): ?string
265265 {
266- $ prefix = array_key_exists ( self :: PREFIX_KEYWORD , $ config) ? $ config [self ::PREFIX_KEYWORD ] : null ;
266+ $ prefix = $ config [self ::PREFIX_KEYWORD ] ?? null ;
267267
268268 if (null === $ prefix ) {
269269 return null ;
@@ -515,7 +515,7 @@ private static function retrieveFilesFromPaths(array $paths): iterable
515515 /**
516516 * @param Iterator $files
517517 *
518- * @return [ string, string ][] Array of tuple with the first argument being the file path and the second its contents
518+ * @return string[ ][] Array of tuple with the first argument being the file path and the second its contents
519519 */
520520 private static function retrieveFilesWithContents (Iterator $ files ): array
521521 {
0 commit comments