table = QueryBuilder::prefixTable($table); $this->joinType = $this->getJoinType($joinType); if ( ! is_null($alias)) { $this->alias = trim($alias); } } /** * @param string $type * * @return string */ private function getJoinType($type) { $type = strtoupper($type); if (array_key_exists($type, JoinType::getTypes())) { return $type; } throw new InvalidArgumentException( sprintf( 'Join type %s is not supported. Please provide one of the supported join types (%s)', $type, implode(',', JoinType::getTypes()) ) ); } }