Code Duplication    Length = 11-11 lines in 8 locations

src/GreyLogException/GreyLogException.php 8 locations

@@ 272-282 (lines=11) @@
269
    /**
270
     * Sends an execption of type "EMERGENCY" to configured GreyLog2-Server.
271
     */
272
    private function emergency() {
273
        $this->gelfMessage = new \Gelf\Message();
274
        $this->setShortMessage();
275
        $this->setMessage();
276
        $this->setLevel();
277
        $this->setFacility();
278
        $this->setAdditionals();
279
        $this->addParameters();
280
        //send message
281
        $this->publishMessage();
282
    }
283
284
    /**
285
     * Sends an execption of type "ALERT" to configured GreyLog2-Server.
@@ 287-297 (lines=11) @@
284
    /**
285
     * Sends an execption of type "ALERT" to configured GreyLog2-Server.
286
     */
287
    private function alert() {
288
        $this->gelfMessage = new \Gelf\Message();
289
        $this->setShortMessage();
290
        $this->setMessage();
291
        $this->setLevel();
292
        $this->setFacility();
293
        $this->setAdditionals();
294
        $this->addParameters();
295
        //send message
296
        $this->publishMessage();
297
    }
298
299
    /**
300
     * Sends an execption of type "CRITICAL" to configured GreyLog2-Server.
@@ 302-312 (lines=11) @@
299
    /**
300
     * Sends an execption of type "CRITICAL" to configured GreyLog2-Server.
301
     */
302
    private function critical() {
303
        $this->gelfMessage = new \Gelf\Message();
304
        $this->setShortMessage();
305
        $this->setMessage();
306
        $this->setLevel();
307
        $this->setFacility();
308
        $this->setAdditionals();
309
        $this->addParameters();
310
        //send message
311
        $this->publishMessage();
312
    }
313
314
    /**
315
     * Sends an execption of type "ERROR" to configured GreyLog2-Server.
@@ 317-327 (lines=11) @@
314
    /**
315
     * Sends an execption of type "ERROR" to configured GreyLog2-Server.
316
     */
317
    private function error() {
318
        $this->gelfMessage = new \Gelf\Message();
319
        $this->setShortMessage();
320
        $this->setMessage();
321
        $this->setLevel();
322
        $this->setFacility();
323
        $this->setAdditionals();
324
        $this->addParameters();
325
        //send message
326
        $this->publishMessage();
327
    }
328
329
    /**
330
     * Sends an execption of type "WARNING" to configured GreyLog2-Server.
@@ 332-342 (lines=11) @@
329
    /**
330
     * Sends an execption of type "WARNING" to configured GreyLog2-Server.
331
     */
332
    private function warning() {
333
        $this->gelfMessage = new \Gelf\Message();
334
        $this->setShortMessage();
335
        $this->setMessage();
336
        $this->setLevel();
337
        $this->setFacility();
338
        $this->setAdditionals();
339
        $this->addParameters();
340
        //send message
341
        $this->publishMessage();
342
    }
343
344
    /**
345
     * Sends an execption of type "NOTICE" to configured GreyLog2-Server.
@@ 347-357 (lines=11) @@
344
    /**
345
     * Sends an execption of type "NOTICE" to configured GreyLog2-Server.
346
     */
347
    private function notice() {
348
        $this->gelfMessage = new \Gelf\Message();
349
        $this->setShortMessage();
350
        $this->setMessage();
351
        $this->setLevel();
352
        $this->setFacility();
353
        $this->setAdditionals();
354
        $this->addParameters();
355
        //send message
356
        $this->publishMessage();
357
    }
358
359
    /**
360
     * Sends an execption of type "INFO" to configured GreyLog2-Server.
@@ 362-372 (lines=11) @@
359
    /**
360
     * Sends an execption of type "INFO" to configured GreyLog2-Server.
361
     */
362
    private function info() {
363
        $this->gelfMessage = new \Gelf\Message();
364
        $this->setShortMessage();
365
        $this->setMessage();
366
        $this->setLevel();
367
        $this->setFacility();
368
        $this->setAdditionals();
369
        $this->addParameters();
370
        //send message
371
        $this->publishMessage();
372
    }
373
374
    /**
375
     * Sends an execption of type "DEBUG" to configured GreyLog2-Server.
@@ 377-387 (lines=11) @@
374
    /**
375
     * Sends an execption of type "DEBUG" to configured GreyLog2-Server.
376
     */
377
    private function debug() {
378
        $this->gelfMessage = new \Gelf\Message();
379
        $this->setShortMessage();
380
        $this->setMessage();
381
        $this->setLevel();
382
        $this->setFacility();
383
        $this->setAdditionals();
384
        $this->addParameters();
385
        //send message
386
        $this->publishMessage();
387
    }
388
389
    /**
390
     * Sets the ShortMessage and returns message object.