mirror of
https://github.com/silverstripe/silverstripe-textextraction
synced 2024-10-22 11:06:00 +02:00
Update codebase to ensure relative PSR-2 compliance
This commit is contained in:
parent
e2404fc904
commit
8bd019b2aa
@ -5,7 +5,6 @@
|
||||
<!-- base rules are PSR-2 -->
|
||||
<rule ref="PSR2" >
|
||||
<!-- Current exclusions -->
|
||||
<!--<exclude name="PSR1.Methods.CamelCapsMethodName" />-->
|
||||
<!--<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />-->
|
||||
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
|
||||
</rule>
|
||||
</ruleset>
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -144,5 +144,4 @@ class PDFTextExtractor extends FileTextExtractor
|
||||
|
||||
return str_replace(array_keys($mapping), array_values($mapping), $input);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user