Code Duplication    Length = 4-4 lines in 2 locations

src/Components/Notifier.php 2 locations

@@ 160-163 (lines=4) @@
157
        // Add auth data if available.
158
        if(isset($app['auth']) && $user = $app['auth']->user())
159
        {
160
            if(empty($context['user']) or !is_array($context['user']))
161
            {
162
                $context['user'] = [];
163
            }
164
165
            if(!isset($context['user']['id']) && method_exists($user, 'getAuthIdentifier'))
166
            {
@@ 184-187 (lines=4) @@
181
        // Add session data if available.
182
        if(isset($app['session']) && $session = $app['session']->all())
183
        {
184
            if(empty($context['user']) or !is_array($context['user']))
185
            {
186
                $context['user'] = [];
187
            }
188
189
            if(!isset($context['user']['id']))
190
            {