mirror of
https://github.com/ivuorinen/business-data-fetcher.git
synced 2026-01-26 03:04:07 +00:00
feat: phpcs, psr12 rules and fixes
This commit is contained in:
@@ -12,5 +12,8 @@
|
||||
"psr-4": {
|
||||
"Ivuorinen\\BusinessDataFetcher\\": "src/"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"squizlabs/php_codesniffer": "^3.10"
|
||||
}
|
||||
}
|
||||
|
||||
85
composer.lock
generated
85
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "1651a96cd6f414d8650851a68e3cf096",
|
||||
"content-hash": "db4a711b51fc33460388a38b09cee0ad",
|
||||
"packages": [
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
@@ -667,7 +667,88 @@
|
||||
"time": "2024-04-18T09:32:20+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "3.10.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
|
||||
"reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017",
|
||||
"reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-simplexml": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
|
||||
},
|
||||
"bin": [
|
||||
"bin/phpcbf",
|
||||
"bin/phpcs"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Greg Sherwood",
|
||||
"role": "Former lead"
|
||||
},
|
||||
{
|
||||
"name": "Juliette Reinders Folmer",
|
||||
"role": "Current lead"
|
||||
},
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
||||
"homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
|
||||
"keywords": [
|
||||
"phpcs",
|
||||
"standards",
|
||||
"static analysis"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues",
|
||||
"security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy",
|
||||
"source": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
|
||||
"wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/PHPCSStandards",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/jrfnl",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "open_collective"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-21T23:26:44+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
require_once 'vendor/autoload.php';
|
||||
require_once "vendor/autoload.php";
|
||||
|
||||
$client = new Ivuorinen\BusinessDataFetcher\BusinessDataFetcher();
|
||||
$client = new Ivuorinen\BusinessDataFetcher\BusinessDataFetcher();
|
||||
try {
|
||||
$results = $client->getBusinessInformation('1639413-9');
|
||||
$results = $client->getBusinessInformation("1639413-9");
|
||||
print_r($results);
|
||||
} catch (\GuzzleHttp\Exception\GuzzleException $e) {
|
||||
var_dump($e);
|
||||
|
||||
8
phpcs.xml
Normal file
8
phpcs.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="PHP_CodeSniffer">
|
||||
<description>PSR12</description>
|
||||
<rule ref="PSR12">
|
||||
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
|
||||
<exclude name="PSR12.Operators.OperatorSpacing"/>
|
||||
</rule>
|
||||
</ruleset>
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
namespace Ivuorinen\BusinessDataFetcher\Exceptions;
|
||||
|
||||
class ApiResponseErrorException extends \Exception {}
|
||||
class ApiResponseErrorException extends \Exception
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
namespace Ivuorinen\BusinessDataFetcher\Exceptions;
|
||||
|
||||
class UnexpectedValueException extends \Exception {}
|
||||
class UnexpectedValueException extends \Exception
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user