diff --git a/lib/Command/ETL.php b/lib/Command/ETL.php index 51c16c3d..5ce1c00c 100644 --- a/lib/Command/ETL.php +++ b/lib/Command/ETL.php @@ -21,7 +21,7 @@ class ETL extends Command { private $etlService; public function __construct(ETLService $etlService) { - parent::__construct("suspiciouslogin:etl"); + parent::__construct('suspiciouslogin:etl'); $this->etlService = $etlService; diff --git a/lib/Command/ModelStatistics.php b/lib/Command/ModelStatistics.php index 8b29495f..280e7f36 100644 --- a/lib/Command/ModelStatistics.php +++ b/lib/Command/ModelStatistics.php @@ -28,9 +28,9 @@ private function printModelStatistics(Model $model, InputInterface $input, Outpu if (!$input->hasOption('stats') && !$input->getOption('stats')) { return; } - $output->writeln("Prescision(y): " . $model->getPrecisionY()); - $output->writeln("Prescision(n): " . $model->getPrecisionN()); - $output->writeln("Recall(y): " . $model->getRecallY()); - $output->writeln("Recall(n): " . $model->getRecallN()); + $output->writeln('Prescision(y): ' . $model->getPrecisionY()); + $output->writeln('Prescision(n): ' . $model->getPrecisionN()); + $output->writeln('Recall(y): ' . $model->getRecallY()); + $output->writeln('Recall(n): ' . $model->getRecallN()); } } diff --git a/lib/Command/Optimize.php b/lib/Command/Optimize.php index 377a0fef..f1cb1fee 100644 --- a/lib/Command/Optimize.php +++ b/lib/Command/Optimize.php @@ -26,27 +26,27 @@ class Optimize extends Command { private $optimizerService; public function __construct(OptimizerService $optimizer) { - parent::__construct("suspiciouslogin:optimize"); + parent::__construct('suspiciouslogin:optimize'); $this->optimizerService = $optimizer; $this->addOption( 'max-epochs', null, InputOption::VALUE_OPTIONAL, - "maximum number of epochs of optimization", + 'maximum number of epochs of optimization', 100 ); $this->addOption( 'v6', null, InputOption::VALUE_NONE, - "train with IPv6 data" + 'train with IPv6 data' ); $this->addOption( 'now', null, InputOption::VALUE_OPTIONAL, - "the current time as timestamp", + 'the current time as timestamp', time() ); $this->registerStatsOption(); @@ -65,7 +65,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->optimizerService->optimize( (int)$input->getOption('max-epochs'), $input->getOption('v6') ? new IpV6Strategy() : new Ipv4Strategy(), - (int) $input->getOption('now'), + (int)$input->getOption('now'), $output ); diff --git a/lib/Command/Predict.php b/lib/Command/Predict.php index adcbd04d..30d36bfc 100644 --- a/lib/Command/Predict.php +++ b/lib/Command/Predict.php @@ -26,30 +26,30 @@ class Predict extends Command { private $estimatorService; public function __construct(EstimatorService $estimatorService) { - parent::__construct("suspiciouslogin:predict"); + parent::__construct('suspiciouslogin:predict'); $this->estimatorService = $estimatorService; $this->addArgument( 'uid', InputArgument::REQUIRED, - "the UID of the user to run a prediction for" + 'the UID of the user to run a prediction for' ); $this->addArgument( 'ip', InputArgument::REQUIRED, - "the IP to predict suspiciousness" + 'the IP to predict suspiciousness' ); $this->addArgument( 'model', InputArgument::OPTIONAL, - "persisted model id (latest if omited)" + 'persisted model id (latest if omited)' ); $this->addOption( 'v6', null, InputOption::VALUE_NONE, - "train with IPv6 data" + 'train with IPv6 data' ); } diff --git a/lib/Command/Seed.php b/lib/Command/Seed.php index a9910da7..c7ea7691 100644 --- a/lib/Command/Seed.php +++ b/lib/Command/Seed.php @@ -29,22 +29,22 @@ class Seed extends Command { public function __construct(IConfig $config, LoginAddressAggregatedSeeder $seeder) { - parent::__construct("suspiciouslogin:seed"); + parent::__construct('suspiciouslogin:seed'); $this->seeder = $seeder; $this->addOption( 'v6', null, InputOption::VALUE_NONE, - "train with IPv6 data" + 'train with IPv6 data' ); - $this->setDescription("Fills the database with random IPs for development and testing purposes"); + $this->setDescription('Fills the database with random IPs for development and testing purposes'); $this->config = $config; } protected function execute(InputInterface $input, OutputInterface $output): int { if ($this->config->getSystemValueBool('debug', false) === false) { - $output->writeln("This command is meant for development purposes. Enable debug mode and try again if you know what you are doing."); + $output->writeln('This command is meant for development purposes. Enable debug mode and try again if you know what you are doing.'); return 1; } diff --git a/lib/Command/Train.php b/lib/Command/Train.php index fa6e6955..08e3b073 100644 --- a/lib/Command/Train.php +++ b/lib/Command/Train.php @@ -39,7 +39,7 @@ class Train extends Command { public function __construct(DataLoader $loader, Trainer $optimizer, ModelStore $store) { - parent::__construct("suspiciouslogin:train"); + parent::__construct('suspiciouslogin:train'); $this->trainer = $optimizer; $this->loader = $loader; $this->store = $store; @@ -48,56 +48,56 @@ public function __construct(DataLoader $loader, 'epochs', 'e', InputOption::VALUE_OPTIONAL, - "number of epochs to train" + 'number of epochs to train' ); $this->addOption( 'layers', 'l', InputOption::VALUE_OPTIONAL, - "number of hidden layers" + 'number of hidden layers' ); $this->addOption( 'shuffled', null, InputOption::VALUE_OPTIONAL, - "ratio of shuffled negative samples" + 'ratio of shuffled negative samples' ); $this->addOption( 'random', null, InputOption::VALUE_OPTIONAL, - "ratio of random negative samples" + 'ratio of random negative samples' ); $this->addOption( 'learn-rate', null, InputOption::VALUE_OPTIONAL, - "learning rate" + 'learning rate' ); $this->addOption( 'validation-threshold', null, InputOption::VALUE_OPTIONAL, - "determines how much of the most recent data is used for validation. the default is one week" + 'determines how much of the most recent data is used for validation. the default is one week' ); $this->addOption( 'max-age', null, InputOption::VALUE_OPTIONAL, - "determines the maximum age of test data" + 'determines the maximum age of test data' ); $this->addOption( 'now', null, InputOption::VALUE_OPTIONAL, - "overwrite the current time", + 'overwrite the current time', time() ); $this->addOption( 'v6', null, InputOption::VALUE_NONE, - "train with IPv6 data" + 'train with IPv6 data' ); $this->addOption( 'dry-run', @@ -109,7 +109,7 @@ public function __construct(DataLoader $loader, 'now', null, InputOption::VALUE_OPTIONAL, - "the current time as timestamp", + 'the current time as timestamp', time() ); $this->registerStatsOption(); @@ -134,7 +134,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $config = $config->setLearningRate((float)$input->getOption('learn-rate')); } - $trainingDataConfig = TrainingDataConfig::default((int) $input->getOption('now')); + $trainingDataConfig = TrainingDataConfig::default((int)$input->getOption('now')); if ($input->getOption('validation-threshold') !== null) { $trainingDataConfig = $trainingDataConfig->setThreshold((int)$input->getOption('validation-threshold')); } @@ -171,13 +171,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int $result->getClassifier(), $result->getModel() ); - $output->writeln("Model and estimator persisted."); + $output->writeln('Model and estimator persisted.'); } } catch (InsufficientDataException $ex) { - $output->writeln("Not enough data, try again later (" . $ex->getMessage() . ")"); + $output->writeln('Not enough data, try again later (' . $ex->getMessage() . ')'); return 1; } catch (ServiceException $ex) { - $output->writeln("Could not train a model: " . $ex->getMessage() . ""); + $output->writeln('Could not train a model: ' . $ex->getMessage() . ''); return 1; } return 0; diff --git a/lib/Db/LoginAddressAggregatedSeeder.php b/lib/Db/LoginAddressAggregatedSeeder.php index 4ce49ae0..df585c8d 100644 --- a/lib/Db/LoginAddressAggregatedSeeder.php +++ b/lib/Db/LoginAddressAggregatedSeeder.php @@ -34,7 +34,7 @@ public function seed(AClassificationStrategy $strategy): int { $maxRowsPerUser = 10; $total = 0; for ($i = 0; $i <= $numberOfUsers; $i++) { - $numberOfRows = random_int((int) ($maxRowsPerUser * 0.3), (int) ($maxRowsPerUser * 1.3)); + $numberOfRows = random_int((int)($maxRowsPerUser * 0.3), (int)($maxRowsPerUser * 1.3)); for ($j = 0; $j <= $numberOfRows; $j++) { $this->insertRow($now, $i, $strategy); $total++; diff --git a/lib/Exception/InsufficientDataException.php b/lib/Exception/InsufficientDataException.php index 12cdf652..479c6e66 100644 --- a/lib/Exception/InsufficientDataException.php +++ b/lib/Exception/InsufficientDataException.php @@ -10,9 +10,9 @@ namespace OCA\SuspiciousLogin\Exception; class InsufficientDataException extends ServiceException { - public function __construct(string $message = "") { + public function __construct(string $message = '') { parent::__construct( - $message === "" ? "Insufficient data" : "Insufficient data: $message" + $message === '' ? 'Insufficient data' : "Insufficient data: $message" ); } } diff --git a/lib/Listener/LoginMailListener.php b/lib/Listener/LoginMailListener.php index 5ad72a07..93fd667c 100644 --- a/lib/Listener/LoginMailListener.php +++ b/lib/Listener/LoginMailListener.php @@ -61,7 +61,7 @@ public function handle(Event $event): void { private function getMail(SuspiciousLoginEvent $event, IUser $user): IMessage { $suspiciousIp = $event->getIp(); - $addButton = $this->config->getAppValue('suspicious_login', 'show_more_info_button', '1') === "1"; + $addButton = $this->config->getAppValue('suspicious_login', 'show_more_info_button', '1') === '1'; $message = $this->mailer->createMessage(); $emailTemplate = $this->mailer->createEMailTemplate('suspiciousLogin.suspiciousLoginDetected'); @@ -71,7 +71,7 @@ private function getMail(SuspiciousLoginEvent $event, IUser $user): IMessage { $emailTemplate->addHeading( $this->l->t('New login location detected') ); - + $additionalText = ''; // Add explanation for more information about the IP-address (if enabled) if ($addButton) { diff --git a/lib/Migration/Version4002Date20220922094803.php b/lib/Migration/Version4002Date20220922094803.php index d1d5a9bb..afc3c266 100644 --- a/lib/Migration/Version4002Date20220922094803.php +++ b/lib/Migration/Version4002Date20220922094803.php @@ -109,13 +109,13 @@ protected function chunkedCopying(IQueryBuilder $insert, IQueryBuilder $select, $insert ->setParameter('uid', $row['uid']) ->setParameter('ip', $row['ip']) - ->setParameter('seen', (int) $row['seen'], IQueryBuilder::PARAM_INT) - ->setParameter('first_seen', (int) $row['first_seen'], IQueryBuilder::PARAM_INT) - ->setParameter('last_seen', (int) $row['last_seen'], IQueryBuilder::PARAM_INT) + ->setParameter('seen', (int)$row['seen'], IQueryBuilder::PARAM_INT) + ->setParameter('first_seen', (int)$row['first_seen'], IQueryBuilder::PARAM_INT) + ->setParameter('last_seen', (int)$row['last_seen'], IQueryBuilder::PARAM_INT) ; $insert->executeStatement(); - $newOffset = (int) $row['id']; + $newOffset = (int)$row['id']; } $result->closeCursor(); $this->connection->commit(); diff --git a/lib/Migration/Version9000Date20250114095826.php b/lib/Migration/Version9000Date20250114095826.php index c8373f05..b10fde7a 100644 --- a/lib/Migration/Version9000Date20250114095826.php +++ b/lib/Migration/Version9000Date20250114095826.php @@ -18,7 +18,9 @@ class Version9000Date20250114095826 extends SimpleMigrationStep { - public function __construct(private IJobList $jobList) { + public function __construct( + private IJobList $jobList, + ) { } public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { diff --git a/lib/Notifications/Notifier.php b/lib/Notifications/Notifier.php index 7c8a1a5e..a194e618 100644 --- a/lib/Notifications/Notifier.php +++ b/lib/Notifications/Notifier.php @@ -70,7 +70,7 @@ public function prepare(INotification $notification, string $languageCode): INot $additionalText = ''; // Add button for more information about the IP-address - if ($this->config->getAppValue('suspicious_login', 'show_more_info_button', '1') === "1") { + if ($this->config->getAppValue('suspicious_login', 'show_more_info_button', '1') === '1') { $action = $notification->createAction(); $label = $l->t('Open %s ↗', ['iplookup.flagfox.net']); $link = 'https://iplookup.flagfox.net/?ip=' . $suspiciousIp; diff --git a/lib/Service/DataLoader.php b/lib/Service/DataLoader.php index 70d9ce71..f928d5ab 100644 --- a/lib/Service/DataLoader.php +++ b/lib/Service/DataLoader.php @@ -52,7 +52,7 @@ public function loadTrainingAndValidationData(TrainingDataConfig $dataConfig, $maxAge = $dataConfig->getMaxAge() === -1 ? 0 : $dataConfig->getNow() - $dataConfig->getMaxAge() * 60 * 60 * 24; if (!$strategy->hasSufficientData($this->loginAddressMapper, $maxAge)) { - throw new InsufficientDataException("Not enough data for the specified maximum age"); + throw new InsufficientDataException('Not enough data for the specified maximum age'); } [$historyRaw, $recentRaw] = $strategy->findHistoricAndRecent( $this->loginAddressMapper, @@ -60,10 +60,10 @@ public function loadTrainingAndValidationData(TrainingDataConfig $dataConfig, $maxAge ); if (empty($historyRaw)) { - throw new InsufficientDataException("No historic data available"); + throw new InsufficientDataException('No historic data available'); } if (empty($recentRaw)) { - throw new InsufficientDataException("No recent data available"); + throw new InsufficientDataException('No recent data available'); } $positives = $this->addressesToDataSet($historyRaw, $strategy); diff --git a/lib/Service/EstimatorService.php b/lib/Service/EstimatorService.php index 7d47b229..9913eb7c 100644 --- a/lib/Service/EstimatorService.php +++ b/lib/Service/EstimatorService.php @@ -35,7 +35,7 @@ public function __construct( public function predict(string $uid, string $ip, AClassificationStrategy $strategy, ?int $modelId = null): bool { try { if ($modelId === null) { - $this->logger->debug("loading latest model"); + $this->logger->debug('loading latest model'); $estimator = $this->modelStore->loadLatest($strategy); } else { diff --git a/lib/Service/LoginClassifier.php b/lib/Service/LoginClassifier.php index 90567e4f..467e444e 100644 --- a/lib/Service/LoginClassifier.php +++ b/lib/Service/LoginClassifier.php @@ -58,7 +58,7 @@ private function isAuthenticatedWithAppPassword(IRequest $request): bool { } return preg_match( - "/^([0-9A-Za-z]{5})-([0-9A-Za-z]{5})-([0-9A-Za-z]{5})-([0-9A-Za-z]{5})-([0-9A-Za-z]{5})$/", + '/^([0-9A-Za-z]{5})-([0-9A-Za-z]{5})-([0-9A-Za-z]{5})-([0-9A-Za-z]{5})-([0-9A-Za-z]{5})$/', $pwd[1] ) === 1; } @@ -66,7 +66,7 @@ private function isAuthenticatedWithAppPassword(IRequest $request): bool { public function process(string $uid, string $ip) { if ($this->isAuthenticatedWithAppPassword($this->request)) { // We don't care about those logins - $this->logger->debug("App password detected. No address classification is performed"); + $this->logger->debug('App password detected. No address classification is performed'); return; } try { @@ -81,7 +81,7 @@ public function process(string $uid, string $ip) { // This most likely means there is no trained model yet, so we return early here return; } catch (ServiceException $ex) { - $this->logger->warning("Could not predict suspiciousness: " . $ex->getMessage()); + $this->logger->warning('Could not predict suspiciousness: ' . $ex->getMessage()); // There was an error loading the model, so we return early here return; } diff --git a/lib/Service/MLP/OptimizerService.php b/lib/Service/MLP/OptimizerService.php index fdf175f0..0f2427d6 100644 --- a/lib/Service/MLP/OptimizerService.php +++ b/lib/Service/MLP/OptimizerService.php @@ -54,11 +54,11 @@ private function printConfig(int $epoch, float $stepWidth, Config $config, OutputInterface $output) { - $epochs = sprintf("%4d", $config->getEpochs()); - $layers = sprintf("%2d", $config->getLayers()); - $shuffledRate = sprintf("%1.3f", $config->getShuffledNegativeRate()); - $randomRate = sprintf("%1.3f", $config->getRandomNegativeRate()); - $learningRate = sprintf("%1.4f", $config->getLearningRate()); + $epochs = sprintf('%4d', $config->getEpochs()); + $layers = sprintf('%2d', $config->getLayers()); + $shuffledRate = sprintf('%1.3f', $config->getShuffledNegativeRate()); + $randomRate = sprintf('%1.3f', $config->getRandomNegativeRate()); + $learningRate = sprintf('%1.4f', $config->getLearningRate()); $output->writeln("Epoch $epoch: epochs=$epochs layers=$layers shuffledRate=$shuffledRate randomRate=$randomRate, learningRate=$learningRate"); $output->writeln(" Step width for next config neighbor: $stepWidth"); @@ -71,7 +71,7 @@ private function printConfig(int $epoch, private function getAverageCost(OutputInterface $output, TrainingResult ...$results): float { $costs = array_map(function (TrainingResult $result) use ($output) { - $output->writeln(sprintf(" Training result: f1=%f, p(n)=%f, r(n)=%f, f1(n)=%f, p(y)=%f, r(y)=%f, f1(y)=%f, PSR=%d/%d/%d", + $output->writeln(sprintf(' Training result: f1=%f, p(n)=%f, r(n)=%f, f1(n)=%f, p(y)=%f, r(y)=%f, f1(y)=%f, PSR=%d/%d/%d', $result->getReport()['overall']['f1 score'], $result->getReport()['classes']['n']['precision'], $result->getReport()['classes']['n']['recall'], @@ -84,8 +84,8 @@ private function getAverageCost(OutputInterface $output, $result->getModel()->getSamplesRandom() )); return ( - $result->getReport()['classes']['n']['f1 score'] + - $result->getReport()['overall']['f1 score'] + $result->getReport()['classes']['n']['f1 score'] + + $result->getReport()['overall']['f1 score'] ) / 2; }, $results); @@ -174,7 +174,7 @@ public function optimize(int $maxEpochs, ); $output->writeln("Optimizing a MLP trainer in $maxEpochs steps"); - $output->writeln(""); + $output->writeln(''); $this->printConfig($epochs, $stepWidth, $config, $output); $tasks = array_map(function ($index) use ($config, $collectedData, $strategy) { diff --git a/lib/Service/ModelStore.php b/lib/Service/ModelStore.php index 58ad52c4..1eb641b0 100644 --- a/lib/Service/ModelStore.php +++ b/lib/Service/ModelStore.php @@ -54,7 +54,7 @@ public function loadLatest(AClassificationStrategy $strategy): Estimator { $latestModel = $this->modelMapper->findLatest($strategy::getTypeName()); } catch (DoesNotExistException $e) { $this->logger->debug("No models found. Can't load latest"); - throw new ModelNotFoundException("No models found", 0, $e); + throw new ModelNotFoundException('No models found', 0, $e); } return $this->load($latestModel->getId()); } @@ -109,7 +109,7 @@ public function load(int $id): Estimator { $this->cache($id, $serialized); } - $this->logger->debug("seralized model size: " . strlen($serialized)); + $this->logger->debug('seralized model size: ' . strlen($serialized)); // Inefficient, but we can't get the real path from app data as it might // not be a local file @@ -133,7 +133,7 @@ public function load(int $id): Estimator { */ public function persist(Learner $estimator, Model $model) { if (!($estimator instanceof Persistable)) { - throw new RuntimeException("Estimator is not persistable"); + throw new RuntimeException('Estimator is not persistable'); } $model->setType(get_class($estimator)); @@ -143,7 +143,7 @@ public function persist(Learner $estimator, Model $model) { try { $modelsFolder = $this->appData->getFolder(self::APPDATA_MODELS_FOLDER); } catch (NotFoundException $e) { - $this->logger->info("App data models folder does not exist. Creating it"); + $this->logger->info('App data models folder does not exist. Creating it'); $modelsFolder = $this->appData->newFolder(self::APPDATA_MODELS_FOLDER); } @@ -158,7 +158,7 @@ public function persist(Learner $estimator, Model $model) { $modelFile->putContent(file_get_contents($tmpFile)); } catch (Throwable $e) { - $this->logger->error("Could not save persisted estimator to storage, reverting", [ + $this->logger->error('Could not save persisted estimator to storage, reverting', [ 'exception' => $e, ]); $this->modelMapper->delete($model); diff --git a/tests/Unit/Service/NegativeSampleGeneratorTest.php b/tests/Unit/Service/NegativeSampleGeneratorTest.php index f65f8f00..c10c851f 100644 --- a/tests/Unit/Service/NegativeSampleGeneratorTest.php +++ b/tests/Unit/Service/NegativeSampleGeneratorTest.php @@ -110,8 +110,8 @@ public function testGenerateMultipleShuffledFromLimitedUnique(): void { $ipVec = array_slice($sample, 16, 32); self::assertTrue( - $ipVec == self::decToBitArray(3, 32) || - $ipVec === self::decToBitArray(4, 32), + $ipVec == self::decToBitArray(3, 32) + || $ipVec === self::decToBitArray(4, 32), 'Sample must have an unique IP' ); } @@ -141,8 +141,8 @@ public function testGenerateMultipleShuffledFromUniquesOnly(): void { $ipVec = array_slice($sample, 16, 32); self::assertTrue( - $ipVec === self::decToBitArray(1, 32) || - $ipVec === self::decToBitArray(2, 32), + $ipVec === self::decToBitArray(1, 32) + || $ipVec === self::decToBitArray(2, 32), 'Sample must have an unique IP' ); } @@ -173,9 +173,9 @@ public function testGenerateShuffledFromDuplicatesOnly(): void { private static function decToBitArray(int $dec, int $length): array { return array_map( function (string $d): int { - return (int) $d; + return (int)$d; }, - str_split(str_pad(decbin($dec), $length, "0", STR_PAD_LEFT)) + str_split(str_pad(decbin($dec), $length, '0', STR_PAD_LEFT)) ); } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 7457ae90..f88fdf2a 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -7,7 +7,7 @@ define('PHPUNIT_RUN', 1); -require_once __DIR__.'/../../../lib/base.php'; -require_once __DIR__.'/../vendor/autoload.php'; +require_once __DIR__ . '/../../../lib/base.php'; +require_once __DIR__ . '/../vendor/autoload.php'; OC_App::loadApp('suspicious_login'); diff --git a/vendor-bin/php-cs-fixer/composer.json b/vendor-bin/php-cs-fixer/composer.json index fcc2becd..d99ce93d 100644 --- a/vendor-bin/php-cs-fixer/composer.json +++ b/vendor-bin/php-cs-fixer/composer.json @@ -5,7 +5,7 @@ } }, "require-dev": { - "nextcloud/coding-standard": "^1.2.1", + "nextcloud/coding-standard": "^1.4.0", "php-cs-fixer/shim": "^3.89.2" } } diff --git a/vendor-bin/php-cs-fixer/composer.lock b/vendor-bin/php-cs-fixer/composer.lock index 3beb72e1..21f117f3 100644 --- a/vendor-bin/php-cs-fixer/composer.lock +++ b/vendor-bin/php-cs-fixer/composer.lock @@ -4,25 +4,78 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cfbbad14d34afb4eb9e4158f4c8ff451", + "content-hash": "2cceeb72116e3dbce4702583701e5e2e", "packages": [], "packages-dev": [ + { + "name": "kubawerlos/php-cs-fixer-custom-fixers", + "version": "v3.35.1", + "source": { + "type": "git", + "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", + "reference": "2a35f80ae24ca77443a7af1599c3a3db1b6bd395" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/2a35f80ae24ca77443a7af1599c3a3db1b6bd395", + "reference": "2a35f80ae24ca77443a7af1599c3a3db1b6bd395", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-tokenizer": "*", + "friendsofphp/php-cs-fixer": "^3.87", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6.24 || ^10.5.51 || ^11.5.32" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpCsFixerCustomFixers\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kuba Werłos", + "email": "werlos@gmail.com" + } + ], + "description": "A set of custom fixers for PHP CS Fixer", + "support": { + "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.35.1" + }, + "funding": [ + { + "url": "https://github.com/kubawerlos", + "type": "github" + } + ], + "time": "2025-09-28T18:43:35+00:00" + }, { "name": "nextcloud/coding-standard", - "version": "v1.2.1", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e" + "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e", - "reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/8e06808c1423e9208d63d1bd205b9a38bd400011", + "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011", "shasum": "" }, "require": { - "php": "^7.3|^8.0", + "kubawerlos/php-cs-fixer-custom-fixers": "^3.22", + "php": "^8.0", "php-cs-fixer/shim": "^3.17" }, "type": "library", @@ -42,11 +95,14 @@ } ], "description": "Nextcloud coding standards for the php cs fixer", + "keywords": [ + "dev" + ], "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.2.1" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.4.0" }, - "time": "2024-02-01T14:54:37+00:00" + "time": "2025-06-19T12:27:27+00:00" }, { "name": "php-cs-fixer/shim", @@ -111,5 +167,5 @@ "platform-overrides": { "php": "8.1" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" }