sofa1at/mobiscrollinterpreter

converts sofa 1 businesshours and timetables to mobiscroll invalid/valid objects

1.4.0.3 2025-03-04 09:43 UTC

README

Unittest

install the mobiscroll via composer

{
  "require": {
    "sofa1at/php.b.int.mobiscroll": "^1"
  },
  "config": {
    "github-oauth": {
      "github.com": "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"
    }
  },
  "repositories": [
    {
      "type": "vcs",
      "url": "git@github.com:sofa1at/php.b.int.mobiscroll.git"
    }
  ]
}

php-mobiscrollinterpreter

This repository holds all interfaces/classes/traits related to PSR-3.

composer require sofa1at/mobiscrollinterpreter

$converter = new Sofa1MobiscrollConverter();

// add businesshours
$converter->AddBusinessHours($mockDataBusinessHours);

// add timesettings
$converter->AddTimeSetting($mockTimeSetting);

// receive json
$converter->ToString();

#phpunit tests Test if the output strings ar equal to the mock data strings.

Folder tests

TestClass InterpreterTest (interpretertest.php)

// timeSettings with Holidays 
testTimeSettingsAndBusinessHolidays();
// timeSettings only
testTimeSettings();
// businessHours only
testBusinessHours();
// businessHours with Holidays
testBusinessHoursAndBusinessHolidays();