- Corrected code-smell and code style issues in src/installer/hash_check.php
This commit is contained in:
parent
8e44a8c7c9
commit
983e34f58e
2 changed files with 4 additions and 2 deletions
|
@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Updated class type to "final class" in `\ncc\Enums > Runners`
|
- Updated class type to "final class" in `\ncc\Enums > Runners`
|
||||||
- Updated class type to "final class" in `\ncc\Enums > Scopes`
|
- Updated class type to "final class" in `\ncc\Enums > Scopes`
|
||||||
- Updated class type to "final class" in `\ncc\Enums > Versions`
|
- Updated class type to "final class" in `\ncc\Enums > Versions`
|
||||||
|
- Corrected code-smell and code style issues in `src/installer/hash_check.php`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
print('Could not find \'autoload.php\', this script is intended to be executed during the redistribution process');
|
print('Could not find \'autoload.php\', this script is intended to be executed during the redistribution process');
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
require(__DIR__ . DIRECTORY_SEPARATOR . 'autoload.php');
|
require(__DIR__ . DIRECTORY_SEPARATOR . 'autoload.php');
|
||||||
|
|
||||||
// Start script
|
// Start script
|
||||||
|
@ -20,7 +21,7 @@
|
||||||
{
|
{
|
||||||
$results[] = str_ireplace(__DIR__ . DIRECTORY_SEPARATOR, (string)null, $path);
|
$results[] = str_ireplace(__DIR__ . DIRECTORY_SEPARATOR, (string)null, $path);
|
||||||
}
|
}
|
||||||
else if ($value != '.' && $value != '..')
|
else if ($value !== '.' && $value !== '..')
|
||||||
{
|
{
|
||||||
scanContents($path, $results);
|
scanContents($path, $results);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +43,7 @@
|
||||||
foreach(scanContents(__DIR__) as $file)
|
foreach(scanContents(__DIR__) as $file)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!in_array($file, $excluded_files))
|
if(!in_array($file, $excluded_files, true))
|
||||||
{
|
{
|
||||||
$hash_values[$file] = hash_file('sha256', __DIR__ . DIRECTORY_SEPARATOR . $file);
|
$hash_values[$file] = hash_file('sha256', __DIR__ . DIRECTORY_SEPARATOR . $file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue