-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from Paazl/release/1.11.0
Release/1.11.0
- Loading branch information
Showing
8 changed files
with
151 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Codesniffer with the Magento Coding standard | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run codesniffer | ||
run: | ||
docker run | ||
--volume $(pwd)/:/app/workdir | ||
michielgerritsen/magento-coding-standard:latest | ||
--severity=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Lint PHP files | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
php-71: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: StephaneBour/[email protected] | ||
with: | ||
dir: './' | ||
|
||
php-72: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: StephaneBour/[email protected] | ||
with: | ||
dir: './' | ||
|
||
php-73: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: StephaneBour/[email protected] | ||
with: | ||
dir: './' | ||
|
||
php-74: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: StephaneBour/[email protected] | ||
with: | ||
dir: './' | ||
|
||
php-80: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: StephaneBour/[email protected] | ||
with: | ||
dir: './' | ||
|
||
php-81: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: StephaneBour/[email protected] | ||
with: | ||
dir: './' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,54 @@ | ||
<?php | ||
/** | ||
* Copyright © 2019 Paazl. All rights reserved. | ||
* Copyright © Paazl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Paazl\CheckoutWidget\Logger; | ||
|
||
use Magento\Framework\Serialize\Serializer\Json; | ||
use Monolog\Logger; | ||
|
||
/** | ||
* Class PaazlLogger | ||
* | ||
* @package Paazl\CheckoutWidget\Logger | ||
* DebugLogger logger class | ||
*/ | ||
class PaazlLogger extends Logger | ||
{ | ||
|
||
/** | ||
* @var Json | ||
*/ | ||
private $json; | ||
|
||
/** | ||
* DebugLogger constructor. | ||
* | ||
* @param Json $json | ||
* @param string $name | ||
* @param array $handlers | ||
* @param array $processors | ||
*/ | ||
public function __construct( | ||
Json $json, | ||
string $name, | ||
array $handlers = [], | ||
array $processors = [] | ||
) { | ||
$this->json = $json; | ||
parent::__construct($name, $handlers, $processors); | ||
} | ||
|
||
/** | ||
* @param string $type | ||
* @param mixed $data | ||
*/ | ||
public function add($type, $data) | ||
{ | ||
if (is_array($data)) { | ||
$this->addInfo($type . ': ' . json_encode($data)); | ||
} elseif (is_object($data)) { | ||
$this->addInfo($type . ': ' . json_encode($data)); | ||
if (is_array($data) || is_object($data)) { | ||
$this->addRecord(static::INFO, $type . ': ' . $this->json->serialize($data)); | ||
} else { | ||
$this->addInfo($type . ': ' . $data); | ||
$this->addRecord(static::INFO, $type . ': ' . $data); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.