From 8bd019b2aa9f6979aa251945007273dfdb7622cf Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 3 Jul 2018 11:37:38 +1200 Subject: [PATCH] Update codebase to ensure relative PSR-2 compliance --- phpcs.xml.dist | 3 +-- src/Extension/FileTextExtractable.php | 4 ++-- src/Extractor/HTMLTextExtractor.php | 5 +++-- src/Extractor/PDFTextExtractor.php | 1 - src/Extractor/SolrCellTextExtractor.php | 3 ++- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index a2a2e85..a504558 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -5,7 +5,6 @@ - - + diff --git a/src/Extension/FileTextExtractable.php b/src/Extension/FileTextExtractable.php index 8347486..b5f7896 100644 --- a/src/Extension/FileTextExtractable.php +++ b/src/Extension/FileTextExtractable.php @@ -80,8 +80,8 @@ class FileTextExtractable extends DataExtension } /** - * Tries to parse the file contents if a FileTextExtractor class exists to handle the file type, and returns the text. - * The value is also cached into the File record itself. + * Tries to parse the file contents if a FileTextExtractor class exists to handle the file type, and + * returns the text. The value is also cached into the File record itself. * * @param boolean $disableCache If false, the file content is only parsed on demand. * If true, the content parsing is forced, bypassing diff --git a/src/Extractor/HTMLTextExtractor.php b/src/Extractor/HTMLTextExtractor.php index df05917..78c8440 100644 --- a/src/Extractor/HTMLTextExtractor.php +++ b/src/Extractor/HTMLTextExtractor.php @@ -3,7 +3,9 @@ namespace SilverStripe\TextExtraction\Extractor; /** - * Text extractor that uses php function strip_tags to get just the text. OK for indexing, not the best for readable text. + * Text extractor that uses php function strip_tags to get just the text. OK for indexing, not + * the best for readable text. + * * @author mstephens */ class HTMLTextExtractor extends FileTextExtractor @@ -82,5 +84,4 @@ class HTMLTextExtractor extends FileTextExtractor return strip_tags($content); } - } diff --git a/src/Extractor/PDFTextExtractor.php b/src/Extractor/PDFTextExtractor.php index fb2d793..b927900 100644 --- a/src/Extractor/PDFTextExtractor.php +++ b/src/Extractor/PDFTextExtractor.php @@ -144,5 +144,4 @@ class PDFTextExtractor extends FileTextExtractor return str_replace(array_keys($mapping), array_values($mapping), $input); } - } diff --git a/src/Extractor/SolrCellTextExtractor.php b/src/Extractor/SolrCellTextExtractor.php index 0e26b74..a19282f 100644 --- a/src/Extractor/SolrCellTextExtractor.php +++ b/src/Extractor/SolrCellTextExtractor.php @@ -134,7 +134,8 @@ class SolrCellTextExtractor extends FileTextExtractor return null; } catch (Exception $e) { - // Catch other errors that Tika can throw vai Guzzle but are not caught and break Solr search query in some cases. + // Catch other errors that Tika can throw vai Guzzle but are not caught and break Solr search + // query in some cases. $msg = sprintf( 'Tika server error attempting to extract from "%s" (message: %s)', $path,