for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Firesphere\SolrSearch\Compat;
use Firesphere\SolrSearch\Indexes\BaseIndex;
use SilverStripe\Core\Extension;
use TractorCow\Fluent\Extension\FluentChangesExtension;
use TractorCow\Fluent\Model\Locale;
if (!class_exists('TractorCow\\Fluent\\Model\\Locale')) {
return;
}
/**
* Class FluentExtension
*
* @package Firesphere\SolrSearch\Compat
* @property FluentExtension $owner
*/
class FluentExtension extends Extension
{
* Add the needed language copy fields to Solr
public function onAfterInit()
$locales = Locale::get()->exclude(['IsGlobalDefault' => true]);
/** @var BaseIndex $owner */
$owner = $this->owner;
$copyFields = $owner->getCopyFields();
/** @var Locale $locale */
foreach ($locales as $locale) {
foreach ($copyFields as $copyField => $values) {
$owner->addCopyField($locale->Locale . $copyField, $values);
* @param $foundData
public function getModifiedData($foundData)
$foundData
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function getModifiedData(/** @scrutinizer ignore-unused */ $foundData)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
// @todo check modify the found data with the specifics for each language
// Should return a set. Or maybe a simple array? If it's there, we can filter
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.