Code Duplication    Length = 18-18 lines in 2 locations

src/PBurggraf/BinaryUtilities/DataType/FloatingPoint.php 1 location

@@ 93-110 (lines=18) @@
90
     *
91
     * @throws EndOfFileReachedException
92
     */
93
    public function write($data): void
94
    {
95
        $bytes = $this->splitBytes($data);
96
97
        $bytes = $this->endianMode->applyEndianess($bytes);
98
99
        $this->assertNotEndOfFile();
100
        $this->setByte($this->offset++, $bytes[0]);
101
102
        $this->assertNotEndOfFile();
103
        $this->setByte($this->offset++, $bytes[1]);
104
105
        $this->assertNotEndOfFile();
106
        $this->setByte($this->offset++, $bytes[2]);
107
108
        $this->assertNotEndOfFile();
109
        $this->setByte($this->offset++, $bytes[3]);
110
    }
111
112
    /**
113
     * @param array $data

src/PBurggraf/BinaryUtilities/DataType/Integer.php 1 location

@@ 85-102 (lines=18) @@
82
     *
83
     * @throws EndOfFileReachedException
84
     */
85
    public function write(int $data): void
86
    {
87
        $bytes = $this->splitBytes($data);
88
89
        $bytes = $this->endianMode->applyEndianess($bytes);
90
91
        $this->assertNotEndOfFile();
92
        $this->setByte($this->offset++, $bytes[0]);
93
94
        $this->assertNotEndOfFile();
95
        $this->setByte($this->offset++, $bytes[1]);
96
97
        $this->assertNotEndOfFile();
98
        $this->setByte($this->offset++, $bytes[2]);
99
100
        $this->assertNotEndOfFile();
101
        $this->setByte($this->offset++, $bytes[3]);
102
    }
103
104
    /**
105
     * @param array $data