Skip to content

Commit

Permalink
Minor style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
george-zakharov authored and frankdejonge committed Jan 15, 2022
1 parent 72451e4 commit adafbfb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/.php-cs-fixer.php
/.php-cs-fixer.cache
/google-cloud-service-account.json
.idea
9 changes: 5 additions & 4 deletions bin/check-versions.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* - All required dependencies of the extracted packages MUST be
* present in the main composer.json's require(-dev) section.
* - Dependency constraints of extracted packages may not exclude
* the constrains of the main package and visa versa.
* the constraints of the main package and visa versa.
* - The provided target release argument must be satisfiable by
* all of the extracted packages' core dependency constraint.
*/
Expand All @@ -21,7 +21,7 @@
use League\Flysystem\Local\LocalFilesystemAdapter;
use League\Flysystem\StorageAttributes;

include_once __DIR__.'/tools.php';
include_once __DIR__ . '/tools.php';


function constraint_has_conflict(string $mainConstraint, string $packageConstraint): bool
Expand Down Expand Up @@ -53,7 +53,7 @@ function constraint_has_conflict(string $mainConstraint, string $packageConstrai
write_line("🔎 Inspecting composer dependency incompatibilities.");

$mainVersion = $argv[1];
$filesystem = new Filesystem(new LocalFilesystemAdapter(__DIR__.'/../'));
$filesystem = new Filesystem(new LocalFilesystemAdapter(__DIR__ . '/../'));

$mainComposer = $filesystem->read('composer.json');
/** @var string[] $otherComposers */
Expand All @@ -69,7 +69,7 @@ function constraint_has_conflict(string $mainConstraint, string $packageConstrai
$information = json_decode($filesystem->read($composerFile), true);

foreach ($information['require'] as $dependency => $constraint) {
if (strpos($dependency, 'ext-') === 0 || $dependency === 'phpseclib/phpseclib') {
if (str_starts_with($dependency, 'ext-') || $dependency === 'phpseclib/phpseclib') {
continue;
}

Expand All @@ -79,6 +79,7 @@ function constraint_has_conflict(string $mainConstraint, string $packageConstrai
} else {
write_line("Composer file {$composerFile} allows league/flysystem:{$mainVersion} with {$constraint}");
}

continue;
}

Expand Down
4 changes: 2 additions & 2 deletions bin/set-flysystem-version.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use League\Flysystem\Local\LocalFilesystemAdapter;
use League\Flysystem\StorageAttributes;

include_once __DIR__.'/tools.php';
include_once __DIR__ . '/tools.php';

if ( ! isset($argv[1])) {
panic('No base version provided');
Expand All @@ -15,7 +15,7 @@

write_line("☝️ Setting all flysystem constraints to {$mainVersion}.");

$filesystem = new Filesystem(new LocalFilesystemAdapter(__DIR__.'/../'));
$filesystem = new Filesystem(new LocalFilesystemAdapter(__DIR__ . '/../'));

/** @var string[] $otherComposers */
$composerFiles = $filesystem->listContents('src', true)
Expand Down
2 changes: 1 addition & 1 deletion bin/tools.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

include_once __DIR__.'/../vendor/autoload.php';
include_once __DIR__ . '/../vendor/autoload.php';

function write_line(string $line)
{
Expand Down

0 comments on commit adafbfb

Please sign in to comment.