protected function checkPresence()
    {
        $messages = [];

        $result = collect($this->getFiles())
            ->map(function ($files, $type) use (&$messages) {
                $isGood = true;

                $files = collect($files);

                foreach ($files as $file) {
                    if (! is_null($file)) {
                        foreach ($this->getCheckers($type) as $checker) {
                            if (is_string($message = $checker($file))) {
                                $messages[] = $message;
                                $isGood = false;
                            }
                        }
                    }
                }

                return $isGood;
            })
            ->filter(function ($value) {
                return $value === false;
            });

        return [$messages, $result];
    }
protected function checkPresence()
    {
        $messages = [];

        $result = collect($this->getFiles())
            ->map(function ($files, $type) use (&$messages) {
                $isGood = true;

                $files = collect($files);

                foreach ($files as $file) {
                    if (! is_null($file)) {
                        foreach ($this->getCheckers($type) as $checker) {
                            if (is_string($message = $checker($file))) {
                                $messages[] = $message;
                                $isGood = false;
                            }
                        }
                    }
                }

                return $isGood;
            })
            ->filter(function ($value) {
                return $value === false;
            });

        return [$messages, $result];
    }
protected function checkPresence ( ) { $ messages = [ ] ; $ result = collect ( $ this -> getFiles ( ) ) -> map ( function ( $ files , $ type ) use ( & $ messages ) { $ isGood = true ; $ files = collect ( $ files ) ; foreach ( $ files as $ file ) { if ( ! is_null ( $ file ) ) { foreach ( $ this -> getCheckers ( $ type ) as $ checker ) { if ( is_string ( $ message = $ checker ( $ file ) ) ) { $ messages [ ] = $ message ; $ isGood = false ; } } } } return $ isGood ; } ) -> filter ( function ( $ value ) { return $ value === false ; } ) ; return [ $ messages , $ result ] ; }
Check file or dir presence.

@return static
Check file or dir presence .