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

Sync spiral-matrix #765

Merged
merged 2 commits into from
Jun 28, 2024
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
22 changes: 0 additions & 22 deletions exercises/practice/spiral-matrix/.meta/example.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
<?php

/*
* By adding type hints and enabling strict type checking, code can become
* easier to read, self-documenting and reduce the number of potential bugs.
* By default, type declarations are non-strict, which means they will attempt
* to change the original type to match the type specified by the
* type-declaration.
*
* In other words, if you pass a string to a function requiring a float,
* it will attempt to convert the string value to a float.
*
* To enable strict mode, a single declare directive must be placed at the top
* of the file.
* This means that the strictness of typing is configured on a per-file basis.
* This directive not only affects the type declarations of parameters, but also
* a function's return type.
*
* For more info review the Concept on strict type checking in the PHP track
* <link>.
*
* To disable strict typing, comment out the directive below.
*/

declare(strict_types=1);

class SpiralMatrix
Expand Down
28 changes: 6 additions & 22 deletions exercises/practice/spiral-matrix/SpiralMatrixTest.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
<?php

/*
* By adding type hints and enabling strict type checking, code can become
* easier to read, self-documenting and reduce the number of potential bugs.
* By default, type declarations are non-strict, which means they will attempt
* to change the original type to match the type specified by the
* type-declaration.
*
* In other words, if you pass a string to a function requiring a float,
* it will attempt to convert the string value to a float.
*
* To enable strict mode, a single declare directive must be placed at the top
* of the file.
* This means that the strictness of typing is configured on a per-file basis.
* This directive not only affects the type declarations of parameters, but also
* a function's return type.
*
* For more info review the Concept on strict type checking in the PHP track
* <link>.
*
* To disable strict typing, comment out the directive below.
*/

declare(strict_types=1);

use PHPUnit\Framework\TestCase;
Expand All @@ -41,6 +19,7 @@ public function setUp(): void
}

/**
* @testdox empty spiral
* uuid: 8f584201-b446-4bc9-b132-811c8edd9040
*/
public function testEmptySpiral(): void
Expand All @@ -51,6 +30,7 @@ public function testEmptySpiral(): void
}

/**
* @testdox trivial spiral
* uuid: e40ae5f3-e2c9-4639-8116-8a119d632ab2
*/
public function testTrivialSpiral(): void
Expand All @@ -61,6 +41,7 @@ public function testTrivialSpiral(): void
}

/**
* @testdox spiral of size 2
* uuid: cf05e42d-eb78-4098-a36e-cdaf0991bc48
*/
public function testSpiralOfSize2(): void
Expand All @@ -74,6 +55,7 @@ public function testSpiralOfSize2(): void
}

/**
* @testdox spiral of size 3
* uuid: 1c475667-c896-4c23-82e2-e033929de939
*/
public function testSpiralOfSize3(): void
Expand All @@ -88,6 +70,7 @@ public function testSpiralOfSize3(): void
}

/**
* @testdox spiral of size 4
* uuid: 05ccbc48-d891-44f5-9137-f4ce462a759d
*/
public function testSpiralOfSize4(): void
Expand All @@ -103,6 +86,7 @@ public function testSpiralOfSize4(): void
}

/**
* @testdox spiral of size 5
* uuid: f4d2165b-1738-4e0c-bed0-c459045ae50d
*/
public function testSpiralOfSize5(): void
Expand Down