Skip to content

Commit 2c111ff

Browse files
committed
Fix code style violations found by phpcs
1 parent f0e4ac3 commit 2c111ff

File tree

111 files changed

+1070
-1039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1070
-1039
lines changed

src/Api/Struct.php renamed to src/Api/AbstractStruct.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace PleskX\Api;
55

6-
abstract class Struct
6+
abstract class AbstractStruct
77
{
88
/**
99
* @param string $property
@@ -13,7 +13,7 @@ abstract class Struct
1313
*/
1414
public function __set(string $property, $value)
1515
{
16-
throw new \Exception("Try to set an undeclared property '$property'.");
16+
throw new \Exception("Try to set an undeclared property '$property' to a value: $value.");
1717
}
1818

1919
/**
@@ -24,7 +24,7 @@ public function __set(string $property, $value)
2424
*
2525
* @throws \Exception
2626
*/
27-
protected function _initScalarProperties($apiResponse, array $properties): void
27+
protected function initScalarProperties($apiResponse, array $properties): void
2828
{
2929
foreach ($properties as $property) {
3030
if (is_array($property)) {
@@ -68,7 +68,7 @@ protected function _initScalarProperties($apiResponse, array $properties): void
6868
*/
6969
private function underToCamel(string $under): string
7070
{
71-
$under = '_'.str_replace('_', ' ', strtolower($under));
71+
$under = '_' . str_replace('_', ' ', strtolower($under));
7272

7373
return ltrim(str_replace(' ', '', ucwords($under)), '_');
7474
}

0 commit comments

Comments
 (0)