From 7547b333a4efda518ca9d5648c4546b27b056ae2 Mon Sep 17 00:00:00 2001 From: dannylamb Date: Wed, 8 Jan 2020 16:50:13 -0400 Subject: [PATCH 1/3] Add copyright notice --- COPYRIGHT | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 COPYRIGHT diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..b6f565d --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,15 @@ +Copyright (C) 2015 The Islandora Foundation and contributors + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with this program as the file LICENSE.txt; if not, please see +http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. From 43da40aef02d4e4dadea504649302152428cface Mon Sep 17 00:00:00 2001 From: dannylamb Date: Thu, 9 Jan 2020 15:32:02 +0000 Subject: [PATCH 2/3] Coding standards --- src/Plugin/Field/FieldFormatter/EDTFFormatter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugin/Field/FieldFormatter/EDTFFormatter.php b/src/Plugin/Field/FieldFormatter/EDTFFormatter.php index 19f7f45..a49474b 100644 --- a/src/Plugin/Field/FieldFormatter/EDTFFormatter.php +++ b/src/Plugin/Field/FieldFormatter/EDTFFormatter.php @@ -27,7 +27,7 @@ class EDTFFormatter extends FormatterBase { * * @var array */ - private $DELIMITERS = [ + private const $DELIMITERS = [ 'dash' => '-', 'stroke' => '/', 'period' => '.', @@ -276,7 +276,7 @@ protected function formatDate($edtf_text) { $formatted_date = "$month $day, $year"; } else { - $formatted_date = implode($this->DELIMITERS[$settings['date_separator']], array_filter($parts_in_order)); + $formatted_date = implode(self::DELIMITERS[$settings['date_separator']], array_filter($parts_in_order)); } // Time. From f6b1e7769dd88bc7b55d8d906f6431edb5d1647e Mon Sep 17 00:00:00 2001 From: dannylamb Date: Fri, 10 Jan 2020 13:56:51 -0400 Subject: [PATCH 3/3] Update EDTFFormatter.php --- src/Plugin/Field/FieldFormatter/EDTFFormatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plugin/Field/FieldFormatter/EDTFFormatter.php b/src/Plugin/Field/FieldFormatter/EDTFFormatter.php index a49474b..31aacd5 100644 --- a/src/Plugin/Field/FieldFormatter/EDTFFormatter.php +++ b/src/Plugin/Field/FieldFormatter/EDTFFormatter.php @@ -27,7 +27,7 @@ class EDTFFormatter extends FormatterBase { * * @var array */ - private const $DELIMITERS = [ + private const DELIMITERS = [ 'dash' => '-', 'stroke' => '/', 'period' => '.',