Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Aug 27, 2022
1 parent 143a260 commit 74428a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/Cache/FileCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,24 @@ protected function file(string $key): string
$keyParts = [];
foreach (preg_split('#([\/\\\\])#', $key, 0, PREG_SPLIT_DELIM_CAPTURE) as $part) {
switch ($part) {
// forward slashes don't need special treatment
case '/':
// forward slashes don't need special treatment
break;

case '\\':
// backslashes get their own marker in the path
// to differentiate the cache key from one with forward slashes
case '\\':
$keyParts[] = '_backslash';
break;

case '':
// empty part means two slashes in a row;
// special marker like for backslashes
case '':
$keyParts[] = '_empty';
break;

// an actual path segment
default:
// an actual path segment:
// check if the segment only contains safe characters;
// underscores are *not* safe to guarantee uniqueness
// as they are used in the special cases
Expand Down
6 changes: 3 additions & 3 deletions src/Database/Sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -703,16 +703,16 @@ public function splitIdentifier($table, $identifier): array
$parts = preg_split('/(?:`[^`]*`|"[^"]*")(*SKIP)(*F)|\./', $identifier);

switch (count($parts)) {
// non-qualified identifier
case 1:
// non-qualified identifier
return [$table, $this->unquoteIdentifier($parts[0])];

// qualified identifier
case 2:
// qualified identifier
return [$this->unquoteIdentifier($parts[0]), $this->unquoteIdentifier($parts[1])];

// every other number is an error
default:
// every other number is an error
throw new InvalidArgumentException('Invalid identifier ' . $identifier);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Toolkit/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,17 +585,17 @@ public static function youtube(string $url, array $options = [], array $attr = [
};

switch ($path->toString()) {
// playlists
case 'embed/videoseries':
case 'playlist':
// playlists
if ($isYoutubeId($query->list) === true) {
$src = $host . '/videoseries';
}

break;

// regular video URLs
case 'watch':
// regular video URLs
if ($isYoutubeId($query->v) === true) {
$src = $host . '/' . $query->v;

Expand Down

0 comments on commit 74428a4

Please sign in to comment.