Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint code #652

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions app/Console/Commands/MigrateOSCIPublicationOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,28 +307,28 @@ private function configureFigureBlock($block, $figure)
switch (true) {
// Non-video embeds (HTML, mostly) become media_embed
case $figure->figure_type === 'html_figure'
&& !isset($figure->html_content_src):
&& !isset($figure->html_content_src):
$this->configureHTMLFigure($block, $figure);
return;

// HTML embeds with a src are videos
// HTML embeds with a src are videos
case $figure->figure_type === 'html_figure'
&& isset($figure->html_content_src):
&& isset($figure->html_content_src):
$this->configureVideoFigure($block, $figure);
return;

// OSCI's layered_image with only one layer should just be an image
// OSCI's layered_image with only one layer should just be an image
case $figure->figure_type === 'layered_image'
&& count($layers) === 1:
&& count($layers) === 1:
$this->configureImageFigure($block, $figure, $layers);
return;

// Layered images are just that
// Layered images are just that
case $figure->figure_type === 'layered_image':
$this->configureLayeredImageFigure($block, $figure, $layers);
return;

// IIP Asset images are also images
// IIP Asset images are also images
case $figure->figure_type === 'iip_asset':
$this->configureImageFigure($block, $figure, $layers);
return;
Expand All @@ -337,7 +337,7 @@ private function configureFigureBlock($block, $figure)
$this->configure360EmbedFigure($block, $figure);
return;

// RTI_Viewers will need other handling, so leave a placeholder..
// RTI_Viewers will need other handling, so leave a placeholder..
case $figure->figure_type === 'rti_viewer':
// TODO: insert reader_url, figure # for this text + figure
$block->type = 'video';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class () extends Migration {
public function up(): void
{
Schema::table('digital_publication_articles', function (Blueprint $table) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class () extends Migration {
public function up(): void
{
Schema::table('digital_publication_articles', function (Blueprint $table) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class () extends Migration {
public function up(): void
{
Schema::table('digital_publications', function (Blueprint $table) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class () extends Migration {
public function up(): void
{
$types = array_map(fn($enum) => $enum->value, DigitalPublicationArticleType::cases());
$types = array_map(fn ($enum) => $enum->value, DigitalPublicationArticleType::cases());
Schema::table('digital_publication_articles', function (Blueprint $table) use ($types) {
$table->enum('article_type', $types)->default('text');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class () extends Migration {
public function up(): void
{
Schema::table('digital_publications', function (Blueprint $table) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use App\Models\Vendor\Block;

return new class extends Migration
{
return new class () extends Migration {
public function up(): void
{
// Find all image blocks of digitalPublicationArticles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class () extends Migration {
public function up(): void
{
Schema::table('experiences', function (Blueprint $table) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class () extends Migration {
public function up(): void
{
Schema::table(table: 'exhibitions', callback: function (Blueprint $table): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use App\Models\Vendor\Block;

return new class extends Migration
{
return new class () extends Migration {
public function up(): void
{
$types = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
return new class () extends Migration {
/**
* Run the migrations.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
return new class () extends Migration {
/**
* Run the migrations.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
use Illuminate\Support\Facades\Schema;
use App\Models\ExperienceImage;

return new class extends Migration
{
return new class () extends Migration {
public function up(): void
{
Schema::table('experience_images', function (Blueprint $table) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Str;

?>

<div class="m-title-bar m-digipub-title-bar"{!! isset($id) ? ' id="'.$id.'"' : '' !!}>
Expand Down
2 changes: 1 addition & 1 deletion routes/kiosk.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
)->name('interactiveFeatures.showKiosk');

// Only needed so that the kiosk doesn't fallback to the web routes.
Route::fallback(fn() => abort(404));
Route::fallback(fn () => abort(404));