src/Variant/Strategies/AbstractVariantStrategy.php
public function apply(ProcessableFileInterface $file)
    {
        $this->file = $file;

        if ( ! $this->shouldBeApplied()) {
            throw new VariantStrategyShouldNotBeAppliedException;
        }

        $result = $this->perform();

        return ($result || null === $result) ? $this->file : false;
    }
public function apply(ProcessableFileInterface $file)
    {
        $this->file = $file;

        if ( ! $this->shouldBeApplied()) {
            throw new VariantStrategyShouldNotBeAppliedException;
        }

        $result = $this->perform();

        return ($result || null === $result) ? $this->file : false;
    }
public function apply ( ProcessableFileInterface $ file ) { $ this -> file = $ file ; if ( ! $ this -> shouldBeApplied ( ) ) { throw new VariantStrategyShouldNotBeAppliedException ; } $ result = $ this -> perform ( ) ; return ( $ result || null === $ result ) ? $ this -> file : false ; }
Applies strategy to a file.

@param ProcessableFileInterface $file
@return ProcessableFileInterface|false
@throws VariantStrategyShouldNotBeAppliedException
Applies strategy to a file .