Code Duplication    Length = 3-3 lines in 3 locations

src/Simple.php 3 locations

@@ 632-634 (lines=3) @@
629
        $status = $this->getRegistryProcessor()->getAttribute($serial = $this->getSerial());
630
631
        // query whether or not the configured source directory is available
632
        if (!is_dir($sourceDir = $status[RegistryKeys::SOURCE_DIRECTORY])) {
633
            throw new \Exception(sprintf('Configured source directory %s is not available!', $sourceDir));
634
        }
635
636
        // load the subjects
637
        $subjects = $this->getConfiguration()->getSubjects();
@@ 746-748 (lines=3) @@
743
        $status = $this->getRegistryProcessor()->getAttribute($serial = $this->getSerial());
744
745
        // query whether or not the configured source directory is available
746
        if (!is_dir($sourceDir = $status[RegistryKeys::SOURCE_DIRECTORY])) {
747
            throw new \Exception(sprintf('Source directory %s for subject %s is not available!', $sourceDir, $subject->getClassName()));
748
        }
749
750
        // initialize the array with the CSV files found in the source directory
751
        $files = glob(sprintf('%s/*.csv', $sourceDir));
@@ 1011-1013 (lines=3) @@
1008
        $status = $this->getRegistryProcessor()->getAttribute($this->getSerial());
1009
1010
        // query whether or not the configured source directory is available
1011
        if (!is_dir($sourceDir = $status[RegistryKeys::SOURCE_DIRECTORY])) {
1012
            throw new \Exception(sprintf('Configured source directory %s is not available!', $sourceDir));
1013
        }
1014
1015
        // init file iterator on source directory
1016
        $fileIterator = new \FilesystemIterator($sourceDir);