| Conditions | 3 |
| Paths | 3 |
| Total Lines | 25 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function up(Schema $schema): void |
||
| 21 | { |
||
| 22 | $this->addSql("DELETE FROM settings_current WHERE variable IN ('stylesheets', 'theme')"); |
||
| 23 | |||
| 24 | $kernel = $this->container->get('kernel'); |
||
|
|
|||
| 25 | $rootPath = $kernel->getProjectDir(); |
||
| 26 | |||
| 27 | $themeDirectory = $rootPath.'/var/theme'; |
||
| 28 | $themesDirectory = $rootPath.'/var/themes'; |
||
| 29 | |||
| 30 | $finder = new Finder(); |
||
| 31 | $filesystem = new Filesystem(); |
||
| 32 | |||
| 33 | $finder->directories()->in($themeDirectory)->depth('== 0'); |
||
| 34 | |||
| 35 | foreach ($finder as $entry) { |
||
| 36 | if ($entry->isDir()) { |
||
| 37 | error_log( |
||
| 38 | sprintf( |
||
| 39 | "Moving theme directory: %s %s", |
||
| 40 | $entry->getRealPath(), |
||
| 41 | $themesDirectory.'/' |
||
| 42 | ) |
||
| 43 | ); |
||
| 44 | $filesystem->rename($entry->getRealPath(), $themesDirectory.'/'.$entry->getRelativePathname()); |
||
| 45 | } |
||
| 48 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.