Skip to content

Commit

Permalink
removed final from private static methods, minor Docker adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderer committed Nov 30, 2020
1 parent 8feb1c4 commit 7f955be
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ travis:
PHP_VERSION=7.2 make travis-job
PHP_VERSION=7.3 make travis-job
PHP_VERSION=7.4 make travis-job
PHP_VERSION=8.0 make travis-job
travis-job:
${PHP} composer update
${PHP} php -v
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ services:
php-7.2: { build: { context: docker/php, args: { PHP_VERSION: 7.2 } }, volumes: ['.:/app'], working_dir: '/app' }
php-7.3: { build: { context: docker/php, args: { PHP_VERSION: 7.3 } }, volumes: ['.:/app'], working_dir: '/app' }
php-7.4: { build: { context: docker/php, args: { PHP_VERSION: 7.4 } }, volumes: ['.:/app'], working_dir: '/app' }
php-8.0: { build: { context: docker/php, args: { PHP_VERSION: 8.0.0RC5 } }, volumes: ['.:/app'], working_dir: '/app' }
8 changes: 3 additions & 5 deletions docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
ARG PHP_VERSION=7.4
FROM php:$PHP_VERSION

RUN pecl install xdebug && docker-php-ext-enable xdebug

RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "if (hash_file('sha384', 'composer-setup.php') === 'c31c1e292ad7be5f49291169c0ac8f683499edddcfd4e42232982d0fd193004208a58ff6f353fde0012d35fdd72bc394') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php -r "if (hash_file('sha384', 'composer-setup.php') === file_get_contents('https://composer.github.io/installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /usr/local/bin/composer

RUN apt update && apt install -y libzip-dev
RUN docker-php-ext-install zip
RUN apt update && apt install -y libzip-dev && docker-php-ext-install zip
RUN pecl install xdebug && docker-php-ext-enable xdebug
2 changes: 1 addition & 1 deletion src/Enum/CallbackEnumTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final public static function initialize(callable $callback): void
static::$callbacks[static::class] = $callback;
}

final private static function resolve(): array
private static function resolve(): array
{
$class = static::class;
if(false === (array_key_exists($class, static::$callbacks) && is_callable(static::$callbacks[$class]))) {
Expand Down
2 changes: 1 addition & 1 deletion src/Enum/ConstantsEnumTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trait ConstantsEnumTrait
{
use EnumTrait;

final private static function resolve(): array
private static function resolve(): array
{
return (new \ReflectionClass(static::class))->getConstants();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Enum/DocblockEnumTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ trait DocblockEnumTrait
{
use EnumTrait;

final private static function resolve(): array
private static function resolve(): array
{
$class = static::class;
$doc = (new \ReflectionClass($class))->getDocComment();
Expand Down
2 changes: 1 addition & 1 deletion src/Enum/EnumTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ final public static function getMembersAndValues(): array

/* --- SOURCE --- */

final private static function resolveMembers(): void
private static function resolveMembers(): void
{
$class = static::class;
if(isset(static::$members[$class])) {
Expand Down
2 changes: 1 addition & 1 deletion src/Enum/StaticEnumTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ trait StaticEnumTrait
{
use EnumTrait;

final private static function resolve(): array
private static function resolve(): array
{
$class = static::class;
// reflection instead of property_exists because of PHP 7.4 bug #78632
Expand Down

0 comments on commit 7f955be

Please sign in to comment.