for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Riclep\StoryblokForms\Traits;
use Riclep\StoryblokForms\Blocks\LsfConditionalSelect;
use Riclep\StoryblokForms\Blocks\LsfFieldset;
use Riclep\StoryblokForms\Blocks\LsfRepeatingFieldset;
trait InFieldset
{
/**
* This field is in a fieldset
*
* @var bool
*/
protected $inFieldSet = false;
* This field is in a repeating fieldset
protected $isRepeating = false;
protected function initInFieldset(): void
if ($this->parent() instanceof LsfFieldset || $this->parent() instanceof LsfConditionalSelect) {
parent()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
if ($this->/** @scrutinizer ignore-call */ parent() instanceof LsfFieldset || $this->parent() instanceof LsfConditionalSelect) {
$this->inFieldSet = true;
}
if ($this->parent() instanceof LsfRepeatingFieldset) {
$this->isRepeating = true;