$filename contains a whitespace, which I am fixing with trim(). This
function was placed in findUnexecuted but you suggested me to move it here.


2014-03-28 13:06 GMT+02:00 Dionysis Zindros <notifications@github.com>:

> In models/migration.php:
>
> > +        public static function findLast( $env = '' ) {
> > +            if ( !$logs = file_get_contents( static::$log ) ) {
> > +                throw new ModelNotFoundException();
> > +            }
> > +            $array = json_decode( $logs, true );
> > +            if ( empty( $env ) ) {
> > +                return $array;
> > +            }
> > +            return $array[ $env ];
> > +        }
> > +
> > +        public static function findAll() {
> > +            $array = [];
> > +            foreach ( glob( static::$path . '*.php' ) as $filename ) {
> > +                $filename = str_replace( static::$path, '', $filename );
> > +                $array[] = trim( $filename );
>
> Why is this needed?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/dionyziz/endofcodes/pull/147/files#r11061853>
> .
>