<commit_before>FROM php:7.2

RUN mkdir /src \
  && mkdir /composer

RUN apt-get update \
  && apt-get install -y zip libzip-dev \
  && docker-php-ext-install zip \
  && apt-get -y autoremove \
  && apt-get -y clean \
  && rm -rf /var/lib/apt/lists/*

COPY composer.json /composer

# Get composer, install PHP tools and remove composer.
RUN cd /composer \
  && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
  && php composer-setup.php --install-dir /composer \
  && php /composer/composer.phar install \
  # make phpcs quack like a system binary
  && ln -s /composer/vendor/bin/phpcs /usr/bin/phpcs \
  # Add coding standards to phpcs
  && vendor/bin/phpcs --config-set installed_paths /composer/vendor/wp-coding-standards/wpcs/,/composer/vendor/cakephp/cakephp-codesniffer \
  # cleanup
  && rm /composer/composer.phar /composer/composer-setup.php /composer/composer.json /composer/composer.lock

WORKDIR /src<commit_msg>Also symlink phpcbf as we need it for fixing.<commit_after>FROM php:7.2

RUN mkdir /src \
  && mkdir /composer

RUN apt-get update \
  && apt-get install -y zip libzip-dev \
  && docker-php-ext-install zip \
  && apt-get -y autoremove \
  && apt-get -y clean \
  && rm -rf /var/lib/apt/lists/*

COPY composer.json /composer

# Get composer, install PHP tools and remove composer.
RUN cd /composer \
  && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
  && php composer-setup.php --install-dir /composer \
  && php /composer/composer.phar install \
  # make phpcs quack like a system binary
  && ln -s /composer/vendor/bin/phpcs /usr/bin/phpcs \
  && ln -s /composer/vendor/bin/phpcbf /usr/bin/phpcbf \
  # Add coding standards to phpcs
  && vendor/bin/phpcs --config-set installed_paths /composer/vendor/wp-coding-standards/wpcs/,/composer/vendor/cakephp/cakephp-codesniffer \
  # cleanup
  && rm /composer/composer.phar /composer/composer-setup.php /composer/composer.json /composer/composer.lock

WORKDIR /src
{'fraction_non_alphanumeric': 0.143646408839779, 'fraction_numerical': 0.0020090406830738324, 'mean_word_length': 3.0570264765784114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6503444', 'n_tokens_mistral': 734, 'n_tokens_neox': 714, 'n_words': 169}