Code Duplication    Length = 11-12 lines in 2 locations

Core/Repository/SearchService.php 2 locations

@@ 550-561 (lines=12) @@
547
                            ]
548
                        );
549
                    } catch (NotFoundException $e) {
550
                        if ($this->logger) {
551
                            // Solr sometimes gets out of sync... make sure users don't see exceptions here
552
                            $message = sprintf(
553
                                "Can not access content corresponding to solr record with Content Id: %s, Main Location Id: %s\n%s\n%s",
554
                                $result['id'],
555
                                $result['main_node_id'],
556
                                $e->getMessage(),
557
                                $e->getTraceAsString()
558
                            );
559
560
                            $this->logger->warning($message);
561
                        }
562
                        unset($searchResults[$index]);
563
                    } catch (UnauthorizedException $e) {
564
                        /// @todo verify when/if this can happen...
@@ 565-575 (lines=11) @@
562
                        unset($searchResults[$index]);
563
                    } catch (UnauthorizedException $e) {
564
                        /// @todo verify when/if this can happen...
565
                        if ($this->logger) {
566
                            $message = sprintf(
567
                                "Can not access content corresponding to solr record with Content Id: %s, Main Location Id: %s\n%s\n%s",
568
                                $result['id'],
569
                                $result['main_node_id'],
570
                                $e->getMessage(),
571
                                $e->getTraceAsString()
572
                            );
573
574
                            $this->logger->warning($message);
575
                        }
576
                        unset($searchResults[$index]);
577
                    }
578
                    break;