Skip to content
Snippets Groups Projects

Remove duplicate php requirement check

Merged Patrick Kenny requested to merge issue/sodium-3477511:php_requirement into 3.0.x
1 file
+ 2
10
Compare changes
  • Side-by-side
  • Inline
+ 2
10
@@ -10,18 +10,10 @@
*
* Verifies that module requirements are met.
*/
function sodium_requirements($phase) {
function sodium_requirements(string $phase): array {
$requirements = [];
if ($phase == 'install') {
// Verify that the PHP version is at least 7.2.
if (PHP_VERSION_ID < 70200) {
$requirements['php_version'] = [
'description' => t('Sodium requires PHP version 7.2 or greater.'),
'severity' => REQUIREMENT_ERROR,
];
}
if ($phase === 'install') {
// Verify that the Halite PHP library is available.
if (!class_exists('\ParagonIE\Halite\Halite')) {
$requirements['halite_library'] = [
Loading