From 86df134e26658eebb52aaadcc095cb7c02a9be2e Mon Sep 17 00:00:00 2001 From: Mysaa Date: Tue, 21 Feb 2023 16:32:51 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20types=20des=20ascenceurs=20et=20e?= =?UTF-8?q?scaliers=20dans=20le=20script=20de=20peuplage.=20Mise=20=C3=A0?= =?UTF-8?q?=20jour=20de=20composer.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.lock | 157 +----------------------- src/Controller/JsonReaderController.php | 11 +- 2 files changed, 16 insertions(+), 152 deletions(-) diff --git a/composer.lock b/composer.lock index 2e98ce8..eac1d69 100644 --- a/composer.lock +++ b/composer.lock @@ -1314,151 +1314,6 @@ }, "time": "2022-05-23T21:33:49+00:00" }, - { - "name": "friendsofphp/proxy-manager-lts", - "version": "v1.0.14", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git", - "reference": "a527c9d9d5348e012bd24482d83a5cd643bcbc9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/a527c9d9d5348e012bd24482d83a5cd643bcbc9e", - "reference": "a527c9d9d5348e012bd24482d83a5cd643bcbc9e", - "shasum": "" - }, - "require": { - "laminas/laminas-code": "~3.4.1|^4.0", - "php": ">=7.1", - "symfony/filesystem": "^4.4.17|^5.0|^6.0" - }, - "conflict": { - "laminas/laminas-stdlib": "<3.2.1", - "zendframework/zend-stdlib": "<3.2.1" - }, - "replace": { - "ocramius/proxy-manager": "^2.1" - }, - "require-dev": { - "ext-phar": "*", - "symfony/phpunit-bridge": "^5.4|^6.0" - }, - "type": "library", - "extra": { - "thanks": { - "name": "ocramius/proxy-manager", - "url": "https://github.com/Ocramius/ProxyManager" - } - }, - "autoload": { - "psr-4": { - "ProxyManager\\": "src/ProxyManager" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - } - ], - "description": "Adding support for a wider range of PHP versions to ocramius/proxy-manager", - "homepage": "https://github.com/FriendsOfPHP/proxy-manager-lts", - "keywords": [ - "aop", - "lazy loading", - "proxy", - "proxy pattern", - "service proxies" - ], - "support": { - "issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues", - "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.14" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ocramius/proxy-manager", - "type": "tidelift" - } - ], - "time": "2023-01-30T10:40:19+00:00" - }, - { - "name": "laminas/laminas-code", - "version": "4.8.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-code.git", - "reference": "dd19fe8e07cc3f374308565667eecd4958c22106" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-code/zipball/dd19fe8e07cc3f374308565667eecd4958c22106", - "reference": "dd19fe8e07cc3f374308565667eecd4958c22106", - "shasum": "" - }, - "require": { - "php": "~8.1.0 || ~8.2.0" - }, - "require-dev": { - "doctrine/annotations": "^1.13.3", - "ext-phar": "*", - "laminas/laminas-coding-standard": "^2.3.0", - "laminas/laminas-stdlib": "^3.6.1", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^5.1.0" - }, - "suggest": { - "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", - "laminas/laminas-stdlib": "Laminas\\Stdlib component" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Code\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Extensions to the PHP Reflection API, static code scanning, and code generation", - "homepage": "https://laminas.dev", - "keywords": [ - "code", - "laminas", - "laminasframework" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-code/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-code/issues", - "rss": "https://github.com/laminas/laminas-code/releases.atom", - "source": "https://github.com/laminas/laminas-code" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-12-08T02:08:23+00:00" - }, { "name": "nelmio/cors-bundle", "version": "2.3.1", @@ -2776,16 +2631,16 @@ }, { "name": "symfony/flex", - "version": "v2.2.4", + "version": "v2.2.5", "source": { "type": "git", "url": "https://github.com/symfony/flex.git", - "reference": "52baff1adb29faf443c6710cb775bd88b9627381" + "reference": "2ff8465e7172790a47ab3c129f2b514eb2d8a286" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/flex/zipball/52baff1adb29faf443c6710cb775bd88b9627381", - "reference": "52baff1adb29faf443c6710cb775bd88b9627381", + "url": "https://api.github.com/repos/symfony/flex/zipball/2ff8465e7172790a47ab3c129f2b514eb2d8a286", + "reference": "2ff8465e7172790a47ab3c129f2b514eb2d8a286", "shasum": "" }, "require": { @@ -2821,7 +2676,7 @@ "description": "Composer plugin for Symfony", "support": { "issues": "https://github.com/symfony/flex/issues", - "source": "https://github.com/symfony/flex/tree/v2.2.4" + "source": "https://github.com/symfony/flex/tree/v2.2.5" }, "funding": [ { @@ -2837,7 +2692,7 @@ "type": "tidelift" } ], - "time": "2022-12-20T07:19:39+00:00" + "time": "2023-02-18T08:03:15+00:00" }, { "name": "symfony/framework-bundle", diff --git a/src/Controller/JsonReaderController.php b/src/Controller/JsonReaderController.php index 27bc271..0b8b23a 100644 --- a/src/Controller/JsonReaderController.php +++ b/src/Controller/JsonReaderController.php @@ -105,19 +105,28 @@ class JsonReaderController extends AbstractController } $roomsX = []; foreach($roomsXData as $rData) { - $roomsX[] = JsonReaderController::addRoom($rData, "R", $mr); + /* Determining between stairs and lift */ + echo sizeof(json_decode($rData['points'],true)) . '
'; + if(sizeof(json_decode($rData['points'],true))<=5) + $letter = "E"; + else + $letter = "S"; + $roomsX[] = JsonReaderController::addRoom($rData, $letter, $mr); } // Connect all rooms + $floors[4]->addPlace($cor2); foreach($rooms2 as $r){ $floors[4]->addPlace($r); $cor2->addConnection($r); } + $floors[5]->addPlace($cor3); foreach($rooms3 as $r){ $floors[5]->addPlace($r); $cor3->addConnection($r); } + $floors[6]->addPlace($cor4); foreach($rooms4 as $r){ $floors[6]->addPlace($r); $cor4->addConnection($r);