Пример #1
0
 /** @return array */
 public function run()
 {
     $tokens = explode(' ', $this->input);
     foreach ($tokens as $key => $token) {
         if (($word = Other::create($token)) !== NULL) {
         } elseif (($word = Vowel::create($token)) !== NULL) {
         } elseif (($word = ConsonantCluster::create($token)) !== NULL) {
         } elseif (($word = Consonant::create($token)) !== NULL) {
         } else {
             $word = $token;
         }
         $tokens[$key] = $word;
     }
     return $tokens;
 }
Пример #2
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return Other::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }