app/Ship/Traits/HasQueryCriteriaTrait.php
/**
     * Validates, if the given Repository exists or uses $this->repository on the Task/Action to apply functions
     *
     * @param $repository
     *
     * @return mixed
     * @throws CoreInternalErrorException
     */
Validates, if the given Repository exists or uses $this->repository on the Task/Action to apply functions
@param $repository

@return mixed
@throws CoreInternalErrorException
Validates if the given Repository exists or uses $this - > repository on the Task / Action to apply functions @param $repository @return mixed @throws CoreInternalErrorException
private function validateRepository($repository)
    {
        $validatedRepository = $repository;
        if (null === $repository) {
            if (! isset($this->repository)) {
                throw new CoreInternalErrorException('No protected or public accessible repository available');
            }
            $validatedRepository = $this->repository;
        }
        if (null === $validatedRepository) {
            throw new CoreInternalErrorException();
        }
        if (! ($validatedRepository instanceof Repository)) {
            throw new CoreInternalErrorException();
        }
        return $validatedRepository;
    }
private function validateRepository ( $ repository ) { $ validatedRepository = $ repository ; if ( null === $ repository ) { if ( ! isset ( $ this -> repository ) ) { throw new CoreInternalErrorException ( 'No protected or public accessible repository available' ) ; } $ validatedRepository = $ this -> repository ; } if ( null === $ validatedRepository ) { throw new CoreInternalErrorException ( ) ; } if ( ! ( $ validatedRepository instanceof Repository ) ) { throw new CoreInternalErrorException ( ) ; } return $ validatedRepository ; }
Validates, if the given Repository exists or uses $this->repository on the Task/Action to apply functions
 @param $repository
Validates if the given Repository exists or uses $this - > repository on the Task / Action to apply functions @param $repository
// check if we have a "custom" repository // check, if the validated repository is null // check if it is a Repository class