Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: simps/mqtt-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.1
Choose a base ref
...
head repository: simps/mqtt-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 3 commits
  • 11 files changed
  • 1 contributor

Commits on Oct 3, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    dougbu Doug Bunting
    Copy the full SHA
    e8ca20f View commit details

Commits on Dec 13, 2021

  1. Update header_comment (#3)

    * Update header_comment
    
    * Update header_comment
    sy-records authored Dec 13, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    dougbu Doug Bunting
    Copy the full SHA
    69ae98c View commit details

Commits on Mar 3, 2022

  1. Update composer.json

    sy-records committed Mar 3, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    dougbu Doug Bunting
    Copy the full SHA
    32dda3e View commit details
31 changes: 31 additions & 0 deletions .github/workflows/coding_style_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Coding Style Checks

on: [ push, pull_request, workflow_dispatch ]

jobs:
ci:
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.os }}
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: [ubuntu-latest]
php-versions: ['7.2', '7.3', '7.4', '8.0']
max-parallel: 4
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpize
coverage: none

- name: Setup Deps
run:
composer install -o

- name: Coding Style Checks
run:
composer cs-check
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/vendor/
composer.lock
.idea
config.php
properties.php
27 changes: 13 additions & 14 deletions .php_cs.dist → .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
<?php

declare(strict_types=1);
/**
* This file is part of Simps
* This file is part of Simps.
*
* @link https://github.com/simps/mqtt
* @link https://github.com/simps/mqtt-cli
* @contact Lu Fei <lufei@simps.io>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code
* please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

$header = <<<'TEXT'
This file is part of Simps
This file is part of Simps.
@link https://github.com/simps/mqtt
@link https://github.com/simps/mqtt-cli
@contact Lu Fei <lufei@simps.io>
For the full copyright and license information,
please view the LICENSE file that was distributed with this source code
please view the LICENSE file that was distributed with this source code.
TEXT;

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@DoctrineAnnotation' => true,
'@PhpCsFixer' => true,
'header_comment' => [
'commentType' => 'PHPDoc',
'comment_type' => 'PHPDoc',
'header' => $header,
'separate' => 'bottom',
'location' => 'after_open',
'separate' => 'none',
'location' => 'after_declare_strict',
],
'array_syntax' => [
'syntax' => 'short',
@@ -85,7 +84,7 @@
'combine_consecutive_unsets' => true,
'declare_strict_types' => true,
'linebreak_after_opening_tag' => true,
'lowercase_constants' => true,
'constant_case' => true,
'lowercase_static_reference' => true,
'no_useless_else' => true,
'no_unused_imports' => true,
8 changes: 5 additions & 3 deletions bin/mqtt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);
/**
* This file is part of Simps
* This file is part of Simps.
*
* @see https://github.com/simps/mqtt
* @see https://github.com/simps/mqtt-cli
* @contact Lu Fei <lufei@simps.io>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code
* please view the LICENSE file that was distributed with this source code.
*/
foreach (
[
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -23,8 +23,8 @@
],
"require": {
"symfony/console": "^5.2",
"simps/mqtt": "^1.3",
"friendsofphp/php-cs-fixer": "^2.18",
"simps/mqtt": "^1.3 || ^2.0",
"friendsofphp/php-cs-fixer": "^3.0",
"ext-json": "*"
},
"autoload": {
11 changes: 5 additions & 6 deletions src/Command/PublishCommand.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php

declare(strict_types=1);
/**
* This file is part of Simps
* This file is part of Simps.
*
* @link https://github.com/simps/mqtt
* @link https://github.com/simps/mqtt-cli
* @contact Lu Fei <lufei@simps.io>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code
* please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Simps\MQTTCLI\Command;

use Simps\MQTTCLI\Handler\PublishHandler;
11 changes: 5 additions & 6 deletions src/Command/SubscribeCommand.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php

declare(strict_types=1);
/**
* This file is part of Simps
* This file is part of Simps.
*
* @link https://github.com/simps/mqtt
* @link https://github.com/simps/mqtt-cli
* @contact Lu Fei <lufei@simps.io>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code
* please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Simps\MQTTCLI\Command;

use Simps\MQTTCLI\Handler\SubscribeHandler;
11 changes: 5 additions & 6 deletions src/Event/AbstractEvent.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php

declare(strict_types=1);
/**
* This file is part of Simps
* This file is part of Simps.
*
* @link https://github.com/simps/mqtt
* @link https://github.com/simps/mqtt-cli
* @contact Lu Fei <lufei@simps.io>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code
* please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Simps\MQTTCLI\Event;

use Simps\MQTT\Client;
11 changes: 5 additions & 6 deletions src/Handler/AbstractHandler.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php

declare(strict_types=1);
/**
* This file is part of Simps
* This file is part of Simps.
*
* @link https://github.com/simps/mqtt
* @link https://github.com/simps/mqtt-cli
* @contact Lu Fei <lufei@simps.io>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code
* please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Simps\MQTTCLI\Handler;

use Simps\MQTT\Client;
11 changes: 5 additions & 6 deletions src/Handler/PublishHandler.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php

declare(strict_types=1);
/**
* This file is part of Simps
* This file is part of Simps.
*
* @link https://github.com/simps/mqtt
* @link https://github.com/simps/mqtt-cli
* @contact Lu Fei <lufei@simps.io>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code
* please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Simps\MQTTCLI\Handler;

use Simps\MQTT\Hex\ReasonCode;
11 changes: 5 additions & 6 deletions src/Handler/SubscribeHandler.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php

declare(strict_types=1);
/**
* This file is part of Simps
* This file is part of Simps.
*
* @link https://github.com/simps/mqtt
* @link https://github.com/simps/mqtt-cli
* @contact Lu Fei <lufei@simps.io>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code
* please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Simps\MQTTCLI\Handler;

use Simps\MQTT\Hex\ReasonCode;