Code Duplication    Length = 5-8 lines in 4 locations

src/MySQLReplication/Config/Config.php 4 locations

@@ 152-157 (lines=6) @@
149
                throw new ConfigException(ConfigException::IP_ERROR_MESSAGE, ConfigException::IP_ERROR_CODE);
150
            }
151
        }
152
        if (!empty(self::$port) && !filter_var(
153
                self::$port, FILTER_VALIDATE_INT, ['options' => ['min_range' => 0]]
154
            )
155
        ) {
156
            throw new ConfigException(ConfigException::PORT_ERROR_MESSAGE, ConfigException::PORT_ERROR_CODE);
157
        }
158
        if (!empty(self::$password) && !is_string(self::$password) && !is_numeric(self::$password)) {
159
            throw new ConfigException(ConfigException::PASSWORD_ERROR_MESSAGE, ConfigException::PASSWORD_ERROR_CODE);
160
        }
@@ 174-179 (lines=6) @@
171
                }
172
            }
173
        }
174
        if (!empty(self::$slaveId) && !filter_var(
175
                self::$slaveId, FILTER_VALIDATE_INT, ['options' => ['min_range' => 0]]
176
            )
177
        ) {
178
            throw new ConfigException(ConfigException::SLAVE_ID_ERROR_MESSAGE, ConfigException::SLAVE_ID_ERROR_CODE);
179
        }
180
        if (!empty(self::$binLogFileName) && !is_string(self::$binLogFileName)) {
181
            throw new ConfigException(
182
                ConfigException::BIN_LOG_FILE_NAME_ERROR_MESSAGE, ConfigException::BIN_LOG_FILE_NAME_ERROR_CODE
@@ 185-192 (lines=8) @@
182
                ConfigException::BIN_LOG_FILE_NAME_ERROR_MESSAGE, ConfigException::BIN_LOG_FILE_NAME_ERROR_CODE
183
            );
184
        }
185
        if (!empty(self::$binLogPosition) && !filter_var(
186
                self::$binLogPosition, FILTER_VALIDATE_INT, ['options' => ['min_range' => 0]]
187
            )
188
        ) {
189
            throw new ConfigException(
190
                ConfigException::BIN_LOG_FILE_POSITION_ERROR_MESSAGE, ConfigException::BIN_LOG_FILE_POSITION_ERROR_CODE
191
            );
192
        }
193
        if (!empty(self::$mariaDbGtid) && !is_string(self::$mariaDbGtid)) {
194
            throw new ConfigException(
195
                ConfigException::MARIADBGTID_ERROR_MESSAGE, ConfigException::MARIADBGTID_ERROR_CODE
@@ 198-202 (lines=5) @@
195
                ConfigException::MARIADBGTID_ERROR_MESSAGE, ConfigException::MARIADBGTID_ERROR_CODE
196
            );
197
        }
198
        if (!filter_var(self::$tableCacheSize, FILTER_VALIDATE_INT, ['options' => ['min_range' => 0]])) {
199
            throw new ConfigException(
200
                ConfigException::TABLE_CACHE_SIZE_ERROR_MESSAGE, ConfigException::TABLE_CACHE_SIZE_ERROR_CODE
201
            );
202
        }
203
        if (0 !== self::$heartbeatPeriod && !filter_var(
204
                self::$heartbeatPeriod, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1, 'max_range' => 4294967]]
205
            )