Update codebase to ensure relative PSR-2 compliance

This commit is contained in:
Robbie Averill 2018-07-03 11:37:38 +12:00
parent e2404fc904
commit 8bd019b2aa
5 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,6 @@
<!-- base rules are PSR-2 --> <!-- base rules are PSR-2 -->
<rule ref="PSR2" > <rule ref="PSR2" >
<!-- Current exclusions --> <!-- Current exclusions -->
<!--<exclude name="PSR1.Methods.CamelCapsMethodName" />--> <exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
<!--<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />-->
</rule> </rule>
</ruleset> </ruleset>

View File

@ -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. * Tries to parse the file contents if a FileTextExtractor class exists to handle the file type, and
* The value is also cached into the File record itself. * 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. * @param boolean $disableCache If false, the file content is only parsed on demand.
* If true, the content parsing is forced, bypassing * If true, the content parsing is forced, bypassing

View File

@ -3,7 +3,9 @@
namespace SilverStripe\TextExtraction\Extractor; 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 * @author mstephens
*/ */
class HTMLTextExtractor extends FileTextExtractor class HTMLTextExtractor extends FileTextExtractor
@ -82,5 +84,4 @@ class HTMLTextExtractor extends FileTextExtractor
return strip_tags($content); return strip_tags($content);
} }
} }

View File

@ -144,5 +144,4 @@ class PDFTextExtractor extends FileTextExtractor
return str_replace(array_keys($mapping), array_values($mapping), $input); return str_replace(array_keys($mapping), array_values($mapping), $input);
} }
} }

View File

@ -134,7 +134,8 @@ class SolrCellTextExtractor extends FileTextExtractor
return null; return null;
} catch (Exception $e) { } 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( $msg = sprintf(
'Tika server error attempting to extract from "%s" (message: %s)', 'Tika server error attempting to extract from "%s" (message: %s)',
$path, $path,