<?php

namespace Drupal\ufc\Traits;

trait NameConversionTrait {

  public function convertNames() {

    // Manual overrides for name problems go here.
    if ($this->first_name == 'Khaos') {
      $this->first_name = 'Kalinn';
    }

    if ($this->first_name == "Aoriqileng") {
      $suffix = $this->first_name;
    }

    if ($this->first_name == 'J') {
      $this->first_name = 'JP';
      $this->last_name = 'Buys';
    }

    if ($this->last_name == 'Mc Kee') {
      $this->last_name = 'McKee';
    }

    if ($this->last_name == 'Mc Gee') {
      $this->last_name = 'McGee';
    }

    if ($this->last_name == 'Mc Gregor') {
      $this->last_name = 'mcgregor';
    }

    if ($this->last_name == "O&#039; Malley") {
      $this->last_name = 'Omalley';
    }

    if ($this->first_name == "Don&#039;") {
      $this->first_name = 'dontale';
      $this->last_name = 'mayes';
    }

    if ($this->first_name == "Marc-") {
      $this->first_name = 'Marc';
    }

    if ($this->first_name == "A") {
      $this->first_name = 'AJ';
      $this->last_name = 'Dobson';
    }

    if ($this->first_name == "C") {
      $this->first_name = 'CB';
      $this->last_name = 'Dollaway';
    }

    if ($this->last_name == "Della Maddalena") {
      $this->last_name = 'Della';
    }

    if ($this->first_name == "Elizeudos") {
      $this->first_name = 'elizeu';
      $this->last_name = 'dos-santos';
    }

    if ($this->last_name == "La Flare") {
      $this->last_name = 'laflare';
    }

    if ($this->first_name == "JoelÁlvarez") {
      $this->first_name = 'Joel';
    }

    if ($this->last_name == "J Brown") {
      $this->first_name = 'TJ';
      $this->last_name = 'Brown';
    }


    if ($this->first_name == "Alexda") {
      $this->first_name = "alex-da";
    }


    if ($this->last_name == "Mc Kinney") {
      $this->last_name = "mckinney";
    }

    if ($this->last_name == "Van Camp") {
      $this->last_name = "vancamp";
    }

    if ($this->last_name == "J Laramie") {
      $this->first_name = "TJ";
      $this->last_name = "Laramie";
    }

    if ($this->last_name == "Al- Qaisi") {
      $this->last_name = "alqaisi";
    }

    if ($this->first_name == "Alatengheili") {
      $this->first_name = "heili";
      $this->last_name = "alateng";
    }

    if ($this->last_name == "J Dillashaw") {
      $this->first_name = "TJ";
      $this->last_name = "Dillashaw";
    }

    if ($this->first_name == "Andersondos") {
      $this->first_name = "Anderson-dos";
    }

    if ($this->last_name == "Silvade Andrade") {
      $this->last_name = "Silva-de-andrade";
    }

    if ($this->first_name == "Ode&#039;") {
      $this->first_name = "ode";
    }

    if ($this->first_name == "Sumudaerji") {
      $this->first_name = "su";
      $this->last_name = "mudaerji";
    }

    if ($this->first_name == "Georges" && $this->last_name == "St- Pierre") {
      $this->last_name = "st pierre";
    }


  }

}
