Skip to content

Commit

Permalink
Merge pull request #652 from art-institute-of-chicago/fix/lint
Browse files Browse the repository at this point in the history
Lint code
  • Loading branch information
nikhiltri authored Jan 8, 2025
2 parents b456f34 + c6f8b31 commit b4c2e8d
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 34 deletions.
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));

0 comments on commit b4c2e8d

Please sign in to comment.