protected function set_base_path( $base_path ) {
        if ( ! is_string( $base_path ) ) {
            throw new InvalidArgumentException( 'Invalid argument. `$base_path` must be string.' );
        }

        if ( strpos( $base_path, '.php' ) !== false ) {
            $base_path = preg_replace( '/[^\/]*$/', '', $base_path );
        }

        $this->base_path = rtrim( $base_path, '/' );
    }