Code Duplication    Length = 6-6 lines in 2 locations

src/Charcoal/Property/FileProperty.php 2 locations

@@ 881-886 (lines=6) @@
878
        }
879
880
        $size = strlen($contents);
881
        if (!$this->isAcceptedFilesize($size)) {
882
            throw new Exception(sprintf(
883
                'Maximum file size exceeded [%s]',
884
                $this->formatFilesize($this['maxFilesize'])
885
            ));
886
        }
887
888
        if ($filename === null) {
889
            $extension = $this->generateExtensionFromMimeType($mime);
@@ 958-963 (lines=6) @@
955
        }
956
957
        $size = filesize($file['tmp_name']);
958
        if (!$this->isAcceptedFilesize($size)) {
959
            throw new Exception(sprintf(
960
                'Maximum file size exceeded [%s]',
961
                $this->formatFilesize($this['maxFilesize'])
962
            ));
963
        }
964
965
        $targetPath = $this->uploadTarget($file['name']);
966