Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Code Style #1070

Merged
merged 4 commits into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: CI

on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
pull_request:
push:
branches: [ master, 2.x, 1.x ]

jobs:
run:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ jobs:
- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist

# run phpcs
# - name: Run script
# run: vendor/bin/phpcs
- name: Install dependencies
run: composer bin php-cs-fixer update

- name: Run script
run: vendor-bin/php-cs-fixer/bin/php-cs-fixer fix --verbose --diff --dry-run

phpstan:
name: PHPStan
Expand Down
5 changes: 0 additions & 5 deletions fixtures/Definition/FakeMethodCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,26 @@
class FakeMethodCall implements MethodCallInterface
{
use NotCallableTrait;


public function withArguments(array $arguments = null): void
{
$this->__call(__METHOD__, func_get_args());
}


public function getCaller(): void
{
$this->__call(__METHOD__, func_get_args());
}


public function getMethod(): string
{
$this->__call(__METHOD__, func_get_args());
}


public function getArguments(): array
{
$this->__call(__METHOD__, func_get_args());
}


public function __toString(): string
{
Expand Down
5 changes: 0 additions & 5 deletions fixtures/Definition/Fixture/DummyFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,26 @@ public function __construct(string $id)
{
$this->id = $id;
}


public function getId(): string
{
return $this->id;
}


public function getClassName(): string
{
$this->__call(__METHOD__, func_get_args());
}


public function getSpecs(): SpecificationBag
{
$this->__call(__METHOD__, func_get_args());
}


public function getValueForCurrent(): void
{
$this->__call(__METHOD__, func_get_args());
}


public function withSpecs(SpecificationBag $specs): void
{
Expand Down
5 changes: 0 additions & 5 deletions fixtures/Definition/Fixture/FakeFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,26 @@
class FakeFixture implements FixtureInterface
{
use NotCallableTrait;


public function getId(): string
{
$this->__call(__METHOD__, func_get_args());
}


public function getClassName(): string
{
$this->__call(__METHOD__, func_get_args());
}


public function getSpecs(): SpecificationBag
{
$this->__call(__METHOD__, func_get_args());
}


public function getValueForCurrent(): void
{
$this->__call(__METHOD__, func_get_args());
}


public function withSpecs(SpecificationBag $specs): void
{
Expand Down
5 changes: 0 additions & 5 deletions fixtures/Definition/Fixture/MutableFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,16 @@ public function __construct(string $id, string $className, SpecificationBag $spe
$this->className = $className;
$this->specs = $specs;
}


public function getId(): string
{
return $this->id;
}


public function getClassName(): string
{
return $this->className;
}


public function getSpecs(): SpecificationBag
{
Expand All @@ -65,13 +62,11 @@ public function setSpecs(SpecificationBag $specs): void
{
$this->specs = $specs;
}


public function getValueForCurrent(): void
{
$this->__call(__METHOD__, func_get_args());
}


public function withSpecs(SpecificationBag $specs): void
{
Expand Down
1 change: 0 additions & 1 deletion fixtures/Definition/Flag/ElementFlag.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function __construct(string $element)
$this->element = $element;
}


public function __toString(): string
{
return $this->element;
Expand Down
1 change: 0 additions & 1 deletion fixtures/Definition/Flag/ElementWithToStringFlag.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public function __construct(string $element, string $toString)
$this->element = $element;
$this->toString = $toString;
}


public function __toString(): string
{
Expand Down
1 change: 0 additions & 1 deletion fixtures/Definition/Flag/MutableFlag.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public function __construct(string $stringValue, $object)
$this->stringValue = $stringValue;
$this->object = $object;
}


public function __toString(): string
{
Expand Down
5 changes: 0 additions & 5 deletions fixtures/Definition/MethodCall/DummyMethodCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,26 @@ public function __construct(string $toString)
$this->token = uniqid();
$this->toString = $toString;
}


public function withArguments(array $arguments = null): self
{
$this->__call(__METHOD__, func_get_args());
}


public function getCaller(): void
{
$this->__call(__METHOD__, func_get_args());
}


public function getMethod(): string
{
$this->__call(__METHOD__, func_get_args());
}


public function getArguments(): array
{
$this->__call(__METHOD__, func_get_args());
}


public function __toString(): string
{
Expand Down
5 changes: 0 additions & 5 deletions fixtures/Definition/MethodCall/MutableMethodCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,11 @@ public function __construct(ServiceReferenceInterface $caller = null, $method, a
$this->method = $method;
$this->arguments = $arguments;
}


public function withArguments(array $arguments = null): void
{
$this->__call(__METHOD__, func_get_args());
}


public function getCaller()
{
Expand All @@ -57,7 +55,6 @@ public function setCaller(ServiceReferenceInterface $caller = null): void
{
$this->caller = $caller;
}


public function getMethod(): string
{
Expand All @@ -68,7 +65,6 @@ public function setMethod($method): void
{
$this->method = $method;
}


public function getArguments()
{
Expand All @@ -79,7 +75,6 @@ public function setArguments(array $arguments = null): void
{
$this->arguments = $arguments;
}


public function __toString(): string
{
Expand Down
3 changes: 0 additions & 3 deletions fixtures/Definition/Object/ImmutableByCloneObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,16 @@ public function __construct(string $id, object $instance)
$this->id = $id;
$this->instance = $instance;
}


public function getId(): string
{
return $this->id;
}


public function getInstance()
{
return $this->instance;
}


public function withInstance(object $newInstance)
{
Expand Down
3 changes: 0 additions & 3 deletions fixtures/Definition/Object/ImmutableObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,16 @@ public function __construct(string $id, $instance)
$this->id = $id;
$this->instance = deep_clone($instance);
}


public function getId(): string
{
return $this->id;
}


public function getInstance()
{
return deep_clone($this->instance);
}


public function withInstance($newInstance)
{
Expand Down
1 change: 0 additions & 1 deletion fixtures/Definition/ServiceReference/FakeReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class FakeReference implements ServiceReferenceInterface
{
use NotCallableTrait;


public function getId(): string
{
Expand Down
1 change: 0 additions & 1 deletion fixtures/Definition/ServiceReference/MutableReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public function setId(string $id): void
{
$this->id = $id;
}


public function getId(): string
{
Expand Down
2 changes: 0 additions & 2 deletions fixtures/Definition/Value/DummyValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ public function __construct(string $value)
{
$this->value = $value;
}


public function getValue()
{
return $this->value;
}


public function __toString(): string
{
Expand Down
3 changes: 0 additions & 3 deletions fixtures/Definition/Value/FakeObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,16 @@
class FakeObject implements ObjectInterface
{
use NotCallableTrait;


public function getId(): string
{
$this->__call(__METHOD__, func_get_args());
}


public function getInstance(): void
{
$this->__call(__METHOD__, func_get_args());
}


public function withInstance($newInstance): void
{
Expand Down
2 changes: 0 additions & 2 deletions fixtures/Definition/Value/FakeValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
class FakeValue implements ValueInterface
{
use NotCallableTrait;


public function getValue(): void
{
$this->__call(__METHOD__, func_get_args());
}


public function __toString(): string
{
Expand Down
2 changes: 0 additions & 2 deletions fixtures/Definition/Value/MutableValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public function __construct($value)
{
$this->value = $value;
}


public function getValue()
{
Expand All @@ -34,7 +33,6 @@ public function setValue($value): void
{
$this->value = $value;
}


public function __toString(): string
{
Expand Down
3 changes: 0 additions & 3 deletions fixtures/Entity/DummyWithNoArgumentConstructor.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ public function __construct()
$this->args = func_get_args();
}

/**
* @return array
*/
public function getArgs(): array
{
return $this->args;
Expand Down
1 change: 0 additions & 1 deletion fixtures/FileLocator/FakeFileLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class FakeFileLocator implements FileLocatorInterface
{
use NotCallableTrait;


public function locate(string $name, string $currentPath = null): string
{
Expand Down
1 change: 0 additions & 1 deletion fixtures/FixtureBuilder/Denormalizer/FakeDenormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
class FakeDenormalizer implements DenormalizerInterface
{
use NotCallableTrait;


public function denormalize(array $data): BareFixtureSet
{
Expand Down
Loading