From 4dd4f1ca3319bcc9b96dc64ad7d315fd5262fdd5 Mon Sep 17 00:00:00 2001 From: seyfer Date: Tue, 14 Mar 2017 19:42:17 +0700 Subject: [PATCH 1/4] add gitignore and composer.lock MUST be under git --- .gitignore | 3 +++ composer.lock | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 .gitignore create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e22063f --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Created by .ignore support plugin (hsz.mobi) +.idea/ +vendor/ diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..fba8b32 --- /dev/null +++ b/composer.lock @@ -0,0 +1,19 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "1abec36d4e896f3de67ced57d4be35c9", + "packages": [], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.4.0" + }, + "platform-dev": [] +} From 2d9da661e825dec3ba600eb5973db6225f448c3e Mon Sep 17 00:00:00 2001 From: seyfer Date: Tue, 14 Mar 2017 19:43:16 +0700 Subject: [PATCH 2/4] fix fromatting to PSR --- src/FlashMessages.php | 289 +++++++++++++++++++++--------------------- 1 file changed, 148 insertions(+), 141 deletions(-) diff --git a/src/FlashMessages.php b/src/FlashMessages.php index 140b3bb..d1a75db 100644 --- a/src/FlashMessages.php +++ b/src/FlashMessages.php @@ -1,14 +1,15 @@ 'error', - self::WARNING => 'warning', - self::SUCCESS => 'success', - self::INFO => 'info', + self::WARNING => 'warning', + self::SUCCESS => 'success', + self::INFO => 'info', ]; - + // Each message gets wrapped in this - protected $msgWrapper = "
%s
\n"; - + protected $msgWrapper = "
%s
\n"; + // Prepend and append to each message (inside of the wrapper) - protected $msgBefore = ''; - protected $msgAfter = ''; - + protected $msgBefore = ''; + protected $msgAfter = ''; + // HTML for the close button - protected $closeBtn = '