From e7aa5dec5899888f91701e27067efe2ca26ef54e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr>
Date: Tue, 28 Nov 2017 15:31:33 +0100
Subject: [PATCH] =?UTF-8?q?Extrait=20la=20fonction=20"irstea=5Fplantmul=5F?=
 =?UTF-8?q?include"=20dans=20un=20fichier=20s=C3=A9par=C3=A9.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 composer.json              |  3 ++-
 src/Finder/ClassFinder.php |  5 -----
 src/functions.php          | 14 ++++++++++++++
 3 files changed, 16 insertions(+), 6 deletions(-)
 create mode 100644 src/functions.php

diff --git a/composer.json b/composer.json
index 86b5d2d..5aab6c9 100644
--- a/composer.json
+++ b/composer.json
@@ -15,7 +15,8 @@
         "source": "https://gitlab.irstea.fr/pole-is/bundles/plantuml-bundle/tree/master"
     },
     "autoload": {
-        "psr-4": { "Irstea\\PlantUmlBundle\\": "src/" }
+        "psr-4": { "Irstea\\PlantUmlBundle\\": "src/" },
+        "files": ["src/functions.php"]
     },
     "minimum-stability": "stable",
     "autoload-dev": {
diff --git a/src/Finder/ClassFinder.php b/src/Finder/ClassFinder.php
index 11fc155..9c5c3f8 100644
--- a/src/Finder/ClassFinder.php
+++ b/src/Finder/ClassFinder.php
@@ -76,8 +76,3 @@ class ClassFinder implements FinderInterface
         $conf['directories'] = $this->directories;
     }
 }
-
-function irstea_plantmul_include($filepath)
-{
-    @include_once $filepath;
-}
diff --git a/src/functions.php b/src/functions.php
new file mode 100644
index 0000000..d33e3c1
--- /dev/null
+++ b/src/functions.php
@@ -0,0 +1,14 @@
+<?php declare(strict_types=1);
+/*
+ * Copyright (C) 2016-2017 IRSTEA
+ * All rights reserved.
+ */
+
+/**
+ * @param string $filepath
+ */
+function irstea_plantmul_include($filepath)
+{
+    /* @noinspection UsingInclusionOnceReturnValueInspection */
+    @include_once $filepath;
+}
-- 
GitLab