From 4cb169dcb0436039dfd7f18553fe0735c69cd879 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Sun, 2 Feb 2020 11:54:07 +0100
Subject: [PATCH] Fix Codesniffer

---
 bin/importPdoMetadata.php                         | 1 +
 config-templates/config.php                       | 4 ++--
 lib/SimpleSAML/Metadata/Signer.php                | 7 +++++--
 lib/SimpleSAML/Module.php                         | 5 ++++-
 lib/_autoload.php                                 | 4 ++--
 modules/cron/config-templates/module_cron.php     | 1 +
 modules/portal/config-templates/module_portal.php | 1 +
 7 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/bin/importPdoMetadata.php b/bin/importPdoMetadata.php
index 3dbd6cf8c..cbe270391 100755
--- a/bin/importPdoMetadata.php
+++ b/bin/importPdoMetadata.php
@@ -1,5 +1,6 @@
 #!/usr/bin/env php
 <?php
+
 $baseDir = dirname(dirname(__FILE__));
 
 require_once $baseDir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . '_autoload.php';
diff --git a/config-templates/config.php b/config-templates/config.php
index 1fba255f5..518afca44 100644
--- a/config-templates/config.php
+++ b/config-templates/config.php
@@ -1,7 +1,7 @@
 <?php
-/*
+
+/**
  * The configuration of SimpleSAMLphp
- *
  */
 
 $config = [
diff --git a/lib/SimpleSAML/Metadata/Signer.php b/lib/SimpleSAML/Metadata/Signer.php
index eec221bc8..b0441fbc4 100644
--- a/lib/SimpleSAML/Metadata/Signer.php
+++ b/lib/SimpleSAML/Metadata/Signer.php
@@ -168,8 +168,11 @@ class Signer
      *
      * @throws \SimpleSAML\Error\CriticalConfigurationError
      */
-    private static function getMetadataSigningAlgorithm(Configuration $config, array $entityMetadata, string $type): array
-    {
+    private static function getMetadataSigningAlgorithm(
+        Configuration $config,
+        array $entityMetadata,
+        string $type
+    ): array {
         // configure the algorithm to use
         if (array_key_exists('metadata.sign.algorithm', $entityMetadata)) {
             if (!is_string($entityMetadata['metadata.sign.algorithm'])) {
diff --git a/lib/SimpleSAML/Module.php b/lib/SimpleSAML/Module.php
index 2072fb0cf..696f8cfd5 100644
--- a/lib/SimpleSAML/Module.php
+++ b/lib/SimpleSAML/Module.php
@@ -542,7 +542,10 @@ class Module
                 self::$module_info[$module]['hooks'] = self::getModuleHooks($module);
             }
 
-            if (!isset(self::$module_info[$module]['hooks'][$hook]) || !empty(self::$module_info[$module]['hooks'][$hook])) {
+            if (
+                !isset(self::$module_info[$module]['hooks'][$hook])
+                || !empty(self::$module_info[$module]['hooks'][$hook])
+            ) {
                 continue;
             }
 
diff --git a/lib/_autoload.php b/lib/_autoload.php
index 6cc5a2c30..99773aae2 100644
--- a/lib/_autoload.php
+++ b/lib/_autoload.php
@@ -1,7 +1,5 @@
 <?php
 
-declare(strict_types=1);
-
 /**
  * This file is a backwards compatible autoloader for SimpleSAMLphp.
  * Loads the Composer autoloader.
@@ -10,6 +8,8 @@ declare(strict_types=1);
  * @package SimpleSAMLphp
  */
 
+declare(strict_types=1);
+
 // SSP is loaded as a separate project
 if (file_exists(dirname(dirname(__FILE__)) . '/vendor/autoload.php')) {
     require_once dirname(dirname(__FILE__)) . '/vendor/autoload.php';
diff --git a/modules/cron/config-templates/module_cron.php b/modules/cron/config-templates/module_cron.php
index 29a35d9e9..7b57ede96 100644
--- a/modules/cron/config-templates/module_cron.php
+++ b/modules/cron/config-templates/module_cron.php
@@ -1,4 +1,5 @@
 <?php
+
 /*
  * Configuration for the Cron module.
  */
diff --git a/modules/portal/config-templates/module_portal.php b/modules/portal/config-templates/module_portal.php
index 85df6f99a..c934bf77b 100644
--- a/modules/portal/config-templates/module_portal.php
+++ b/modules/portal/config-templates/module_portal.php
@@ -1,4 +1,5 @@
 <?php
+
 /*
  * Configuration for the module portal.
  */
-- 
GitLab